09-01-2009 09:35 PM - edited 09-01-2009 09:40 PM
I think I'm heading down the Rube Goldburg road and need some advice .
I have a front panel running some test equipment. The user 1st selects a test fixture and I populate the available test methods from reading a simple *.ini configuration file specific to the selected fixture. Where I'm having problems is when I populate the ring control using a property node I just can't figure out a clean way to populate the front panel from the vi. I'm just trying to pass the ring text to an identical ring control on the front panel; the user then selects the desired test method which I later load and run the test.
I'm sure it is something simple that I've forgotten but I can't figure it out without going all Goldburg.
-Chris
(Oh man the snippet function butchered my vi; here is a jpeg).
Solved! Go to Solution.
09-01-2009 10:11 PM - edited 09-01-2009 10:15 PM
Take the reference of the Ring text inside the subvi and update the Values.
http://forums.ni.com/ni/board/message?board.id=170&thread.id=428582&view=by_date_ascending&page=1
09-01-2009 10:12 PM
09-03-2009 01:28 PM
Thanks for the help; that solved my problem is a nice clean way.
Learn something new everyday!
09-03-2009 01:34 PM
09-03-2009 02:01 PM
Dennis Knutson wrote:
I don't see the point of these solutions that use a reference and updating the main's control there. All you have to do is pass the string array back to the main and write to the control's property node.
When you are in a state of a State Machine that in turn is in a SM that is a SM....
Control references let me keep the GUI updated without having to return to the main.
Ben
09-03-2009 02:09 PM
Okay, that makes sense but do you think that is what the op is doing?
09-03-2009 02:18 PM
Dennis Knutson wrote:Okay, that makes sense but do you think that is what the op is doing?
The words don't sound that way but the screen shot makes it look like he wants to do it in a sub-VI where they have the right idea but they are pointing at the wrong widget and want to poke at a callers ring control.
Ben
09-03-2009 02:58 PM
It is part of a much larger multiloop QSM and my problem was indeed updating the control from inside a state inside a subVI.
The application is growing (as well my coding skills) so I'm trying to use good practices. I used the control ref technique but will be expanding it even further. Decided to put all the front panel controls into a cluster and type def the cluster. I can then easily update those controls (and add more) without large wire changes.
-Chris
09-03-2009 03:08 PM
F1_Fan wrote:It is part of a much larger multiloop QSM and my problem was indeed updating the control from inside a state inside a subVI.
The application is growing (as well my coding skills) so I'm trying to use good practices. I used the control ref technique but will be expanding it even further. Decided to put all the front panel controls into a cluster and type def the cluster. I can then easily update those controls (and add more) without large wire changes.
-Chris
Good idea!
I put them in an Action Engine so I grapb wahtever I need where ever I need it.
Tip!
When initializing check for the vailidity of all of your refs.
There were many times when I put every thing together but forgot to add the ref to the actual control. The check let me no at start-up time that I forgot something rather than trouble shooting "why am I getting an invalid ref error" and "where".
Ben