02-06-2014 08:33 AM
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.
Solved! Go to Solution.
02-06-2014 09:46 AM
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.
02-06-2014 10:43 AM
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.