LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to load DLL library on Labview?

Hi

 

When I use Type Cast, IMTBIdent->Name gives me this err 97. When I use Variant to Data, the err 97 is in this node.

 

varianttodata.jpg

0 Kudos
Message 11 of 16
(1,274 Views)

Well, the two are definitely not the same. I have no idea if a component retrieved with the ID from the culture to initialize the root object would return anything that can be typecasted into an IMTBEypiece.

 

More interesting would be to see what happens when you simply replace the Typecast with a Variant To Data node in the Get Device case.

 

And you really have to watch out where and when you close those refnums. There are lots of problems in your current code about closing parent refnums while you still try to access dependent refnums inside them as well as closing the same refnum multiple times.

Rolf Kalbermatter
My Blog
Message 12 of 16
(1,264 Views)

Hi

 

When I simply replace the cast type with variant of data I have received the err97 just after the variant of data before IMTBIdent node.

 

Best regards

0 Kudos
Message 13 of 16
(1,255 Views)

Hi,

 

Here is my code with variant to data module:

pict1.jpg

The error is the same.

 

 

 

 

0 Kudos
Message 14 of 16
(1,233 Views)

NOTE: You should NOT connect the device count to the n terminal of GetDevice() method!!!! The n index goes from (0 .. count-1), so count is an invalid index and certainly would return an invalid object. I completely overlooked this error of yours even in your previous example. You should use the loop construct as in my VI example.

 

BTW: Those images I posted should be VI snippets. You should be able to to drag the image to your desktop and from there in a LabVIEW 2013 or higher diagram and they should turn into the LabVIEW code.

 

If that doesn't help then I'm pretty much at the end of my wits. It's not exactly my expertise as I try to avoid ActiveX whenever possible. From what I know and read this should work as far as LabVIEW is concerned. 

 

Rolf Kalbermatter
My Blog
Message 15 of 16
(1,228 Views)

HI

 

Thank you very much for your help. The code is working now. My error was that I have connected the device count to the n terminal of GetDevice() method. I am applogize of my huge mistake thus engaging your time.

Thank you a lot.

0 Kudos
Message 16 of 16
(1,212 Views)