Synchronized movement with a conveyor belt (conveyor tracking)

INFORMATION

The MOVIKIT® Robotics add-on ConveyorTracking is required to run this application example.

Movable USER coordinate systems are used for the synchronized movement with a conveyor belt (conveyor tracking). Do the following to use the basic function:

  1. Create a ConveyorOrRotaryTable function block instance and a configuration. You can use, for example, the declaration part of the User_PRG program.

fbConveyor :
SEW_MK_Robotics.ConveyorOrRotaryTable;

stConfigConveyor :
SEW_MK_Robotics.SEW_RobUserCs.SEW_IRobUserCs.ST_Config;

  1. Make the configuration and the connection to the robot. Use the User_PRG.Init action, for example. If necessary, replace the name "MyRobot" in "Interface_MyRobot" and "HMI_MyRobot" with the name of the robot in your MOVISUITE® project.

(* Typ *)

stConfigConveyor.eUserCoordSysType := SEW_MK_Robotics.
SEW_RobUserCs.SEW_IRobUserCs.E_UserCoordSysType.Linear;

(* Zero point of the conveyor belt or USER coordinate system is relative to BASE *)

stConfigConveyor.alrOrigin[1] := 0.0; // mm in X-direction
stConfigConveyor.alrOrigin[2] := 100.0; // mm in Y-direction
stConfigConveyor.alrOrigin[3] := 0.0; // mm in Z-direction

stConfigConveyor.alrOrigin[4] := 30.0; // Degrees around Z-axis
stConfigConveyor.alrOrigin[5] := 0.0; // Degrees around Y-axis
stConfigConveyor.alrOrigin[6] := 0.0;// Degrees around X-axis

(* Positive direction of movement of the conveyor belt in the possibly reversed USER coordinate system *)

(*X_negative, X_positive (Default),
Y_negative, Y_positive,
Z_negative, Z_positive *)

fbConveyor.eMotionDirection := SEW_MK_Robotics.
SEW_RobUserCs.SEW_IRobUserCs.E_CartesianDirection.Default;

(* Connection to the robot *)

fbConveyor.stConfig := stConfigConveyor;
Interface_MyRobot.LinkIUserCoordSys_Segment(fbConveyor);
HMI_MyRobot.fbSimu3D.AddUserCS(fbConveyor, 1);
xInitDone := (* xInitDone AND *) fbConveyor.Init();

  1. In the fbConveyor.lrSetpointPosition property, assign the position profile of the USER coordinate system continuously in the HighPrio task. Preferably use the User_PRG.HighPrio or User_PRG.ReadActualValues action for this.
    • Example: USER coordinate system is moved by means of sine. To that end, define, for instance, a variable lrSinArg in the declaration part of the User_PRG program.

lrSinArg := lrSinArg + 0.0001;
fbConveyor.lrSetpointPosition :=
500.0(*mm*)*SIN(lrSinArg);

  1. Set the desired coordinate system in the SRL program each time before the motion command.
Comments:

Before the change to the USER coordinate system takes place, the position signal must already have been continuously assigned to the fbConveyor.lrSetpointPosition property for at least 5 cycles of the TaskHighPrio. This means the signal must be assigned continuously as long as the interpolation is performed in the coordinate system.

If the position signal for the fbConveyor.lrSetpointPosition property is used by a MultiMotion axis, it must not be read from the outputs in SEW_GVL.Interface_MultiMotionAxis because these are only updated in the TaskMain cycle. Instead, assign the output signals from SEW_GVL_Internal.MultiMotionAxis cyclically in the TaskHighPrio to the fbConveyor.lrSetpointPosition property, for example.

If, for example, noisy encoder signals are to be used, they must be smoothed by the application before they are assigned to the fbConveyor.lrSetpointPosition property as a continuous signal in the TaskHighPrio.

For the direct change between two different, movable linear USER coordinate systems, another ConveyorOrRotaryTable function block instance fbConveyor2 is required. USER remains selected in the SRL program. For the change, the new USER coordinate system is linked to the robot in the corresponding CASE of a CallFunction before the required motion command. See IEC function call for the SRL program.

CASE uiCallIndex OF
  1:Interface_MyRobot.LinkIUserCoordSys_Segment(fbConveyor);
    HMI_MyRobot.fbSimu3D.AddUserCS(fbConveyor, 1);
    CallF := TRUE;
  2:Interface_MyRobot.LinkIUserCoordSys_Segment(fbConveyor2);
    HMI_MyRobot.fbSimu3D.AddUserCS(fbConveyor2, 1);
    CallF := TRUE;

The position signal of the previous USER coordinate system must be assigned continuously until the movement takes place in the new USER coordinate system. This is the case as soon as the value in the variables SEW_GVL.Interface_MyRobot.Prg.OUT.uiNumberOfUserCoordSysChanges changes ("MyRobot" corresponds to the name of the robot node issued by the user in MOVISUITE®).

The coordinate system is set to BASE when the basic state is established. See Establishing the basic state.

If a program is paused in the moved coordinate system, for example, the robot stops in the moved coordinate system, i.e. it then moves with the coordinate system. If the software limit switches are violated, an error is triggered, as a result of which first an emergency stop is executed that is true to the path and then an emergency stop is executed that is true to the axis, so that the axes come to an idle state. For this purpose, however, the software limit switches must not be deactivated ("Disable SWLS", SoftwareLimitSwitch.IN.xDisable).

In the current software version, the management of objects moving on the conveyor belt as well as the prevention of an overflow of an encoder signal are to be implemented depending on the application.

A complete, open automation solution for conveyor tracking including camera connection and load distribution to several robots is included in the "SEW-EURODRIVE Automation Framework". Contact SEW‑EURODRIVE for more information.