LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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
0 Kudos
Message 1 of 7
(3,717 Views)
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"
0 Kudos
Message 2 of 7
(3,705 Views)
Ok  Jhoskins I am sorry for don't do it before,
Here you have my sub VI which I am try to use.
Thanks
0 Kudos
Message 3 of 7
(3,689 Views)
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
0 Kudos
Message 4 of 7
(3,678 Views)
I am sorry again,
Here you are and thank you
Gonzalo
0 Kudos
Message 5 of 7
(3,670 Views)
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.
0 Kudos
Message 6 of 7
(3,664 Views)
Brian

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

Best regards

Philipp Roessler
0 Kudos
Message 7 of 7
(3,641 Views)