Acquiring Data from an NI 9225/9229/9239 (FPGA Interface)

CompactRIO

Acquiring Data from an NI 9225/9229/9239 (FPGA Interface)

The NI 9225/9229/9239 has analog input channels that are sampled simultaneously at the data rate for which you have configured the module. Use the Start and Stop channels of the NI 9225/9229/9239 to put the module in and out of acquisition mode. In acquisition mode, the NI 9225/9229/9239 can only acquire data. You can use the FPGA I/O Node to read the data from the module. You cannot perform other operations with the NI 9225/9229/9239, such as accessing properties, while the module is in acquisition mode.

Note  You must create FPGA I/O items for the NI 9225/9229/9239 before you can configure the items using the FPGA I/O Node.

Putting the Module in Acquisition Mode

Configure an FPGA I/O Node with the Start channel of the NI 9225/9229/9239. Wire a Boolean constant set to TRUE to the Start input of the FPGA I/O Node to send a synchronization pulse to the module. The module starts acquiring data at the data rate you configure.

Reading Data from the Module

When the module starts acquiring data, you can use an FPGA I/O Node to read data from the module. You can connect the AI output of the FPGA I/O Node to various types of functions, including an FPGA Memory function or an FPGA FIFO function. If you read from multiple channels on the module, place the channels in the same FPGA I/O Node to ensure that the VI reads the data synchronously.

Because the NI 9225/9229/9239 internally acquires data at a specified rate, the FPGA I/O Node does not return data until new data has been acquired by the module. If the NI 9225/9229/9239 did not start acquiring data or stops acquiring data while an FPGA I/O Node is waiting for data from the module, the FPGA I/O Node returns a timeout error.

Exiting Acquisition Mode

Configure an FPGA I/O Node with the Stop channel of the NI 9225/9229/9239. Write a TRUE to the Stop input. The module is no longer in acquisition mode and now you can access NI 9225/9229/9239 properties.

Examples

Refer to the NI 9225 Getting Started (FPGA) VI in the labview\examples\CompactRIO\Module Specific\NI 9225\NI 9225 Getting Started directory for an example of reading from the NI 9225.

 Open NI 9225 example

Refer to the NI 9229 Getting Started (FPGA) VI in the labview\examples\CompactRIO\Module Specific\NI 9229\NI 9229 Getting Started directory for an example of reading from the NI 9229.

 Open NI 9229 example

Refer to the NI 9239 Getting Started (FPGA) VI in the labview\examples\CompactRIO\Module Specific\NI 9239\NI 9239 Getting Started directory for an example of reading from the NI 9239.

 Open NI 9239 example