LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vi Scripting: inconsistent behaviour of terms[] of a wire / owner

Solved!
Go to solution

Let us assume I have the following vi:

 

a.png

 

I am looking for the wire, and acquiring the terminals of that wire.

The result I get is twice a terminal, and once a control terminal (for the indicator).

Like this:

b.PNG

So, the typical process for getting from the wire to the node is using the owner function.

 

This works with the regular terminals, you just get the node-referenec (as a General-reference) - according to this:

http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/scripting_nav_wire_to_node/

 
However, for the ControlTerminal, you get the Diagram/TopLevelDiagram or whatever place you have put in that indicator.

I consider this behaviour inconsistent (even if it is easy to work around.. it's a simple case-structure).

What is the rationale behind this?

 

In fact, what exactly is the difference between a ControlTerminal and a Control? Does it have something to do with the fact that I always have to typecast my nodes when I traverse through a tree like this?

typecast.PNG

 

0 Kudos
Message 1 of 2
(2,592 Views)
Solution
Accepted by topic author b.ploetzeneder

Items that inherit from the 'Control' class are front panel objects. The 'ControlTerminal' class represents the terminals for those controls on the diagram.

 

As far as why node Terminals are owned by nodes, and ControlTerminals are owned by diagrams, that's just the way it is.

0 Kudos
Message 2 of 2
(2,578 Views)