LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bind to scan engine variable

Solved!
Go to solution

I have the attached labview project, settings on a shared variable and block diagram.  In my project I have a cRio that is using scan engine and reporting some RTD temps.  in My Computer I have a shared variable that I aliased to the scan engine variable on the cRio.  I thought this would make it so the shared variable on myComputer would report out the same as the scan engine variable on the cRio; however, that is not the case.  In the front panel you can see I get 0 for the myComputer shared variable while getting the correct value from the cRio scan engine variable.

 

Does binding a variable to a scan engine variable mean it will keep the same value?  Do I need to do anything extra?  I want to do it this way becuase I have a VI that finds all variables in the SystemParameter.lvlib file and does some stuff with them.

 

mstsc_2016-04-29_15-22-11.png

0 Kudos
Message 1 of 3
(2,841 Views)
Solution
Accepted by topic author GreenRiver

Hey GreenRiver

 

If I am understanding correctly, you are binding the network variable to the indicator ProcessInRTD. If you put this code in a while loop with a stop button, what happens? You may have a race condition here, where it reads the network variable and puts it to that indicator, and then reads the temperature from the device and outputs that to the RTD indicator. 

 

One suggestion I have is to just wire the output from the I/O function into the network variable inside a while loop. Then, on your host VI, read the network variable. 

Message 2 of 3
(2,767 Views)

You were right, it was a race condition happening after the variables are deployed.  I get the correct operation after just a moment.

0 Kudos
Message 3 of 3
(2,758 Views)