LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
RonW

Auto-update Type Specifier from a VI when pinout changes

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

Current behavior:
When configuring a type specifier for Open VI Reference so I can run Start Asynchronous Call, I drag a VI onto a type specifier VI Refnum.
If the pinout of that VI changes at all - even if the only change is to add an item to an enum - the call to Start Asynchronous Call breaks, because the types no longer match.

 

Desired behavior:
When configuring a type specifier (constant, control or indicator), I can maintain the link to the source VI, so if the pinout of that VI changes in any way, the type specifier doesn't have to be manually modified. In essence, I want an "Auto-update from type definition" option for type specifiers, with the VI as the type definition.

5 Comments
tst
Knight of NI Knight of NI
Knight of NI

This does already exist, in a way - if you drop a static VI reference, then drag a VI into it and then right click it and make it strict, you will have a permanent connection to that VI and the CP info. I usually prefer using this because it also means that LV will always have the VI around, so you can also use the reference to get the name for the Open VI Reference function.

 

The reason I put "in a way" there is because this does have some issues. For instance, it loads the VI, which might not be what you want if you're using this for running plugins. It also seems to create a bug in certain situations which causes a VI in a class not to unload when done, and thus the class would remain locked when you stop your program. At least that's what I saw with the AF.


___________________
Try to take over the world!
RonW
Member

That works for a constant, assuming I don't mind it being a reference to an actual VI rather than a null reference of a certain type.

 

But what about a VI Refnum control or indicator? If I have a VI that has a VI Refnum input that it feeds to Wait On Asynchronous Call, I'd want that Refnum's type to update if I updated the pinout of the VI that it refers to.

tst
Knight of NI Knight of NI
Knight of NI

@RonW wrote:
...assuming I don't mind it being a reference to an actual VI rather than a null reference of a certain type.

The type input on OVR only looks at the type, so at least from that angle it doesn't matter which actual VI is referenced, but like I said, there are also other issues with the static loading.

That said, I did forget about the control use case. While I don't do it that often, I agree that it's a hole, and that reminded me that I already wrote something about the issue of loading just the CP data, so I searched and found this idea, which looks as if it's essentially the same idea, and where there's a discussion in the comments. Would you agree that it's the same?

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-Strictly-Typed-VI-References-to-auto-update-Type...


___________________
Try to take over the world!
RonW
Member

It's essentially the same. I want to emphasize that I would also want VI Refnum controls and indicators (not just constants) to be able to auto-update when a pinout (or type used in the pinout) changes.

 

Otherwise, changing a type used in a terminal connection (for example, adding an item to an enum strict type def) will simply break a different wire when the constant VI Refnum auto-updates but the VI Refnum control or indicator doesn't.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.