05-02-2016 11:56 AM
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.
05-03-2016 10:37 AM - edited 05-03-2016 10:38 AM
If your cRIO is the device that is generating the data, I believe that the shared variable needs to be hosted on the cRIO and network-published from there -- after this it can be accessed through the network by the PC. It looks like your shared variables are on your PC in the attached image.
Additionally, take a look at I/O Variables as the type of shared variable that you would use to pass the data directly through the Scan Engine to your host.
http://zone.ni.com/reference/en-XX/help/371361K-01/lvioscanhelp/io_vars/
In particular you might find the section titled Accessing I/O Variables Remotely useful.
Paul P.
Applications Engineer
National Instruments
05-03-2016 02:31 PM
I was trying to bind the variable on my computer to the PSP variable on the cRio. Turns out that I was doing it correctly; however, I had a race condition between binding the variable and reading the variable the first time.