07-11-2008 04:14 PM
I am trying to develop an Express VI where the configuration dialog will determine the input terminals of the source VI. Depending on the configuration dialog, the number of input terminals and the datatypes of the input terminals to the source VI can change. With respect to the reconfigurable input terminals, the behavior of my Express VI would be similar to the behavior of the Build Text Express VI that is distributed with LabVIEW.
Currently, I am implementing a
subset of the functionality using Connector Pane:Set with a small number of
pre-determined VI's having different connector panes, but this method does not scale to handle
all the combinations that could be configured by a user.
Is there a way to do what I want with Express VI's? I would also be willing to consider something other than Express VI's if there is an alternative implementation path.
Thank you,
Stan
07-14-2008 04:04 PM
The Set property configures the VI
referenced by the Property Node with the same connector pane layout as the VI
referenced by the input. The two VIs must have the same number of parameters,
with identical data types and names. If they do not, the Property Node returns
an error. This restriction makes this property seem difficult to scale. One way around this is to use array inputs and outputs. This method reduces the number of iterations you must consider to the number data types you expect. For example, instead of one string input per parameter, you could define the input to the VI as an array of strings. What do you think about this idea? Unfortunately, the Config code for the Build String VI is protected (of course).
07-15-2008 12:34 PM
In the config page VI for your Express VI, typically on the right side of the diagram, you should see a list of terminals to grow (expand) when the user closes the config page. This is a supported way that allows you to control which ones show up with their names in the grown part of the Express VI, as opposed to the ones that just have terminals up in the blue part at the top. Maybe this would be sufficient for what you are trying to accomplish. Unfortunately I don't know of a supported way to make a terminal not show up or not.
That said, most of the shipping Express VIs' config pages are actually not password protected. Some are admittedly not the cleanest pieces of code I've ever seen, and several are fairly old (user-interface VIs that were written before the event structure existed), but if you find one that does something you want to do, you could try opening its config page VI and looking at the diagram to see if you can find the right piece of code and attempt to do the same thing. You will find, however, that quite a few of the subVIs on the diagram of the config page VIs are password-protected and undocumented. This is why I say this functionality is "unsupported".
07-15-2008 03:58 PM
07-15-2008 05:47 PM
07-16-2008 06:32 PM
Steve,
Thanks for the array suggestion, but I don't want to require that the intended users of my Express VI have to know about array types.
Stan
07-18-2008 09:58 AM