Solution
There is no built-in integration for the NI-FlexRIO driver in LabWindows/CVI as there is for the FPGA Interface C API. However, we can do this manually. The FlexRIO C API does support FAM control which should be used in conjunction with the FPGA C API. To get the FlexRIO C DLL and the header file, you will need to have the
NI-FlexRIO driver installed.
The "
niflexrio.h" header file should install to directory
C:\Users\Public\Documents\National Instruments\FlexRIO and the "
niflexrio.dll" DLL file can be found at
C:\Windows\SysWOW64 or
C:\Windows\System32.
The function
NiFlexRio_FamControlPower should be used to control the FAM power. See the following screenshot of the function prototype in the
niflexrio.h header file.

The best approach to manually add FlexRIO driver support to your LabWindows/CVI application is to
implicitly link the DLL to your C application. Follow these steps to properly import niflexrio in your LabWindows/CVI project:
- Create an import library file (.lib) from the FlexRIO DLL by following the steps from How Do I Create Import Libraries for a DLL in LabWindows™/CVI™ article. In the dialog box that will show up, you can keep both checkboxes unchecked.
- Add your newly created .lib file to your project, as explained in the Linking to DLL Defined Functions from LabWindows™/CVI™ article.
- Add #include "niflexrio.h" to your main code.
- Call the function NiFlexRio_FamControlPower, refer to the header file to learn more about the parameters and the returned value.
An example of the C code to call the NiFlexRio_FamControlPower function would look like the below snippet.