G Web Development Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Array of Indicator References Passed to Sub VI

Solved!
Go to solution

I have the need to pass an array of indicator references to a Sub VI so the Sub VI logic can read the indicators (this saves a lot of logic duplication in the Sub VI).  I don't seem to be able to achieve this.  I attached a simple project; note the error in the following screen shot.  Can this be achieved and if so, how?

 

johnsmith2022_0-1701788326154.png

 

0 Kudos
Message 1 of 3
(662 Views)
Solution
Accepted by topic author johnsmith2022

Yea you should be able to. The tricky bit is that the reference control itself does not exist on the .gviweb panel so you have to manipulate it only on the diagram.

 

For example you can create a constant of a control reference, right click it and choose create terminal. It will place the terminal on the diagram and you can connect it to the connector pane, but it does not show on the panel:

 

createongviweb.gif

 

Because of those quirks I always create my SubVIs as .gvi documents and I only use .gviweb for the very top-level document with my UI.

 

The .gvi document type has fewer quirks and is easier to manipulate. Particularly for typedefs which are only supported on the panel of .gvi documents. The .gviweb diagrams can use typedefs on the diagram but you can't visualize them on the panel without disconnecting them.

 

I'd recommend using .gvi documents for your SubVIs but as shown above you can use .gviweb for SubVIs but you have to do more things from the diagram than the panel. I attached an updated example that shows it works for .gviweb documents.


Milan
0 Kudos
Message 2 of 3
(637 Views)

Milan, sorry for my late response.  Thank you for your suggestions; I was able to get this to work.

Message 3 of 3
(581 Views)