LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Populating ring text from sub vi - How?

Solved!
Go to solution

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).

Message Edited by F1_Fan on 09-01-2009 09:39 PM
Message Edited by F1_Fan on 09-01-2009 09:40 PM
0 Kudos
Message 1 of 10
(4,704 Views)

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

Message Edited by Baji on 09-02-2009 08:45 AM
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 2 of 10
(4,684 Views)
Solution
Accepted by topic author F1_Fan
If I understand you correctly you are looking to populate the Strings[] property of a Text Ring on the main VI from inside a subVI (I assume the code you showed was from the subVI).  In this case, I would use a Control Reference.  See the following example.  Hope this helps.
Download All
Message 3 of 10
(4,683 Views)

Thanks for the help; that solved my problem is a nice clean way.

 

Learn something new everyday!

0 Kudos
Message 4 of 10
(4,637 Views)
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.
0 Kudos
Message 5 of 10
(4,633 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 10
(4,621 Views)

Okay, that makes sense but do you think that is what the op is doing?

0 Kudos
Message 7 of 10
(4,616 Views)

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

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 10
(4,610 Views)

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

0 Kudos
Message 9 of 10
(4,602 Views)

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.

 

ControlRef_AE.PNG

 

Tip!

 

When initializing check for the vailidity of all of your refs.

 

ControlRef_AE_Check_First.PNG 

 

 

 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 

 

 

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 10
(4,594 Views)