LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble connecting to an OPC server

Hi,

 

Does this massspektrometry have a own integrated OPC-server or is there a second computer where you have connected it? Have you checked out its manual maybe there is needed settings to OPC-clients.

 

 

If you really need a fast solution you can use a third-part program between OPC-servers. E.g. Linkmaster (mf: Kepware). Then you don't need to use LV as a OPC client. You can keep it be a OPC server. It supports larger amount of  OPC servers. You can test it 2 hours periods without licensing.

 

BR, Jim

0 Kudos
Message 11 of 22
(3,361 Views)

Hi again,

 

Yes the MS does have it's own integrated OPC server. I have read the manual on OPC that comes with it. There is no reference to any special settings on the client side.

I noticed there is also a 'OPC quick client' installed with the NI OPC servers. That simple little program DOES manage to connect to the device, as shown in attached screenshot. I just want LV to connect to the server in the same way. Why is that so hard to achieve?

 

Considering the LinkMaster program, unfortunately I'll be needing it for long term measurements, and the 2-hour period will not be enough. Also the 1k$ license fee is pretty steep considering I have LV available which boasts exactly the built-in OPC functionality I need. Except somehow I can't connect.. Even though the OPC quick client can. Does the quick client use a different underlying connection method?

0 Kudos
Message 12 of 22
(3,349 Views)

Hi,

 

I'm not working for NI so I'm not best guy to answer why that is so hard achieve. I have also suffered for these problems very much. I guess that variable engine OPC communication is poorly tested as can been seen from OPC-foundation www-pages.

 

I noticed that you have not wrote your OPC-server prog ID name to IO_server configuration. Try to write it there and IP address also(that was ok). You will see some error pop-ups just click and forget them. Then create one test library where you put one testing variable. Then bind this variable via IO_server to OPC-server. You need to browse variable name with other OPC-client. If you can't do a binding send IO_Server.lvlib and test library.lvlib here and I can show how to do that. The point is that you can't browse OPC items with IO_server but you can connect them if you know the variable names.

 

BR, Jim

0 Kudos
Message 13 of 22
(3,334 Views)

Indeed, I didn't put in the prog ID manually yet. I tried that and got the errors again. Ignored those, saved the library. Added another library with the testing variable (I named it General.DeviceName after the one I want to connect to). The binding was not so successful, so I put the libraries here like you suggested. What I tried is to manually put in the variable name under the 'enable aliasing' tab of the variable properties. That doesn't seem to work, but maybe I'm trying this the wrong way..

 

Edit: oops, forgot to add the files..

Message Edited by JasperS on 01-04-2010 10:08 AM
Download All
0 Kudos
Message 14 of 22
(3,320 Views)

Hi,

 

Your IO_server.lvlib looks ok. I edited other library little bit. When you look variable binding address you can see a last element Variable_name_in_MS . Replace that variable name which you know to be in OPC server. I also changed variable name that you don't mix local and server variable names.  After that deploy libraries and check variable condition with distributed system manager.

 

BR, Jim

0 Kudos
Message 15 of 22
(3,294 Views)

Hi again,

 

As you suggest, I replaced Variable_name_in_MS by General.DeviceName, but no luck.. The variable says (No Known Value).. And the OPC server shows as Active? as true but Connected? as false.

I have included the log file that IO_server.lvlib generates when I deploy it. Again the error 0x80004002 No such interface supported.

 

I couldn't help but try the LinkMaster program. And of course that works perfectly, and I can get the variables into LabVIEW via this program easily. Unfortunately it only works for 2 hours which is not sufficient for my application.

0 Kudos
Message 16 of 22
(3,279 Views)

Hi,

 

Your configuration seems to be okay.  "Connected? as false" indicates that there is a problem between OPC-server and LV client. I'm not familar with these error types maybe someone from NI can tell more about them.

 

This is not a true engineering solution but maybe helps you enough. How many OPC tags you have in your application? If you don't have much tags and your code is "simple" you can use Datasocket VIs to read OPC values. Datasocket not use shared variable engine and it is possible that then you don't get these errors.

 

I think that NI should improve this IO-server editor. It should show more accurate why connection cannot be made etc..   

0 Kudos
Message 17 of 22
(3,248 Views)

Dear all,

 

Just an update for all who are seeking for an answer for this problem; LabVIEW supports OPC DA 3.0 only as a server. So we need to connect to an OPC server which is compliant with this specification.

 

Best regards,

Martijn S
Applications Engineer
NI Netherlands
Message 18 of 22
(3,136 Views)

Hi,

 

In kb-document there is a text: "Using LabVIEW DSC, you can use the OPC client I/O server (an OPC DA 2.x and 3.0 client) to interface shared variables with a third party OPC DA 2.x or 3.0 server"

 

http://digital.ni.com/public.nsf/allkb/63C043359F1E12538625726E005BCD0C

 

So what is the truth about this OPC DA 3.0 support?

 

Regards, Jim

0 Kudos
Message 19 of 22
(3,096 Views)

Hi All,

 

This document (LV2009 Help) gives the answer:

http://zone.ni.com/reference/en-XX/help/371361F-01/lvconcepts/opc_dev_clients/

 

You need to connect to an OPC server that supports OPC version 1.0 or 2.x. If you need to use OPC version 3.0, you must use the DSC Module.

 

Regards,

Bas

Message Edited by Bas van Dijke on 01-22-2010 09:08 AM
0 Kudos
Message 20 of 22
(3,078 Views)