LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Different ActiveX methods appear when referencing a VI inside or outside Labview

Solved!
Go to solution

My question concerns the methods that are available for a VI referenced through ActiveX.

 

I am specifically interested in the "Run VI" method, which appears in Labview when using Open Vi Reference, then Invoke Node.

In particular, this "Run VI" method has a "Wait Until Done" parameter that I need to set.

In Labview, I manage to set this parameter and run the VI in the background (see first attached picture).

Now, I get confused when referencing this VI through ActiveX from /outside/ of Labview (Matlab in my case).

According to Matlab (see second attached picture), the referenced VI has a method called "Run", but not "Run VI".

This command does run the VI, but I cannot see any "Wait Until Done" parameter. In fact, there is only one parameter listed (it appears as Run(handle, Variant(Optional)), which means that aside from the object itself, there is only an optional Variant value).

(I have highlighted the method in green in the second picture).

Actually, when looking at the methods listed in the Matlab picture, it appears that many are different from the ones that are accessible in Labview through the Invoke Node.

 

Is this normal ? If yes, how can I set the value of the "Wait Until Done" parameter for the "Run"/"Run VI" method through ActiveX from outside of Labview ?

Download All
0 Kudos
Message 1 of 6
(2,701 Views)

I have attached a png file of how I use this method. To obtain the vi reference use the open vi reference. 

 

Hope it helps. run vi.png 

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 2 of 6
(2,694 Views)

sorry misread your message slightly,

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 3 of 6
(2,691 Views)
Solution
Accepted by topic author calvintiger

Is it normal? Yes. Why? Because the first method isn't ActiveX. It's using the VI Server. Totally different beast. Hence, the interface will be different.

 

The LabVIEW documentation indicates the actual signature should be:

Syntax

object.Run([async])

Parameters

NameTypeDescription
async Boolean If TRUE, you do not need to wait for the VI to finish running. The default is FALSE.

 

I'm not sure why you're seeing the signature as "Run(handle, Variant(Optional))" from Matlab.

Message 4 of 6
(2,669 Views)

Thank you !!!

You definitely solved my problem. It works 🙂

 

I am curious: where did you find this information ? where are these activeX functions documented ?

0 Kudos
Message 5 of 6
(2,665 Views)

In the LabVIEW Help.

0 Kudos
Message 6 of 6
(2,654 Views)