This is a more complex demo to show how to make and configure a Motion control application, over EtherCAT network, with LogicLab.
You can download the Motion demo application project at the following link: DemoMotionUbuntuX64.rar.
This demo has been tested using the following resources:
– CPU: Intel i5 9400 @2.9GHz
– Ethernet device (used as EtherCAT master): Intel I210 gigabit network connection
– Operative System: Linux Ubuntu x64 18.04.3, with OSADL preempt RT 5.0.21-rt16
– One physical axis over EtherCAT: using a Kollmorgen AKD device
– Ten virtual axis
In this demo we have created an EtherCAT network for Motion control which we use to execute absolute movement, forward and backward, over both physical and virtual axis. Motion control functions libraries have been implemented by AXEL.
The application has been tested both on Ubuntu OSADL and Ubuntu XENOMAI; if you wish to use Ubuntu XENOMAI, please contact AXEL for further instructions.
On Ubuntu OSADL the execution time of each cycle is 1 ms; while on Ubuntu XENOMAI the execution time of each cycle can be setted to even 125 us.
The application can be controlled using web pages since LogicLab provides an integrated Web Server.
The following instructions show how to download and execute the demo application and give a general description of its content.
We recommend you to get acquired with the environment, reading page “Getting started” before trying out the demo.
Installation procedure
Open, compile and download project
Integrated configurator for EtherCAT and Motion
LogicLab provides an integrated configurator to handle both EtherCAT network and Motion control configuration.
In the demo application you can check the configurator going into resources tab: under the node “EtherCAT / Main network / AKD_Motion_1” you’ll find the configuration of EtherCAT network; under the node “Motion / EthAxis” you’ll find the configuration of the Motion for the physical axis.
The image on the right shows the location of both nodes.
Motion control code
An example of program code for Motion control is the PowerStageECAT program.
This is an FDB program which uses function blocks defined inside the motion libraries (implemented by AXEL) to handle the axis behavior.
Opening the library window (View -> Tool window -> Library tree) and selecting “Properties” from the context menu of a block, for example the MC_Power block (MC_Common -> API -> Others ->Right click on MC_Power), the properties window is opened showing the block’s prototype and useful notes on its usage.
The image on the right shows the PowerStageECAT program code and the MC_Power properties window.
Integrated Web Server
Thanks to the integrated web server, LogicLab provide a user-friendly web interface to handle montion control.
In order to open the web page, just insert your ubuntu machine ip address into the browser address bar; then select “Motion” from the available options.
The image on the right shows the page you should see; in order to start or stop the axis movement, just use the start and stop button.
Application benchmarks
AXEL provides different instruments to monitor an application exectuion results, such as the watch window, the oscilloscope, SoftScope…
As stated at the beginnign of the page, we have tested the application on both Ubuntu OSADL and Ubuntu XENOMAI, using the following resources:
Benchmark with Ubuntu x64 – OSADL
Typical | Peak | |
PLC Exec time | 6.5 us | 9.1 us |
PLC Jitter | 0.5 us | 6.8 us |
ECAT Jitter | 16.0 us | 57.0 us |
Benchmark with Ubuntu x64 – XENOMAI
Typical | Peak | |
PLC Exec time | 6.0 us | 8.6 us |
PLC Jitter | 1.5 us | 7.5 us |
ECAT Jitter | 2.0 us | 19.0 us |
On Ubuntu OSADL the execution time of each cycle is 1 ms; while on Ubuntu XENOMAI the execution time of each cycle can be setted to even 125 us.
The images on the right show benchmarks for Ubuntu x64 OSADL and XENOMAI monitored with SoftScope; click on the image to enlarge them and have a better view of the results.