From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,991 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,986 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,981 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,979 Views)

Thanks for the clarification 🙂

--
Ajay MV


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