LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Run a Simulink-Generated Model in Real-Time on cRIO (NI Linux RT x64)?

Hi everyone,

I'm trying to run a Simulink model in real time on a CompactRIO (cRIO) that runs NI Linux Real-Time x64. The model is built in Simulink using Simulink Coder and Embedded Coder.

 

My setup:

  • Target: cRIO-9045 (NI Linux Real-Time x64)

  • Host PC: Windows 10

  • LabVIEW: 2021 32-bit

  • LabVIEW Real-Time Module: installed

  • MATLAB/Simulink (2023b) with Simulink Coder and Embedded Coder

What I want to achieve:

  • Run a Simulink-generated model on the cRIO in real time

  • Without rewriting the model in LabVIEW or using VeriStand

  • I’m looking for a workflow that allows me to integrate the model execution into LabVIEW RT or the cRIO system in general

What I’ve figured out so far:

  • The Model Interface Toolkit is not an option for cRIO targets as it is only available for LabVIEW 64-bit but this is not supported for RT targets, so I’m using LabVIEW 2021 32-bit

  • I considered calling a compiled shared library (.so) from LabVIEW RT via the Library Function Node, but I haven’t been able to retrieve the .so file from the Simulink build process

  • I haven’t yet managed to cross-compile for NI Linux RT x64 from my Windows machine using the NI toolchain

  • I’m aware that the .so must be compiled specifically for NI Linux RT x64 to be usable on the cRIO

My questions:

  1. Has anyone successfully run a Simulink-generated model on a cRIO in real time (without VeriStand)?

  2. Is there a reliable way to generate a .so from Simulink that can be used on NI Linux RT x64?

  3. If not via the Library Function Node, are there other methods to execute a Simulink-generated model on the cRIO?

  4. Are there example projects or workflows available for this kind of integration?

I'm open to any working approach!

Thanks in advance for any advice or shared experience!

 

Nick

0 Kudos
Message 1 of 3
(192 Views)

The Model Interface Toolkit 2021 is an awkward version. VeriStand was migrated to 64-bit platform hence it only supports 64-bit LabVIEW. However, LabVIEW Real-Time module does not support cRIO development until 2022 Q4.

 

What I sugggest:

Use LabVIEW 2020 32-bit and you can use LabVIEW Model Interface Toolkit.

Then

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
Message 2 of 3
(154 Views)

Hi

 

ZYOng's statement is documented in this NI knowledge article :

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000wyyWCAQ

 

LabVIEW 2021 or Later Versions

LabVIEW Real-Time Module 64-bit is available as of version 2021, however, it only supports the following subset of the hardware supported in the 32-bit version:

 

  • Real-Time Desktop
  • Real-Time FlexRIO
  • Real-Time PXI

For support of other real-time hardware, such as CompactRIO, install both LabVIEW and LabVIEW Real-Time Module versions you will use, but make sure that they are 32-bit. 

 

Or you can install CompactRIO 2022 Q4 as this is the first version that supports LabVIEW RT 2022 64-Bit and LabVIEW FPGA 2022 64-Bit.

 

Regards

Message 3 of 3
(142 Views)