Begin by creating a new project in LabVIEW, where you will manage your code and hardware resources.
Note: If your system is not listed, LabVIEW could not detect it on the network. Ensure that your system is properly configured with a valid IP address in NI MAX. If your system is on a remote subnet, you can also select to manually enter the IP address.
If you don't have hardware yet but want to start programming, Select New target or device, then expand Real-Time CompactRIO, and pick a model with specifications to fit your requirements.
To select the appropriate programming model, it is important to understand how the data is transported from the physical input and output ports on the target to the processing components. When using a CompactRIO there are two ways to access I/O, and when using a CompactRIO with NI-DAQmx, there are three ways to access I/O:
The programming mode is indicated by the text next to the module in the LabVIEW project.Real-Time (NI-DAQmx) Mode – CompactRIO with NI-DAQmx is the latest addition to the CompactRIO controller family. It brings two software experiences into one by combining the ease of use of NI-DAQmx and the low-level functionality of LabVIEW FPGA. It also simplifies system architectures by bringing the latest in synchronization and control technologies to the CompactRIO platform. To program a C Series module in this mode, place it under the Real-Time Resources folder in the LabVIEW project.Real-Time Scan (I/O Variable) Mode – this option allows you to program the real-time processor of your CompactRIO system, but not the FPGA. In this mode, NI provides a pre-defined personality for the FPGA that periodically scans the I/O and places it in a memory map, making it available to LabVIEW Real-Time. CompactRIO Real-Time Scan Mode is sufficient for applications that require single-point access to I/O at rates of a few hundred hertz. To program a C Series module in this mode, place it under the Real-Time Scan Resources folder in the LabVIEW project. To learn more about scan mode, read the Using CompactRIO Scan Mode with NI LabVIEW white paper and view the benchmarks.LabVIEW FPGA Interface Mode – this option allows you to unlock the real power of CompactRIO by customizing the FPGA personality in addition to programming the real-time processor, achieving performance that would typically require custom hardware. Using LabVIEW FPGA, you can implement custom timing and triggering, off-load signal processing and analysis, create custom protocols, and access I/O at its maximum rate. To program a C Series module in this mode, place it under the FPGA target in the LabVIEW project.LabVIEW will now attempt to detect the chassis and C Series I/O modules present in your system and automatically add them to the LabVIEW Project. Once your system has been added to the LabVIEW Project, proceed to either the Real-Time Scan Mode Tutorial or LabVIEW FPGA Tutorial below, depending on which programming mode you selected.
This section will walk you through creating a basic monitoring application on CompactRIO using scan mode. If you chose to use the LabVIEW FPGA Interface, see the LabVIEW FPGA Tutorial below. You should now have a new LabVIEW Project that contains your CompactRIO system, including the controller, chassis, and C Series I/O modules. In this tutorial we will be using an NI 9211 Thermocouple input module; however, the process can be followed for any analog input module. You can also download the solution on this page
Now, we will create a host VI that can run on a remote machine and communicate with this embedded application.
The host VI in this example could be placed on any computer on the network to monitor the embedded application running on CompactRIO.
Congratulations! You have successfully created an embedded monitoring application with LabVIEW and CompactRIO. To continue learning, check out the additional resources at Getting Started with LabVIEW FPGA .
This section will walk you through creating a basic high-speed remote monitoring application on CompactRIO using LabVIEW FPGA. You should now have a new LabVIEW Project that contains your CompactRIO system, including the controller, chassis, FPGA, and C Series I/O modules. In this tutorial we will be using an NI 9205 analog input module; however, the process can be followed for any analog input module. You can also download the solution from this page.
This VI will run on the real-time controller and communicate with the network to publish the acquired data.
Now, we will create a host VI that can run on your development PC or a remote machine and communicate with this CompactRIO application.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.