LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

static vi reference read indicator values

The objective of my code is to open a separate VI when a certain boolean button is clicked, wait for action from the user, then close the separate VI, and return its values to the main function. I have put a static VI reference in my block diagram, and then two invoke nodes: "FP.Open" and "Run VI". That works fine, but I still haven't figured out how to obtain the values of the indicator from the reference. I thought I might use a Property Node, but I couldn't find the right property to select. Any help? Thanks!

0 Kudos
Message 1 of 3
(2,744 Views)

Does this separate VI run in parallel with the main VI or could it also block the main VIs execution as long as it runs?

If so, simply place it as a SubVI and set the Frontpanel to Open when the VI runs.

If not, use the Call by Reference Node with it's asynchronous call ability.

 

Christian

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

And

 

if you still want to proceed with the idea of calling by reference, set the invoke node 'Run VI' to wait till complete as 'True'.

Then, place another invoke node after it, for Get Control Values. You will get an array of clusters, each cluster with the control/indicator name string and its value in variant data type.

 

Process that array of clusters.

Post your code if need further help.

 

i would support 'Christian's first option, of calling the vi as a sub vi and pass the indicator value as a terminal on the connctor pane.

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 3 of 3
(2,731 Views)