Understanding Loop Timing for the NI 9225/9229/923x (FPGA Interface)

CompactRIO

Understanding Loop Timing for the NI 9225/9229/923x (FPGA Interface)

The NI 9225/9229/923x is internally timed. Do not use the Loop Timer or Wait functions in a loop with an FPGA I/O Node that acquires data from an NI 9225/9229/923x. When you create a loop that reads data from an NI 9225/9229/923x, make sure the loop does not execute slower than the data rate of the NI 9225/9229/923x. If the loop execution time is slower than the NI 9225/9229/923x data rate, the FPGA I/O Node returns an overrun warning and continues to read NI 9225/9229/923x data. The overrun warning means that the data the FPGA I/O Node returns is valid, but the function missed one or more data points since the last time it read data from the module. The function returns the overrun warning when all of the following conditions are true:

  • The NI 9225/9229/923x is in acquisition mode.
  • An FPGA I/O Node that is acquiring data from the NI 9225/9229/923x executes at least once after you put the module in acquisition mode.
  • The FPGA I/O Node did not read one or more data points since the previous time the function executed.

If the application acquires multiple buffers of data from an NI 9225/9229/923x and the timing relationship between them is not important, you can ignore the overrun warning returned with the first point of each buffer.

To avoid overrun warnings, develop the FPGA VI to meet the following guidelines:

  • Reading from multiple NI 9225/9229/923x modules in the same loop—Use one FPGA I/O Node to read the NI 9225/9229/923x channels. You also must configure the NI 9225/9229/923x modules to share a master timebase source and have the same data rate.
  • Reading from the NI 9225/9229/923x and a different analog input module in the same loop—If the rate at which you can acquire data from the other C Series module is as fast or faster than the data rate configured for the NI 9225/9229/923x, you can read from both modules in the same loop. If you use the same FPGA I/O Node to read data from the modules, the FPGA I/O Node does not return data for the other module until the NI 9225/9229/923x acquires data. However, if the module has a slower data rate than the NI 9225/9229/923x and you read from the modules in the same loop, the FPGA I/O Node for the NI 9225/9229/923x returns an overrun warning and continues reading data. To avoid missing data, you can either change the data rate of the NI 9225/9229/923x or read from each module in a different loop.