Skip to main content

Using Additional Axes in Robotics

The Robotics_AdditionalAxes.project sample project shows how additional axes are configured and used in robotics. Additional axes are axes which are moved synchronously with coordinated movements of the robot.

The project is located in the installation directory of CODESYS under ..\CODESYS SoftMotion\Examples.

Structure of the application

The axis group is configured in the AxisGroup object. A SCARA robot with 3 axes (two rotary axes and one linear Z-axis) is used.

Two additional axes have also been added below Additional Axes and linked to the two axes DriveAdd1 and DriveAdd2.

The PLC_PRG program contains a simple state machine for the program flow. First the axis group is enabled in state 0, and then a PTP movement to position (X=50, Y=50) is performed. This is then blended into a linear movement to position (X=50, Y=-50).

For the first robot movement, a relative additional axis movement with distance (10, 20) is commanded. For the second robot movement, the distance of the additional axis is (-10, -20).

_sm_img_example_additional_axes.png

The MC_GroupReadActualPosition and MC_GroupReadActualVelocity function blocks are used to read the position and velocity of the kinematics and of the additional axes.

Commissioning

  1. Build the application and download it to a controller.

  2. Open the trace and download it to the controller.

  3. Start the application.

  4. You can track the movement of the X and Y coordinates and the two additional axes in the trace.