Using Simulink RT on development laptop to communicate with Beckhoff EK1100 module

13 views (last 30 days)
Hello everyone,
I am trying to assess if Simulink and my development laptop can be used to establish RT communication with an EK1100 Beckhoff module (containing in this first scenario 1x EL1008 and 1x EL2008 cards). The main objective is to create a simple dashboard where an engineer can include logic between IO's of the EK module. Simulink would then run "indefinitely", paced at 1s / 1s ("real-time" flow) to operate the system (I/O's are linked to a process).
I have a fair share of experience with Beckhoff products (PLC, motion ...) but I have never tried to simply use the I/O's block(s) without a Beckhoff PLC. From colleagues and internet I read Simulink and my laptop could replace it, but I am stuck :-P
My hardware situation looks like this:
My laptop has 1 ethernet port (physically accessible), where I deployed the EtherCAT driver. Its configuration looks like this:
Following the steps of this tutorial https://nl.mathworks.com/help/slrealtime/io_ref/hardware-setup-requirements-for-the-beckhoff-twincat-configurator.html, I was able to scan the EtheCAT network and obtain the ENI file for further development within Simulink (a.k.a. the TwinCAT XAE part was succesful ...).
The issue arises on steps 4 and 5, where SpeedGoat as target PC is mentioned. In my case, I do not want to separate development and target PC. I generate a simple Simulink model to test the ENI file with two blocks as displayed below:
The ENI file is recognized and I am able to "detect" the EL1008 first channel in the PDO Receive block. The solver is set to fixed-step / discrete with a timestep of 0.01 s (as defined within the Task in TwinCAT). This model runs without issues but the status bit for the EtherCAT state-machine (2nd bit of the status output) remains to 0 insted of climbing to the expected 8 value (OP) and the change of voltage on the DI is not transmitted.
My question is then: what I am missing here to obtain a functional system (e.g., read the value on the first DI) ?
My guess: the Ethernet Port Number is not right ... But I have absolutely no idea which port it is (as the master and the slave have some). What do you think ? :-)
I have browsed the web for a similar application but cannot seem to find one example or query related to it. If anyone has a guess, previous experience or clear answer on the viability of this concept, I would be grateful to hear about it.
Technical specs:
  • MATLAB 2022a
  • License for Simulink coder, Simulink RT (15-days trial)
Thank you in advance,
Thomas

Accepted Answer

Dimitri MANKOV
Dimitri MANKOV on 9 Nov 2023
Hi Thomas,
I'm afraid the EtherCAT blocks from the Simulink Real-Time library will not work on your desktop computer: Simulink Real-Time is indeed designed for Speedgoat hardware and vice versa, i.e., Simulink Real-Time models must be executed on Speedgoat hardware.
Best,
Dimitri
  1 Comment
Thomas Vandenhove
Thomas Vandenhove on 14 Nov 2023
Hi Dimitri,
I was afraid this answer would come up. Nevermind, I can convince my colleagues to switch to a true PLC platform ;-) Thank your for the fast answer !
Thomas

Sign in to comment.

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!