フィルターのクリア

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

25 ビュー (過去 30 日間)
Pol Cardona Rubio
Pol Cardona Rubio 2024 年 4 月 8 日
回答済み: Pratyush 2024 年 7 月 15 日 8:23
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.

回答 (1 件)

Pratyush
Pratyush 2024 年 7 月 15 日 8:23
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.

カテゴリ

Help Center および File ExchangeApplication Deployment についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by