Special features of controlling a rotary table by the robot
A rotary table can optionally be controlled by the robot so that the path point to be approached in each case in the USER coordinate system is in the ZX plane of the BASE coordinate system with Y = 0. In this way, the robot's degrees of freedom can be extended to include movement in the Y direction. See also chapter Controlling a transport device by the robot. The "USER_ControlledByRobot" coordinate system must be set in the SRL program for this purpose.
The sample IEC code in the chapter Synchronized movement with a rotary table is valid with the exception that the position profile must not be transferred to the fbRotaryTable, i.e. the call of the HighPrio() method must be removed from the User_PRG.HighPrio() action. Instead, the setpoints must be read from the fbRotaryTable.lrSetpointPosition property and used to control a MultiMotion tracking axis.
(* Setpoints to MuMo tracking axis, [-180°, 180°[ *)
lrSetpointForMuMoTrackingAxis :=
fbRotaryTable.lrSetpointPosition;
For prepositioning the rotary table, the method AdjustToPoseWithProfile() of the function block ConveyorOrRotaryTable can be used. During positioning, the coordinate system "USER_ControlledByRobot" must not be set in the SRL program for this rotary table. The robot must be in "BASE" during positioning, for example. Run the following sample code, for example in the User_PRG.HighPrio task.
The rotary table is positioned in such a way that the point with the coordinates X = alrPose[1], Y = alrPose[2] in the USER coordinate system after positioning in BASE coordinates has the coordinate value Y = 0 and is located between the robot base and the center of the rotary table. Positioning is performed by the shortest distance. Positioning starts at the rising edge of xStart. The input variable must remain "TRUE" until the end of positioning and must then be called with "FALSE" as soon as USER_ControlledByRobot is set again. The function block returns "TRUE" once positioning has been completely executed.
In the example, robot pose variables are used for alrPose, and robot Boolean variables are used for xStart and the return value. A direct handshake with the SRL program is possible in this way.
alrPose[1] :=
SEW_GVL.Interface_MyRobot.PrgVar.astPoseValues[21].arKinDim[1];
alrPose[2] :=
SEW_GVL.Interface_MyRobot.PrgVar.astPoseValues[21].arKinDim[2];
SEW_GVL.Interface_MyRobot.PrgVar.axBoolValues[2] :=
fbRotaryTable.AdjustToPoseWithProfile(
xFeedEnable := TRUE,
xRapidStop := xRapidStop_RotaryTable,
(* Schnellstopp, wenn TRUE *)
lrVelocity := 100, // [°/s], > 0
lrAcceleration := 100, // [°/s2], > 0
lrJerk := 1000, // [°/s3], > 0
lrRapidDeceleration := 1000, // >= lrAcceleration
lrRapidJerk := 10000, // >= lrJerk
xStart := SEW_GVL.Interface_MyRobot.PrgVar.axBoolValues[1],
alrPose := alrPose (* ARRAY[1..6] OF LREAL *));
When creating the application, it is also necessary to pay attention to the following properties:
- A change from/to the USER coordinate system of a rotary table is only possible via "BASE".
- The rotary table is always aligned automatically in such a way that the position to be approached is on the side of the rotary table facing the robot.
- Passing through the center of the rotary table causes an error, as this would generally lead to very fast movements of the rotary table.
- To change to or from the USER coordinate system, the rotary table must be in idle state if the robot cannot execute a compensation movement in Y-direction.
- If the robot can be moved in Y-direction, it must be at Y = 0 when changing to the USER coordinate system, otherwise it will already receive setpoints at Y = 0 in the first cycle and a jerky movement of the robot or a lag error will occur.
- The "BackToPath" function does not work with the current version of the software because the rotary table is not automatically repositioned to the appropriate position to continue the path smoothly.