[Etherlab-users] Communication in External Mode in Simulink
Dr.-Ing. Wilhelm Hagemeister
hm at igh.de
Fri Oct 18 15:11:54 CEST 2024
Hello Laurens,
we haven't implemented the external mode of Simulink up until now, but
have separate tools to communicate with the realtime process.
For tuning parameters and showing channels one can use Testmanager(ng):
https://build.opensuse.org/package/show/science:EtherLab/testmanager-ng
or the legacy testmanager which is deprecated but still works.
The executable runs under all Windows versions and with "wine" also
under Linux.
https://build.opensuse.org/package/show/science:EtherLab/testmanager-legacy
For data recording one can use:
https://build.opensuse.org/package/show/science:EtherLab/DLS
Sources can be found here:
https://gitlab.com/etherlab.org/
If you want to support in realizing the external mode of Simulink I
would be very happy.
Maybe the code from Moritz Schappler: https://github.com/SchapplM (you
mentioned) is a starting point.
Best regards
Wilhelm Hagemeister
Am 18.10.24 um 13:43 schrieb Laurens Jacobs:
> Dear EtherLab users and developers
>
> I'm currently setting up a real-time Linux machine to be used with a custom EtherCAT slave. So far, I have successfully installed and configured the EtherCAT master, PdServ, and the EtherLab library for use with Simulink. I had to make some minor changes in the includes of the build configuration to make things work, but I'm at the point where I can build a Simulink model for stand-alone use and run it on my machine. I can verify by my external hardware the executable is doing exactly what it is supposed to do, so that's great. I can also build the Simulink model for 'monitoring and tuning', which is what I eventually would like to do in order to log data and change parameters online. The build process for that also works fine, but whenever I try to "connect" to the target hardware (which is the real-time Linux machine itself essentially), it throws the following error:
>
> > External mode MEX-file 'noextcomm' does not exist or is not on the MATLAB path. Note that the MEX-file name entered should not have a file extension.
>
> I was wondering if anyone has experienced this issue before and knows how to resolve it. I read that it is a known issue (see, e.g., <https://github.com/SchapplM/etherlab-examples/blob/master/SETUP_ETHERCAT.MD#meldung-external-mode-mex-file-noextcomm>, which I also used as a guideline to configure my Simulink model parameters) but there is no real root-cause mentioned, nor do the suggestions listed there resolve the problem. Apart from that link, there seems to be little information to be found online about this issue. I'm willing to further debug the problem myself, but it is unclear to me how this 'noextcomm' binary is used - I can't find any references in the source or header files in the MATLAB root, nor in the EtherLab source files. If anyone has any pointers in that direction, sharing them would be greatly appreciated. I will also get in touch with Mathworks support to see whether they can shed a brighter light on this (as there is not much about it in the documentation).
>
> For the sake of completeness, here are the versions I'm using:
> - EtherCAT Master 1.6.1 (release, 419f6216)
> - PdServ at the latest master branch (f3195b28)
> - EtherLab at the latest master branch (8dfa661f)
> - MATLAB 9.7.0.1737446 (R2019b) Update 9 + Simulink version 10.0
> - Linux 6.1.112-rt43 #1 SMP PREEMPT_RT
>
> Best regards
> Laurens
>
> --
> Laurens Jacobs | Postdoctoral researcher - Mechatronics & control systems
> http://www.mech.kuleuven.be/meco
> Division RAM, Dept. of Mechanical Engineering, KU Leuven
> laurens.jacobs at kuleuven.be, +32 16 37 35 44
More information about the Etherlab-users
mailing list