02-08-2018 03:31 AM
Hello,
i am relatively new to LabView and cRio. I want to build a position control with a position sensor and a valve to position a hydraulic cylinder.
Right now i have an UI running on Windows and the control loop (Timed Loop) on cRIO. With the UI i send messages and values to the cRIO, like update the PI controller parameters, via a queue and network stream (Producer consumer). When i start up the UI i want to get the actual values on cRIO to my UI. I could send a message "get values" to cRIO and the cRIO could answer with a message and the values. But i also want them to be continously monitored, so i could send "get values" message in a loop.
A second (easier) option i found is using network published shared variables for updating the UI and only sending new values (infrequently) from UI to cRIO via messages. What is your opinion about this problem?
Solved! Go to Solution.
02-08-2018 04:03 AM
Use another network stream for sending data back to the PC. No real need to request it, just have the cRIO update at a specific rate.
Shared Variables are simple, but I have found them to be really slow and problematic.
02-08-2018 04:37 AM
Thanks for your answer! I get what you mean. Should i bundle my actual values to a cluster or array and send them over the same network stream?
I think too many network published shared variables are used in the example projects...
02-08-2018 05:16 AM
wrote:
Should i bundle my actual values to a cluster or array and send them over the same network stream?
I would probably go the cluster route just to make sure both sides know what the data is. If most of the data does not change often, another way would be to only send the values when they update and so you have a string and data cluster you send, the string saying what the data is.