Skip to content

Siemens TIA Portal v19 - FB Library Usage (S7-1200)


1. Wiring Instructions

1.1 Cabinet Wiring

1

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
2

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 -
12

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.
3
  • 2. Double-click the PLC device, open 'System and Clock Memory', and check 'Enable system memory byte' and 'Enable clock memory byte'.
4

2.2 Function Block Library Usage

  • 1. On the right panel, open Library -> Global Libraries, and open the file with the .al19 extension.
5
6
  • 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.
7
8
9-17605849095322
  • 3. Click the Data Block and drag the sending data into the Send_P2P instruction BUFFER.
10
  • 4. Click the Data Block and drag the receiving data into the Receive_P2P instruction BUFFER.
11

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)