NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
calvintiger
Posts: 33
0 Kudos
Accepted Solution

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

[ Edited ]

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 ?

Active Participant
Akiel
Posts: 350
0 Kudos

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

[ Edited ]

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
Active Participant
Akiel
Posts: 350
0 Kudos

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

sorry misread your message slightly,

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
Knight of NI
Posts: 18,064

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

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.

Member
calvintiger
Posts: 33
0 Kudos

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

Thank you !!!

You definitely solved my problem. It works :smileyhappy:

 

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

Knight of NI
Posts: 18,064
0 Kudos

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

In the LabVIEW Help.