Matlab Runtime in NI Linux distro, for real-time code deployment with a CompactRIO target

12 Ansichten (letzte 30 Tage)
I'm interested in deploying Matlab code into a National Instruments CompactRIO system. We've already achieved to succesfully run simulink models on it. Nonnetheless, there is very little information, only 1 example online I believe, on Matlab code generation for NI targets, as can be linux-based CompactRIOs. As I understood, for the proposed approach based on .NET assemblies, Matlab Runtime is completely required to be installed in the target machine, in our case, a CompactRIO.
Is it possible to install Matlab Runtime in a linux-based CompactRIO, is there any recommendations? If not, is there any other approach (not based on .NET) to embedd matlab code into a linux-based CompactRIO?
Maybe another approach is to have Matlab Runtime installed in an external machine or virtual machine only for the CompactRIO to access via some communication protocol. Would this be a good approach? Can Matlab Runtime queries be re-addressed??
Thanks in advance.

Antworten (1)

Pratyush
Pratyush am 15 Jul. 2024
Hi Pol,
Deploying MATLAB code directly onto a Linux-based National Instruments (NI) CompactRIO system is challenging due to limited support for MATLAB Runtime on such devices. Here are some alternative approaches which might help you in this case:
  • Use Simulink Coder and Embedded Coder to generate C/C++ code from Simulink models, which can be deployed to CompactRIO.
  • Use MATLAB Coder to generate standalone C/C++ code from MATLAB code, then compile and deploy it to CompactRIO.
  • Run MATLAB Runtime on an external machine and communicate with CompactRIO via a network protocol (e.g., TCP/IP, UDP), though this may introduce latency and reliability issues.
I would suggest you to:
  • Leverage Simulink Coder and Embedded Coder for code generation if already successful with Simulink models.
  • Explore MATLAB Coder for converting MATLAB code to C/C++.
  • Consider using an external machine with MATLAB Runtime for non-critical real-time performance, ensuring robust communication protocols.

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by