LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the difference between a single process shared variable and a single process shared variable with real time single element FIFO enabled.

When configuring a single-process shared variable, what happens when I select the "enable real-time FIFO" option and I select "Single Element"?
 
It is not really a FIFO because it only has a single element. So what is the difference if activate or don't activate the RT-FIFO (single element) option? 
 
 
0 Kudos
Message 1 of 4
(4,051 Views)
Hi Matty,

You can change the array size of this "single element" so that it contains multiple elements. Does this help?
Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 2 of 4
(3,994 Views)
Hi,
 
No, I don't want multiple elements.
 
My question is "What is the difference between a single process shared variable and a single process shared variable with the real-time FIFO (single-element) option enabled.
 
What functionnality does it add to the shared variable? Why does this option exist?
 
Regards,
 
Matt
0 Kudos
Message 3 of 4
(3,992 Views)
Matt,

The single-process shared variable (non RT FIFO) is basically a global variable, while the RT FIFO version uses a different mechanism to pass data, similar to the RT FIFO VIs. The RT FIFO version is designed so that a reader will not block a writer or vice versa. This allows you to have a time critical thread that writes to the variable and a different thread that reads from it without causing resource contention. The non RT FIFO variables have protection built-in, that is, they if you are reading in one loop it will block any other access to that variable.

I hope that helps. You can read more about shared variables here.

G
Message 4 of 4
(3,950 Views)