LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call VI by Reference and then change the values of Boolean controls only

Hi
 
I am working with pipe indicators from DSC control pallete, these pipes are near about 800 in number. Now I want to turn them on and off according to the valves that are controling the fluid running in the valves. I come across an idea that open the VI by reference and acess the indicators by their name and then change the values of indicators. But I am having problems when I call the controls the numeric controls also come across and error comes out. A VI is attached please modify it so that only the value of boolean indicators change. I also tried to more generic class and to more specific class functions but could find a solution please help me its realy trouble some for me.
 
 
 
Best Regards
Tanzeel ur Rehman 
0 Kudos
Message 1 of 6
(3,058 Views)

Hi Tanzeel ur Rehman,

the way you use now is better if you know the names from the controls you want to change. If you only want to change all boolean value you can use the property node "FrontPanel" from the vi where your controls are on and then the property "controls. With the array of references you can go through a for loop and check the typ of the control. If it is a boolean change the value, if not do nothing.

Hope it helps.

Mike

0 Kudos
Message 2 of 6
(3,053 Views)
For GUIs that complicated I'll bundle the ref's of related objects...
 
 
 and then use a sub-VI to do the updates.
 
 
Ben


Message Edited by Ben on 05-19-2008 09:14 AM

Message Edited by Ben on 05-19-2008 09:15 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
0 Kudos
Message 3 of 6
(3,045 Views)
Hi
thanks for quick reply. Sir I know the names that was the reason behind my problem is that I want to change values of boolean indicators only by their name I need an output from the call by reference nodes that contains array of Boolean indicators only.
 
 
 
Best Regards
Tanzeel
 
0 Kudos
Message 4 of 6
(3,027 Views)
"I want to change values of boolean indicators only by their name I need an output from the call by reference nodes that contains array of Boolean indicators only."
 
This just does not make sense to me since the array would only be returned after the call by ref completes.
 
WHat may help is for you to get a ref to the VI in question, then get a ref to the panes and then get all of the control refs using the "all controls" property (repeat using pages if you have tabs on GUI).
 
THen search through the list of control refs using the "Label" property of each to determine if it is one of the controls you need to control. Use this trimmed down list to either populate an array for your updates or even better (?) bundle these up so your code that does the updates is readable.
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 6
(3,025 Views)
Hi
sir i did not understand your suggestion properply,plz provide me the solution on the attached VI
Best Regards
Tanzeel ur rehman
0 Kudos
Message 6 of 6
(3,016 Views)