IEC function call for the SRL program

To call an IEC function from the SRL program, create the following function in the IEC program:

  1. Create a new function block (Context menu / Add object / POU… / Type: function block).
  2. Implement the following interface using the function block:
    SEW_MK_Robotics.SEW_IRobLangPub.ICallF
  3. Implement all interfaces (context menu of the function block/Implement interfaces…).
  4. Create an instance of the function block in the User_PRG program
  5. Connect the function block with the robot by adding the following line of code in User_PRG.Init (replace "INSTANCE NAME" by the name of the robot in the MOVISUITE® project):
    INSTANCENAME.fbProgramInterpreter.LinkICallF(fbCallFunction);
  6. Using the CallF method, program a case distinction that depends on the uiCallIndex variable.
  7. Program the desired function into the appropriate branch of the case distinction. The next SRL command is always only processed after setting CallF to "TRUE".

For further information on calling the IEC function in the RobotMonitor, refer to chapter IEC function call. An application example for the IEC call function for the SRL program can be found in chapter IEC call function for the SRL program.