11-13-2022 03:50 PM
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.
Solved! Go to Solution.
11-14-2022 07:42 AM
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).
11-14-2022 08:43 AM
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.
12-05-2022 12:08 AM
My problem is fixed. Enabling RT FIFO on the NPSV setting was the solution. Thanks for help !