PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Single process shared variable w/o (without) FIFO between deterministic loop.

Solved!
Go to solution

Hi,

 

Why can't we use single process shared variable without FIFO for communicating between deterministic loop?  In other words, why it's always recommended to use FIFO for communications between deterministic loops?


Thanks,

Ajay.

--
Ajay MV


0 Kudos
Message 1 of 5
(4,993 Views)

Jitter.  When using non-FIFO communications, you introduce jitter into the system, making your deterministic loop not so deterministic.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(4,988 Views)

And.. Why that's so?  Why there is such jitter causing variable available?  We could always use variable with FIFO if the other non-FIFO vairable causes jitter, isn't it?  Is there any overheads in using non-FIFO variables when compared to FIFO variables?

 

Thanks,

Ajay.

--
Ajay MV


0 Kudos
Message 3 of 5
(4,983 Views)
Solution
Accepted by topic author Ajay_MV

It's called resource sharing.  When using a single process shared variable, only one thread can access it at a time.  So what happens is A tries to read, but B is busy writing to it.  So A has to wait, adding jitter.

 

With the RT FIFO enabled, you don't have this issue.  A can read from the FIFO at the same time that B is adding another element.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 5
(4,981 Views)

Thanks for the clarification 🙂

--
Ajay MV


0 Kudos
Message 5 of 5
(4,978 Views)