ni.com is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

Example Code

NI 573X Configuration API

Code and Documents

Attachment

The 573X IO Modules have configurable compnents that can be accessed through a User Command interface provided in the CLIP for each module.  The parameters that can be configured are gain, filtering, sample clock, coupling, and dither.  Each setting is represented by a different command and associated data, which is outlined in a table from the CLIP reference (below).  Since these are settings that many users may take advantage of, this API was created to provide a clean, reusable interface.

2013-06-20_1019.png

This API is based on the Clock Select VI found in the NI 573X Clock Select Example Project.  A simple example of the API's use is included in <LabVIEW>\user.lib\NI 573X Configuration API\example.

Since all of the 573X IO Module Settings (Gain, Filtering, etc.) are set using the same mechanism, a common VI must be added to the top level FPGA VI.  For the API to function correctly, the VI in User Libraries » NI 573x Configuration API » FPGA will need to be added to the block diagram and wired with controls.  This is shown in the example code.

2013-06-20_1031.png

The Host API contains a separate VI for each setting, and each VI has an enum which clearly identifies the selection for each setting (i.e. AC/DC coupling vs. User Command 0/1).  Additionally, the first VI in the code below waits for the IO Module to complete initialization before continuing with any host code or configuration.

2013-06-20_1022_001.png

It should also be noted that the FlexRIO Instrument Development Library (FIDL) contains a more general interface to perform these actions as well.  Additionally, the Example Instrument Driver (EID) for the 573X contains this same functionality.  If you plan on doing FlexRIO development, please take a moment to look over these resources as well to see how they might be able to increase your code reuse and help improve your development time.

NOTE: This API is installed into your LabVIEW development environment using VI Package Manager™ (VIPM). VI Package Manager is an installer for LabVIEW VIs and toolkits. It places VIs directly into the palettes, allows you to install VIs into multiple LabVIEW versions, and ensures that any dependency VIs and toolkits (provided in other VI packages) are also installed. VI Package Manager is a product and trademark of JKI Software.

Drew T.
Camber Ridge, LLC.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
jonathan_juan
Member
Member
on

We found something strange in test program. The original code should be modified. We compared the code below.

CONFIG_MODIFY.JPG

stopreal
Member
Member
on

After I used VI Package manager to install NI 573X Configuration API, I tried to run the example code of the configuration. Unfortunately, there were some error in Configuration Complete.vi, saying that IO module is not configured before the specific timeout. Do anyone have ever encountered the similar problem?

NI 573X configure.png

Contributors