Static USER coordinate systems

INFORMATION

A separate license is not required for static coordinate systems.

To interpolate movements in a static USER coordinate system, proceed as follows:

  1. Create an instance of the StaticTransform function block and an array for the transformation. For this purpose, you can use for example the declaration part of the instance of the CallFunction function block used in the following.

fbStaticTransform:
SEW_MK_Robotics.SEW_RobUserCs.StaticTransform;
alrTransform:
ARRAY[1..6] OF LREAL;

  1. Assign the required transformation to the instance. To do so, you can use a CASE of a CallFunction, for example. See IEC function call for the SRL program and IEC call function for the SRL program. If necessary, replace the name "MyRobot" in "Interface_MyRobot" and "HMI_MyRobot" with the name of the robot in your MOVISUITE® project.

CASE uiCallIndex OF
 1:alrTransform[1] := 100.0; //mm
   alrTransform[2] := 200.0; //mm
   alrTransform[3] := 300.0; //mm
   alrTransform[4] := 90.0; //Grad
   fbStaticTransform.SetTransform(alrTransform);
  Interface_MyRobot.LinkIUserCoordSys_Segment(fbStaticTransform);
   HMI_MyRobot.fbSimu3D.AddUserCS(fbStaticTransform, 1);
   CallF := TRUE;

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

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

A new transformation is applied only at the moment of changing the coordinate system from BASE to USER. Alternating static transformations can each be applied to the same instance of the StaticTransform function block. In this case, the following lines of code must be executed only once:

Interface_MyRobot.LinkIUserCoordSys_Segment(fbStaticTransform);
HMI_MyRobot.fbSimu3D.AddUserCS(fbStaticTransform, 1);

Alternatively, different StaticTransform function block instances can be created for different transformations, for example, that are to be linked to the robot via the two code lines in each case when they are used.

The transformation can be determined, for example, by means of the CoordSysMeasurement function block. See also the application example Measurement of a coordinate system.