cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX in sub VI

Talo
Member

ActiveX in sub VI

Hello,
I am trying to use a program with ActiveX how sub VI, The program with ActiveX works well, but when I try to do one sub VI with this program the call to this sub VI don't work, What can be pass for this sub VI don't work???
Thanks
6 REPLIES 6
Joe_H
Active Participant

Re: ActiveX in sub VI

Why don't you post the VI so that we can take a look. We need more information in order to help you.



Joe.
"NOTHING IS EVER EASY"
Talo
Member

Re: ActiveX in sub VI

Message contains an attachment
Ok  Jhoskins I am sorry for don't do it before,
Here you have my sub VI which I am try to use.
Thanks
Philipp R.
NI Employee (retired)

Re: ActiveX in sub VI

Dear Talo

We can only (hopefully) run you VI if you also provide us with the 'USBtempAX' ActiveX component.
Could you please post this, too?

Best regards

Philipp Roessler
Talo
Member

Re: ActiveX in sub VI

Message contains an attachment
I am sorry again,
Here you are and thank you
Gonzalo
Lycangeek
Active Participant

Re: ActiveX in sub VI

A quick comment on the code - if you are getting the ActiveX control from the front panel, you do not need to call Automation Open - the refnum returned by the container itself onto the block diagram is the instance created by LabVIEW on your behalf. Similarly, you don't need to close it either - the VI controls the life of the control.
 
If there is no reason to display it on the front panel, convert it to a ActiveX refnum constant and leave the Open/Close alone.
 
The other thing to do is go into the VI Properties and select "Execution". Change the Preferred Execution System from "same as caller" to "user interface". My guess is that when you run it as the top VI, it's defaulting to the UI execution system (typical) and everything is working fine. When you call it as a subVI, it's scheduled by the execution system to run on an available thread, which probably isn't the UI one. I'm guessing that your control requires that the caller be the UI thread.
Philipp R.
NI Employee (retired)

Re: ActiveX in sub VI

Brian

Have you implemented the changes you proposed? Could you post the VI? I'm still getting 'Error 97'.

Best regards

Philipp Roessler