Introduction to LogicLab – Motion demo

LogicLab is an integrated development environment (IDE) full compliant with the IEC 61131-3 standard.
Always striving to offer edge-cutting solutions, LogicLab can boast a lot of useful features for PLC developers, besides a very user-friendly interface and the support for a wide range of processors and communication protocols.
Thanks to LogicLab, it is possible to turn into completely operational PLC any kind of hardware, from the simplest to the most powerful, there’s no system requirements. It is also possible to use virtual target to turn computer into PLC.
AXEL, other than LogicLab, offers a complete suite of software solutions, able to cover every aspect of PLC developing.

 

For the demos and instructions described in these pages, you can use the following download links:
– LLExec for Ubuntu x64: LLExecUbuntuInstaller v. 2.21.7

Motion demo application

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

  • Follow instructions indicated in page “Getting started”, at the “Install procedure – LLExec” paragraph and “Intall procedure – LogicLab” paragraph, to install LogicLab and LLExec for Ubuntu x64.
    Since this application is using EtherCAT, make sure to select a valid device to be used as EtherCAT master when installing LLExec.
  • On your linux machine, after installation, you also have to set up a dummy static IP address (for example 1.2.3.4) for the Ethernet device selected to work as EtherCAT master.
    The image on the right shows the location to set such information.

Open, compile and download project

  • Download the demo application and extract it to the desired location
  • Now launch LogicLab but, instead of creating a new project, choose to open an already existing project and select the DemoMotionUbuntu64.plcprj.
  • For connecting to the target, please, follow instructions indicated in page “Getting started”, at the “Connecting to the target” paragraph
  • For compiling and downloading the application, follow instructions indicated in page “Getting started”, at the “Compile, download and verify” paragraph
  • Now the output status, in the bottom-right border, should display SOURCE OK and CONNECTED

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:

  • 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

 

 

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.

Benchmark with Ubuntu x64 – OSADL

Benchmark with Ubuntu x64 – XENOMAI

For any information