Showing results for 
Search instead for 
Did you mean: 

Delay between writing on windows and reading on MyRio shared variable data.

Go to solution

Hello, I am using a simple Vi on my main system to aquire keyboard input data and then wiring it into a shared variable. I then use the same variable on MyRio Vi to read the keyboard data. My problem here is that there is siginificant delay between writing and reading, when I press a key it immediatly writes to the variable but takes sometime (around 1.5 seconds) to be read by the myrio. In the shared variable setting (it is network shared), I am not using buffering or any special settings. The keyboard data aquired with aquired input data block is array of unsigned 16 bit integers. My two Vis are shown below. I hope you can help me with this.

Download All
0 Kudos
Message 1 of 4

I've not had consistent behavior with Shared Variables.  I essentially abandoned them almost a decade ago (before myRIOs, but with the PXI platform) for Network Streams.  Now that I have some myRIO experience, I continue to use Network Streams (I believe I might have tried Shared Variables with myRIO, I'm not 100% certain, but if so, I've again abandoned them).


Bob Schor

0 Kudos
Message 2 of 4

What you are describing is consistent with my experience with Network Published Shared Variables.  They are slow, usually due to a timeout being required before the data is written to the shared variable server.  Use direct TCP communication to pass your data back and forth.  I prefer using the raw TCP primitives.  Many here prefer Network Streams.  Either one will be a lot more performant than NPSVs.

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 3 of 4
Accepted by Bob_Schor

My problem is fixed. Enabling RT FIFO on the NPSV setting was the solution. Thanks for help !

0 Kudos
Message 4 of 4