LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subpanel control button programmatically

Solved!
Go to solution

Hello,

 

I'm fairly new in Labview and do not master all aspects.

I have developped a "driver" VI, which allows me to control an instrument (communication via TCP-IP). This works fine.

 

I now want to use this "driver" VI inside a test VI, which will control the instrument in an automated way.

 

I'm loading the "driver" VI in a subpannel of my main VI, and I can effectivelly see it loaded, and can use it also, as if it was standing alone ...

So far, so good.

 

Now, I need to programmatically control the instrument, to execute test sequences e.g.   . I need to have the main VI sending commands to the VI in the sub-panel, changing set values, "clicking" on buttons ... all this automatically.

 

What is the best way to control the elements in the subpanel, in a similar way as with property nodes if the elements would be in the main VI ?

 

Thanks in advance for any useful tip.

 

 

J.F. 

0 Kudos
Message 1 of 3
(3,278 Views)
Solution
Accepted by topic author JFBerlemont

Hello,

 

Here is a little example. As you will see, it consists in :

1) from "VI reference" ->  you get "front panel reference"

2) from "front panel reference" -> you get "all control references"

3) from "all control references" -> you get "a given control reference" (found by its label text)

4) from "a given control reference" -> you can use its "value property" as usual (read or write mode)

 

Hope it helps...

 

J.

0 Kudos
Message 2 of 3
(3,253 Views)

Thanks for this solution.

 

It works OK.  I was hoping to have some other ways, without looping through all controls list and check their names in order to get the refnum of the control we need to use.

 

This solution solution works fine though.  Thx.

 

J.F.

0 Kudos
Message 3 of 3
(3,237 Views)