This example, based on the Distributed Control and Automation Framework (DCAF), illustrates data sharing between C/C++ and LabVIEW applications, running in parallel on NI Linux RT hardware targets, using Linux shared memory. The LabVIEW Real-Time (LVRT) application example creates Linux shared memory as the interface to other processes.
This example demonstrates how C and LVRT applications can share scanned single point data from hardware I/O of NI Linux RT CompactRIO (cRIO) hardware using Linux shared memory. The example LabVIEW Real-Time (LVRT) application uses NI Scan Engine on NI CompactRIO (cRIO) for scanned hardware I/O data access, and creates Linux shared memory as the interface to other processes. The LVRT application uses the Distributed Control and Automation Framework (DCAF), and implements a semaphore Linux IPC mechanism as a timing signal to enable synchronous execution of a complimenting example C application.
Hardware
* The project can be modified to use any NI Linux RT target.
Software
The DCAF Linux Shared Memory example, as well as supporting components can be installed directly from VI Package Manager.
Instructions for the example can be found at: Linux Shared Memory and DCAF Example
DCAF Shared Memory Module Documentation
Linux Shared Memory and DCAF Example Tutorial
A Match Made in Memory - C/C++ and LabVIEW RT Inter-Process Communication on NI Linux RT (NIWeek 2017 Session)