Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ert_linux in Matlab 2023a - No external mode #3

Open
robertobucher opened this issue Aug 21, 2023 · 4 comments
Open

ert_linux in Matlab 2023a - No external mode #3

robertobucher opened this issue Aug 21, 2023 · 4 comments

Comments

@robertobucher
Copy link

We had some old implementation of ert_linux used without problems with previous versions of Matlab and Simulink.
Now, we are using a previously defined template with ert_linux + Mex not inlined + external mode in matlab 2023a, but we can find out how to connect the scope to the rt running target.
The generated RT application runs as expected, but we can no more find the "connect to target button" on the simulink windows,

We tried different ways, using "hardware connection" + ert_linux, but without getting the "build" button or other ways to get our rt code...

@ppisa
Copy link
Collaborator

ppisa commented Oct 18, 2023

Hello Roberto, I overlooked the issue.

Matlab/Simulink has switched to some ribbon based infrastructure to install complete packages for individual targets and when target package is not installed then button is not shown. We need to find way how to package ert_linux that way... But it is complex and I need some advice from people who know better internals. The ribbon integration is marked as the issue #1.

As a wokaround we use own buttons directly in the diagram to build model, deploy it over SSH and connect to it.

See ert_linux_build

https://github.com/aa4cc/ert_linux/blob/master/ert_linux/ert_linux_build.m

and ert_linux_deploy_and_connect

https://github.com/aa4cc/ert_linux/blob/master/ert_linux/ert_linux_deploy_and_connect.m

which are included in the sample model

https://github.com/aa4cc/ert_linux/blob/master/model_samples/model_sample.slx

Best wishes,

Pavel

@robertobucher
Copy link
Author

robertobucher commented Oct 18, 2023 via email

@robertobucher
Copy link
Author

Hi Pavel

in order to run ert_linux in Matlab we had to install the ert_linux package into the local folder, which in our case is

home/stud/Documents/MATLAB/SupportPackages/R2023a/toolbox/realtime/targets/ert_linux/

Then in Simulink we use

Apps -> Embedded coder
Settings
• Hardware Implementation
◦ -> Intel / X86-64 linux
◦ -> Determine by Code Generation system target file
• Code Generation: ert_linux.tlc
• Code Generation -> Interfaces
◦ Check External mode
▪ TCP/IP : ‘127.0.0.1’
◦ Advanced parameters : support inline mex files

For code generation we runs

image

I hope this can help

@ppisa
Copy link
Collaborator

ppisa commented Oct 19, 2023

Thanks, I will check it sometime. Anyway, some solution with packaging would help in long term perspective...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants