For maximum performance, the RT FIFO VIs do not check for existing errors. To prevent execution with an error present:
LabVIEW 8.0 and prior: You can modify the RT FIFO VIs to use a case structure that examines an error input. If an error occurs, then one case can simply pass the error through the case structure without executing any other code. If no error occurs, then the other case can execute your code.
LabVIEW 8.2: RT FIFOs are LabVIEW primitive functions in LabVIEW 8.2 and newer. Primitives are VIs that have been optimized for performance, and do not have an exposed block diagram. The previous workaround must be implemented in a separate subVI.
LabVIEW 8.6 and later: Real-Time FIFO VIs have been replaced with Real-Time FIFO Functions. Real-Time FIFO Functions do not ignore errors and provide standard error in functionality.
If the array is the proper size, then this is similar to no operation. If the array is not the correct size, then memory allocation will occur. To avoid memory manager calls, which introduce jitter, make sure that the arrays passed in are always the proper size.
An RT FIFO pre-allocates memory to create bounded FIFOs. This makes for a more stable and deterministic RT system. You can set the size of the FIFO before execution so that data will not be overwritten. The RTFIFOCreate.vi includes a size input. If it is not possible to know how much memory to pre-allocate, then send the data back to a host controller and use an unbounded FIFO on the host or use Real Time Shared Memory VIs.
Functionally, RT FIFOs and LabVIEW Queues are both First-in, First-out buffers. However, the following are the major differences between them:
Shared Variables with RT FIFO enabled creates an invisible low priority communication thread. This thread allows the high priority threads to access the shared variables uninterrupted. When the Real-Time system is free from the high priority thread, it then manages the shared variables. Shared Variables with RT FIFO enabled and RT FIFO VIs differ in the following ways:
The main benefit of Shared Variables with RT FIFO enabled is that they are much easier to configure, and that they avoid cluttering the block diagram with create/destroy Vis and extra wires to pass refnums. A benefit of using RT FIFO VIs is that they are backwards compatible with LV 7.x and earlier (Shared Variables were added in LabVIEW 8.0).
You can use the LabVIEW synchronization functions in RT. However RT FIFOs were built for RT systems. Using the functions available in the Synchronization palette implies the inclusion of shared resources deliberately. We avoid synchronous behavior in RT because synchronous operations require handshaking. Handshaking is always jittery since it uses an interrupt mechanism, and you can find yourself against a deadlock or a race condition if you are not careful of how you program synchronization.