Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Data exchange between Windows and cRio

Solved!
Go to solution

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?

 

0 Kudos
Message 1 of 4
(2,518 Views)
Solution
Accepted by topic author Juko

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.


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 2 of 4
(2,506 Views)

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...

0 Kudos
Message 3 of 4
(2,500 Views)

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.


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 4 of 4
(2,496 Views)