Description
Description-Separate-1This is a simple example that shows how to use the C Interface for Shared Memory on a Linux NI Real-Time Hypervisor system. In this example, the program running on the Real-Time operating system (OS) will calculate the first 10 fibonacci numbers and write them to shared memory. Then the program running on the Linux OS will read them from shared memory and print them to the console.
Instructions
- Download and extract files from the attached SharedMemoryExample.zip file.
- fib.zip includes the LabVIEW Real-Time project that needs to be run from a Windows environment to deploy the Real-Time application.
- fib_linux.tgz includes the Linux application that should be transfered to the Linux OS of your NI Real-Time Hypervisor system.
- Extract fib.zip and fib_linux.tgz in the apppropriate locations (Windows OS and Linux on the hypervisor, respectively).
- On Linux:
- Compile the C code (the makefile is included in the download).
- Run the CreateSymLinks script as root.
- On Windows:
- Open the LabVIEW project.
- Change the IP address and name of the Hypervisor RT target in the project.
- Deploy the included VI (fib.vi) to your RT target.
- On Linux, run your now compiled application.
- The applications on Linux and RT will sync up and wait for each other.
- Look at the console to see the shared memory output.
Related Links
Product manuals: Quick Start Guide NI Real-Time Hypervisor
Description-Separate-2