LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to a COM server with no creatable objects

Hi,

 

I have read all posts I could find on the topic "LabVIEW ActiveX object not creatable", still cannot answer this "simple" question:

 

"Is it possible to connect to and use a COM server whose objects are all NOT creatable?"

 

In my case I have an external COM server registered by a non-standard (i.e. not Word, ...) application. When I place the AutomationOpen and browse to select the ActiveX class only non-creatable objects are presented. The one mentioned in the application guide is also not creatable. If I select this and then run the VI I get the well known error 3005 "object is not creatable".

 

So the above question rephrased:

"Is there a way to solve this problem on LabVIEW side (and if yes how...) or do I need to contact the application vendor?"

 

I have one more detail though:

The interesting thing is I once managed to connect to the server by using the non-creatable object, if I now run this VI it works every time. I cannot reproduce this but I saved the working VI. If I now copy this specific ActiveX front panel control (where the class is selected) to a new VI it also works at first and a reference is created. However after passing the reference to other VIs it eventually breaks and crashes LabVIEW.

 

Thanks in advance for any help

Marco

 

ps A very similar problem is discussed here, unfortunately none of the hints given there is helpful for me.

Download All
0 Kudos
Message 1 of 6
(3,108 Views)

I've done a little digging on this issue. First of all, what version of LabVIEW are you using? If you are using LabVIEW 8.2 or 8.2.1 this could be related to a known bug that was fixed in LabVIEW 8.5. If this is the case, then you should try to run your code in LabVIEW 8.5 or higher to see if the issue persists.

 

If you're not working with LabVIEW 8.2 or LabVIEW 8.2.1, a common cause for error 3005 is that the ActiveX object can't be found. Try re-inserting the ActiveX object. To do this, right click on the ActiveX Container control on your front panel and select "Insert ActiveX Object ..." and navigate to the server name you're using. You will also have to re-select the method names in the invoke node on your block diagram.

 

To answer your question: yes, it should be possible to do this as far as I can tell, but it is difficult to say at this point whether your particular situation is solvable on the LabVIEW side of things. What non-standard application are you working with? What version of LabVIEW are you using for development?

0 Kudos
Message 2 of 6
(3,059 Views)

Hi Nicolas,

 

Thanks for your reply. First of all I must say this particular case is solved, after talking to the developer of the "non-standard" (i.e. third party) application (it's for a measurement unit). Basically I needed to browse to a different file, not to the DLL that seemed correct. The "wrong" DLL did not expose any application object, just interfaces and technically you cannot create an object from an interface, you must instead create it from the application object. That's how I undestood it. The correct file (actually the application EXE) exposes an application object, under which I can select the repository interface I need.

 

Nevertheless I still would like to find a solution to the original question, as the problem might show up again in the future. That is, whether it is possible to connect to (or "instantiate" might be the right word?) a non-creatable object without getting a 3005 error or similar. I am using LabVIEW 8.6 so I should not be affected by the issue with 8.2.x (yes I found threads about that).

 

I would say in order to use a non-creatable object we'd have to trick LabVIEW into thinking the object is in fact creatable... If you (or anyone else) have any more thoughts or information on this I'd like to hear it.

 

Thanks

Marco

0 Kudos
Message 3 of 6
(3,044 Views)

A non creatable object is... well, non-creatable meaning it can't be instantiated. This applies for interfaces as you have described so elonquently yourself, but may also apply for objects that expose datatypes in their instatntiation methods that LabVIEW doesn't support.

 

Aside from a bug like what was seen in the 8.2.x case there is really nothing you can do here yourself on the LabVIEW side. What you can possibly do is creating an ActiveX wrapper that exports a creatable object and calls into the "non-creatable" object.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 6
(3,023 Views)

Hi Marco,

I am having similar issue as you did with connecting to a COM server (EXE) file. I am using "Automation Open" function and I get this error message: "Object specified is not creatable", code: 3005. 

How do you connect to the EXE file using labivew? Do you use the ActiveX container to import the EXE file? 

 

-Rosh

0 Kudos
Message 5 of 6
(2,823 Views)

Hi Rosh,

 

I also simply connect using Automation Open, the issue in my case was that I was trying to connect to the wrong application library (i.e. the wrong DLL), whereas I was supposed to use the application EXE file directly. I used the DLL first because that seemed more logical. If you can you should talk to the application developer and ask whether they have a working example (e.g. for Visual Basic), that's what solved the issue for me. When you select the ActiveX class you should check "show only creatable objects" and select one of those. If there are none you probably have the wrong server/file.

 

Hope this helps.

 

Marco

0 Kudos
Message 6 of 6
(2,791 Views)