To download NI software, including the products shown below, visit ni.com/downloads.
This code demonstrates how to transfer waveform data with a RT-FIFO without loosing the waveform attributes.
Description
You can use the RT-FIFO functions of the LabVIEW Real-Time Module to send and receive data deterministically between different parts of your VI. RT-FIFO functions provide a deterministic data transfer method that does not add jitter to a time-critical VI. A RT-FIFO can be used with many data types like bool, integer, double, array and waveform.
If you transfer waveforms with RT-FIFOs, the attributes of the waveform are striped of. This is the intended behaviour of RT-FIFOs:
http://zone.ni.com/reference/en-XX/help/370622P-01/lvrtvihelp/rtfifocreate/
"If you use an RT-FIFO to transfer waveform data, the variant element of the waveform does not transfer because variants are variable-sized and therefore incompatible with the RT-FIFO."
This VI demonstrates a work-around to the fact RT-FIFO VIs strip out waveform attributes. This is done by passing the waveform attributes to Front Panel elements and add the attributes back to the waveform.
Please keep in mind, that the attributes use the variant data typ. It can add extra jitter to your deterministical loop if you work with the variant data type within such a loop.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.