LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

active x controls in Labview

I'm running LV2009 and it's been suggested by NI tech help that I use Active X controls to communicate between my vi and the NI Smart Camera. I've never worked with Active X before and I need help understanding how to use it. The NI tech sent me the attached vi which works, but I'm trying to understand it with difficulty, since there's no documentation associated with this control. My question is this: in the 'open inspection' case, why does the reference wire come out of the Show Inspection Dialog invoke method, rather than coming out of the NIVBAITarget control reference OUTPUT? I would have strung all of these properties and invoke nodes together along the same reference wire, like in the 'connect to vbai' case. Same question applies to the 'run inspection' case.
0 Kudos
Message 1 of 5
(2,618 Views)

The methods that are invoked return a reference to another object.  And you want to work with the properties of that object.

 

Let's say there is a parent object.  If you want to continue working with that parent object, you'd put your next invoke or property node in line with the first one.

 

However, let's say you want a child object of that parent.  To get a reference to the child, the parent has a method called GiveMeChild that returns a reference to the child out of the lower portion of the invoke node.  Now if you want to work with the child object, you string your invoke and property nodes along that wire.

 

Note that the objects may or may not be a parent/child relationship in the class hierarchy, but I'm using those terms liberally to help clarify an example.

0 Kudos
Message 2 of 5
(2,594 Views)

That makes sense. Thanks for that clarification.

0 Kudos
Message 3 of 5
(2,579 Views)

Not sure what you want to do with the smart camera and the VBAI inspection running on it, but another option is to use shared variables. You can read and write shared variables in VBAI from another machine and this might be an easier way to get or set simple data (numeric, boolean, string). If you need to get the image or get lots of results from lots of steps, the AviteX method may be better.

 

Hope this helps,

Brad

0 Kudos
Message 4 of 5
(2,569 Views)
Thanks Brad. What I need to do is launch an inspection in the camera from my LV program, then wait for the camera to return a pass or fail indication & repeat. Others in this forum have suggested shared variables and I looked into it with NI help and it appeared very complicated, and NI suggested Active X, which seems to be working and less complicated.
0 Kudos
Message 5 of 5
(2,565 Views)