Enable Continuous Streaming on Default Example Project for FlexRIO Devices

Updated Dec 2, 2021



  • PXIe-5785


  • FlexRIO

The default example project for NI FlexRIO devices available in NI Example Finder (Getting Started FlexRIO Integrated IO) demonstrates the implementation of finite streaming only. This is mainly because of the throughput limitations of the PCIe bus and the ability of the host to handle a large amount of continuous data. However, depending on the user requirements, like peer-to-peer streaming (which requires additional FPGA modifications as well), continuous streaming can also be enabled. This article will explain the steps needed to perform it.

The default example project contains several host VIs for various needs starting from basic operation to TClk based synchronization examples. The following modifications are required on the host code of these examples to enable continuous stream.
  1. Open the host VI (Basic or Synchronized) and find the “Configure Stream.vi” in the configuration code.
    1. image.png
  2. Open the “Configure Stream.vi” and observe the first VI in it is “Configure Stream Finite.vi”. In the current FlexRIO API library, there is no similar equivalent for the continuous one. Therefore, we would need to modify the “Configure Stream.vi”. As it is part of the library, it is recommended to make a copy that should be included within the modified project.
  3. On the copy of “Configure Stream.vi”, replace the “Configure Stream Finite.vi” with the below property nodes. The other VI, i.e., “Configure Stream Enabled Channels.vi”, does not change. The property “TClk API Control Enabled” has to be set true only if synchronization of multiple devices via TClk is intended.
    1. image.png

Additional Information: 
  • The default example project for NI FlexRIO devices may not provide user-configurable decimation. Therefore, streaming continuously at the full rate may lead to FIFO overflows. It is recommended to add this decimation if continuous streaming is desired.
  • If the purpose is to stream the data from NI FlexRIO devices to another co-processor, the user will need to modify the default FPGA code.
  • For the correct functionality of peer-to-peer (P2P) APIs, the default 'target to host' FIFOs on the FPGA should not be removed. The P2P APIs have their code coupled with these FIFOs and may result in error in case of removal. Our recommendation is to keep them in the FPGA code even if unused.