Solution
This error can occur if you have not manually set the program mode. You can get and set the program mode three different ways: programmatically, through and NI Measurement and Automation Explorer (MAX) or LabVIEW Project.
Programmatically
The NI-DAQmx device driver support for the CompactRIO controllers includes properties that allow to programmatically read and set the Module Programming Modes for slots. To interact with these properties, also needed to install the
NI System Configuration.
Attached below are VIs to get and set the Module Property Mode (
Get Programming Modes.vi and
Set Programming Modes.vi), as well as a higher-level VI to save Module Programming Modes to a file and retrieve them from that same file at a later date. You can also find an example in the LabVIEW Example Finder called
904x Basics-Mode Switching.
DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the
Sample Code License Terms.
NI MAX
Reference section 1 of the Using CompactRIO with the NI-DAQmx API,
Select the Appropriate Programming Model, to see how to set the program mode for your modules.
LabVIEW Project
To deploy the correct program mode in LabVIEW, open the LabVIEW Project window, Right-click Module and click
Deploy.