Skip to main content

Import and use the FB_RobCo_Controller

Imports the .scl file as an external source, generates the function block from it, and wires it up in your PLC program. The FB must be compiled, and any user modifications can be made directly in the SCL editor in TIA Portal.

For what the block does, see Function Block.

Steps

  1. In the Project Tree, go to External source files
  2. Click on Add new external file and open the file
  3. The file is now under External source files. Right-click on it and select Generate blocks from source. TIA Portal will parse the file and generate the FB under Program blocks.
  4. Right-click FB_RobCo_Controller in Program blocks and select Compile. You can now insert the function block into your cyclic OB (e.g. Main [OB1]) or use it in your user program.
  5. Go to PLC tags/Default tag table and create two tags per physical Robot instance, one for the input values and one for the output values. For example:
    • robot_1_in of type RobCo_Input with the first input bit of the attached Profinet device (typically %I68.0 if no other device is attached).
    • robot_1_out of type RobCo_Output with the first output bit (typically %Q64.0 if no other device is attached).
  6. Go to your inserted RobCo function block and set the hwInput field as robot_1_in and the hwOutput as robot_1_out.
warning

Never touch the content of the .scl function block. Always add custom logic to additional function blocks.