Parameterization

Perform the following initial steps to parameterize the automatic G-code import:

  1. Link the robot instance to the IEC function block for G-code import using the LinkModule() method. If the robot is changed, it must be relinked accordingly (INFORMATION: "MyRobot" is the name of the robot node assigned by the user in MOVISUITE®).
    • User_PRG.Init: GCodeImport.LinkModule(MyRobot);
  2. Call the CallMain() method cyclically in the main task.
    • User_PRG.Main: GCodeImport.CallMain();
  3. Parameterize and activate the connection of the function block with the import service run on the import computer via the stIn structure. If the function block is activated and the IP address is set, the function block attempts to connect. INFORMATION: There is no timeout for the connection attempt. If the connection is interrupted, the block automatically tries to re-establish the connection. Function block and service are subject to versioning. If a connection can be established, the compatibility is automatically checked based on the version. If the versions of the import block and import service are not compatible with each other, no further signals are sent and an error is output.
    • stIn.stCommunication.xEnable – activate function block
    • stIn.stCommunication.sServerIP – IP address of the target computer
    • stIn.stCommunication.uiServerPort – port address of the instance of the running import service

The functionalities of the IEC function block for G-code import are configured and started via the stIn structure. Variables in the stOut structure return the result of the executed function. The IEC programmer must first parameterize the import and then start it by means of a rising edge at xStartImport. The parameterization is retained modally and is not reset after starting a run. Changes to the parameterization after a signal has been sent are only accepted with the next rising edge.