Siemens TIA Portal v19 - FB Library Usage (S7-1200)
1. Wiring Instructions
1.1 Cabinet Wiring
1.2 PLC–UC04–UART Servo Wiring
| CB 1241_TA | CB 1241_T/RA |
|---|---|
| CB 1241_TB | CB 1241_T/RB |
| CB 1241_T/RA | UC04_A |
| CB 1241_T/RB | UC04_B |
1.3 RS485 Servo Wiring
| PLC-A | RS485 Servo - A |
|---|---|
| PLC-B | RS485 Servo - B |
| Power + | RS485 Servo + |
| Power - (must share ground with PLC) | RS485 Servo - |
2. Program Guide
2.1 Configuration (TIA Portal v19)
- 1. In device configuration, add the PLC model and add the CB 1241 (RS485) communication board.
- 2. Double-click the PLC device, open 'System and Clock Memory', and check 'Enable system memory byte' and 'Enable clock memory byte'.
2.2 Function Block Library Usage
- 1. On the right panel, open Library -> Global Libraries, and open the file with the .al19 extension.
- 2. After opening, you should see it added. Drag the FB (function block) into your program and fill in parameters. Drag the Data Block to the leftmost program block.
- 3. Click the Data Block and drag the sending data into the Send_P2P instruction BUFFER.
- 4. Click the Data Block and drag the receiving data into the Receive_P2P instruction BUFFER.
2.3 Parameter Description (Common for FBs)
- angle: Target servo angle; unit: 0.1°
- ID: Servo ID
- interval: Time to reach the target angle; unit: ms
- accInterval: Acceleration time (ms); must be > 20 ms
- decInterval: Deceleration time (ms); must be > 20 ms
- power: Output power (mW)











