07-30-2014 04:46 AM
Hi guys ,
The nested SubVI is 4-5 VIs deep
Main.vi >a>b>c>d>e.vi
I have to send some info from e.vi to Main.vi
1. without normal referencing method i.e. send reference for the controls down the order
2. I dont want to make any call (aschyncronous ) etc from my sub vi "e.vi " just passively update the controls on the main.vi
regards
akshay
07-30-2014 04:52 AM
You can hold the Control reference in a global variable or LV2G and you can update the controls from anywhere. If you are updating the value of a control check this thread.
07-30-2014 05:08 AM
thanks,
but I dont want to use global variables
prefer references
07-30-2014 05:43 AM - edited 07-30-2014 05:44 AM
Do you have any other VIs communicating with each other? I usually use something like User Events to update a User Interface from within SubVIs...my SubVIs are passed the User Event reference and then I have an event structure on the User Interface that receives the events and updates the front panel.
The data type of your user event could be something flexible like string/variant for command/data where command is the name of the control to update and data is the value to update it to (and use variant to data to convert back to the type for the control/indicator).
Like others have said, you can also store the references to the controls in a Functional Global/Action Engine (a SubVI that contains an uninitialised shift register) so that you can access them from anywhere in your application.
07-30-2014 06:01 AM
I am trying to do it for the Teststand User iNTERFACE
I read the UI Message in the callback event & want to display it on the Operator Interfac front panel
may be I try the event structure in it