05-16-2021 11:58 AM
Hello,
I'm working on vending machine simulator. I have got a problem with sharing local variables from server VI to client VI.
On my project I create state machine and I have to create a local variable to get access to some variables from different states.
In init state I set initial values to variable and in other states I use local variables to get access to variables.
I created periodic served and shared variables following NI instruction:
https://www.ni.com/pdf/manuals/372946d.pdf
But I can't change variables from client VI.
I found similar problem on forum:
https://forums.ni.com/t5/LabVIEW/DSC-module-and-local-variables/td-p/1537846?profile.language=en
I executed steps, but it works only for boolean variables.
Link to my project:
05-21-2021 05:38 PM
Hey @Selwiakp
Just curious, is there a reason why you aren't bundling control references and then when needing to read/write to the control pulling the reference by name out and working with it? Sounds to me like you are running into a local variable race condition.
I would clean up the reference architecture first then see if the issue is still there. "Want to treat the sickness not the symptoms" - Dr. House