Versions Used and required Software
ctrlX OS 3.6
Elmo Application Studio EAS 2.9
XML Device Description for ELMO Platinum
ctrlX Apps from ctrlX OS Store
HW Setup & Prerequisites
ctrlX CORE Device (X3, X5, X7) + Power Supply
ROKIT Motor + Power Supply + HW STO
ROKIT Motor parametrized for HW STO and in Remote Mode (EASII)
PC with the above mentioned Software installed
Step-by-Step guide
1. Configure the EtherCat Communication
1.1 Log In to the web interface of your ctrlX OS which has the apps for EtherCat Master, Motion and PLC installed.
Configure the EtherCat Master
1.2 Add EtherCat Master
1.3 Choose the right Port – see HW setup
1.4 Open ctrlX I/O Engineering (upper right corner or manual)
Hint for diagnostics: Topology not OK – because not yet configured
1.5 Create a new project and connect to the IP address of your ctrlX Core
1.6 Right click on ethercatmaster and "Scan for Devices..."
1.7 If you did not yet install the device description for the ELMO drives, it will show an error. You must now install the device description. (See "Versions used and required Software" in the beginning of the article)
1.8 Hit "Install..." and choose the ElmoPlatinum device description.
1.9 After installation, the device is recognized, and you can insert the devices.
As the ELMO Platinum in the ROKIT Motor is a single axis controller, the ESI File for single axis was chosen.
Axis1_Slot1 is for safety – this is not covered in this How-to.
Axis1_Slot2 is for standard communication. We will now change the drive to cyclic velocity mode. Right click on Axis1_Slot2 and “Plug device...”
1.10 Choose the "Cyclic Velocity Mode" and hit "Plug Device"
1.11 Double click on the Platinum Drive and enable the "Expert Settings"
1.12 Move to the tab "Expert Process Data", choose the "Cyclic Velocity Mode Outputs" and "Insert" the "Target Position 0x607A" and the "Mode of Operation 0x6060" as a new PDO.
1.13 Do the same for the "Cyclic Velocity Mode Inputs" and add the "Velocity actual value 0x606C" and the "Modes of operation display 0x6061"
1.14 Download the Project to the Control
Your EtherCat Master App on the ctrlX OS Web UI should now look like the following:
🚀 You are done with the EtherCat Communication. Your ctrlX Core is now able to communicate with the ROKIT Motor.
Configure the Motion App
2.1 In ctrlX OS Web UI change to "Motion" --> "Axis Profiles" and add a new Axis Profile
2.2 Choose the field bus device, the profile gets linked to:
2.3 Edit the axis profile
2.4 Move to the tab "Scaling" and edit the scaling entry to the following:
Under the tab "Variables", the mapping is found automatically (just for Information)
2.5 You can now switch to "Motion" --> "Axes" and add a new axis.
2.6 Add the axes without a profile
2.7 When editing the axis, the profile is selected in the tab "General" --> "Connection to physical drive"
2.8 In the tab "Limits" , change the limits to the following values
2.9 You are now ready to change the ctrlX OS Motion from "Configuration" to "Running"
2.10 Go to "Axis commissioning"
2.11 In velocity mode, you are now ready to enable the axis
❗ Before moving the axis make sure it is safe to turn the axis!❗
2.12 The axis is now powered on and ready to move. Enter a target velocity and press "Start"
If an error occurs when turning on the Axis, check the STO and the remote mode of the ROKIT Motor. The Elmo drive must be in the remote mode, AF=1.
Screenshot from ELMO Application Studio:
🚀 You are done adding the ROKIT Motor to the ctrlX OS Motion App
Integrating the Axis Interface in the PLC Programm
3.1 Open ctrlX PLC Engineering, start a new project & connect to your ctrlX Core device
3.2 Right click on "Application" --> "Insert templates…"
3.3 In the tab "MotionInterface" choose the template "AxisInterface" and "Insert"
The scripts for the motion interface are added automatically.
3.4 "Log In"
There are several demo programs available that show how to use the axis interface in the PLC program.
3.5 Open one of them, right click on the variable "arAxisCtrl_gb" and "Add to Watchlist": (This is only used for debugging and understanding the required commands)
3.6 Underneath the sample programs, a visual overview of the axis is available. Open it with a double click on "OverviewAxes". Open the visual overview of axis 1 by clicking the arrows next to "Axis: 1"
3.7 In the "Axis Overview" of Axis_1 switch to "Velocity Mode"
3.8 Open the watch and check what happens to the variables when changing something in the visual overview of "Velocity Mode":
You can now write your own PLC program and use the arAxisCtrl_gb variable to write to the axis. With arAxisStatus_gb you can read variables from the drive.
As an example, here is a short PLC program where you can turn on and off the drive unit, send a velocity command to the drive unit and read its current velocity.
🚀 You are ready with integrating the ROKIT Motor in the ctrlX Solution and can proceed to develop your own Application 🚀
Attachments
Example Project I/O Engineering
Example Project PLC Engineering