LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

activex control

Hi, I am using the Active X container OphirUsbXLib.UsbX  to talk to an Ophir power meter. However, I am always getting one of the following errors:



 -2147418113 (Catastrophic error).  Active X container (OphirUsbXLib.UsbX in this case) wired directly to the invoke node. However this results in Error 97 "Null refnum".

Any Ideas?
Thanks
0 Kudos
Message 1 of 6
(2,883 Views)
Hi  chrisverg

Could you post a copy of your code for me to look at?
0 Kudos
Message 2 of 6
(2,865 Views)
Try using an ActiveX Open (and Close when you finish with it).
0 Kudos
Message 3 of 6
(2,858 Views)

Hi rich_sills,

chrisverg asked me to post this code for you. Write now it looks like it won't even load the ophirUSBxlib.usbx . I think this might be because the ophir powe meter is not hooked up to this computer. We get the errors after the Open USB node. Here is a copy of the code. Thanks.

0 Kudos
Message 4 of 6
(2,843 Views)
My apologies, here is the vi with the active X ophir object.. when running you will see you get the catastrophic error
0 Kudos
Message 5 of 6
(2,826 Views)
Hi

Obviously I don't have the OphirUsbXLib installled on my machine so I cannot run your code. Like Matthew Kelton suggested try using
an Automation Open to create the refnum for your ActiveX class.  You can do this by simply placing the Automation Open function on the Block Diagram and then right-clicking on the function and selecting Select ActiveX Class >> Browse... and then selecting your OCX file.
0 Kudos
Message 6 of 6
(2,806 Views)