LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Seting up labview as remote OPC client

Solved!
Go to solution

I am having extraordinary difficulty setting up LabVIEW as an OPC client on a remote computer.  I followed the guide from the OPC foundation on setting up Windows dcom (http://www.opcfoundation.org/DownloadFile.aspx?RI=326). 

 

On one machine I seem to have had some success.  Using Kepware's quickclient, I can connect and view the values for all tags on the server.  When I use the DSC module to set up an OPC client I can view the tags, but it will not connect to the server (Client Status variable "Connected?" is false).  I can not view the value of the tags. 

 

On another machine that I setup, I cannot reproduce the sharing at all.

 

I'm using LabVIEW 8.6.

 

Thanks for any help I can receive.

 

0 Kudos
Message 1 of 21
(10,253 Views)
Kevin,

Try using the follow tutorial here:
Connect LabVIEW to Any PLC Using OPC

This uses the NI-OPC server but that is very close to Kepware 🙂

Joe Daily
may the G be with you....
Joe Daily
National Instruments
Applications Engineer

may the G be with you ....
0 Kudos
Message 2 of 21
(10,224 Views)

Thanks for the suggestion, unfortunatly the site you directed me to only discussed the scenario when the OPC server is local.  I have had success with a local server (actually it's very easy), but when trying to do so remotely I can not even view the tags.

 

Thanks again.

0 Kudos
Message 3 of 21
(10,220 Views)

Hey Kevin,

 

I ran through the same opc foundation guide and what able to connect to a remote opc server, I attached a screenshot just so you can compare it with your setup. I did this by adding a i/O server and slecting OPC client then I enter the folowwing:

 

remote_opc.png

 

Joe Daily
may the G be with you.... 
 
Message Edited by Joe D. on 05-18-2010 02:06 PM
Joe Daily
National Instruments
Applications Engineer

may the G be with you ....
0 Kudos
Message 4 of 21
(10,200 Views)

Yes, I've been through that.  I get an error when I do that

 

screenshot.15.jpg

This is because there is something (probably windows security related) that prevents me from accessing the OPC server.  I've setup DCOM as the OPC foundation had suggested and removed all firewalls yet still no dice.

0 Kudos
Message 5 of 21
(10,196 Views)

Hey Kevin,

 

Thats a DCOM permissions error issue.Double check that both Anonymous logon and everyone have remote access. Sometimes you need to configure both the windows default com security settings and DCOM settings for an individual OPC Server, depending on the default settings at the time the opc server is installed.

 

Joe Daily

may the G be with you....

Message Edited by Joe D. on 05-18-2010 02:37 PM
Joe Daily
National Instruments
Applications Engineer

may the G be with you ....
0 Kudos
Message 6 of 21
(10,184 Views)

That's exactly what the OPC foundation had walked me through. 

 

 *My Computer -> COM Security -> Access Permissions -> Limits:  ANONYMOUS LOGON and Everyone has both local and remote access

 *My Computer -> COM Security -> Launch and ActivationPermissions -> Limits:  ANONYMOUS LOGON and Everyone has both local and remote access

 

The COM security defaults allows full access to ANONYMOUS LOGON and Everyone.

 

The individual components (GRAYBOX OPC SIMULATOR and Kepware Communications Server) have custom settings to reflect the above limits and I have tried the default settings that should allow full access.  No dice.

 

I have NOT tried changing the Configuration Permissions.

 

 

0 Kudos
Message 7 of 21
(10,170 Views)

So I've got my other setup to the point where I can browse the tags, but I can not connect to the kepware server using LabVIEW.

 

To do so I have followed these guides for setting the security.

 http://www.isa.org/intech/whitepapers/OPC_and_DCOM_5_things_you_need_to_know.pdf

 http://www.automation.com/pdf_articles/Troubleshooting_OPC_and_DCOM.pdf

 

If anyone has suggestions from this point, I would love the hear them.

Message Edited by kevin.brown on 05-19-2010 03:44 PM
0 Kudos
Message 8 of 21
(10,136 Views)
Some added information.  I can connect using the kepware quick client, but I am only able to do synchronous reads with it.  Does this problem relate in anyway to the fact that labview cannot connect to the opc server?
0 Kudos
Message 9 of 21
(10,128 Views)

I've enabled the diagnostics for the client and here is a snipet

 

 

05/19/2010 14:20:39.922 |-[Connection] Connect: (SUCCEEDED) 05/19/2010 14:20:39.953 | |-GetCLSID: ProgID=Kepware.KEPServerEX.V5, Machine=\\OPC-SERVER, CLSID=0-0-EC00-A76-1AC80000 (FAILED, HRESULT=0x80070005 Access is denied. ) 05/19/2010 14:20:39.953 | |-GetCLSID: ProgID=Kepware.KEPServerEX.V5, Machine="", CLSID=B3AF0BF6-4C0C-4804-A122-6F3B16F4397 (SUCCEEDED) 05/19/2010 14:20:39.984 | |-CoCreateInstanceEx: CLSID=B3AF0BF6-4C0C-4804-A122-6F3B16F4397, InstanceType=CLSCTX_LOCAL_SERVER, ServerName=\\OPC-SERVER, CMQ=1 (FAILED, HRESULT=0x80070005 Access is denied. ) 05/19/2010 14:20:40.031 | |-CoCreateInstanceEx: CLSID=B3AF0BF6-4C0C-4804-A122-6F3B16F4397, InstanceType=CLSCTX_ALL, ServerName=\\OPC-SERVER, CMQ=1 (FAILED, HRESULT=0x80070005 Access is denied. ) 05/19/2010 14:20:42.750 [ReleaseAll]: (SUCCEEDED) 05/19/2010 14:20:42.750 |-[Connection] Disconnect: (SUCCEEDED)

 

 Looks like I'm getting denied.  Kepware is setup so that the identity is "The system sccount".  Also, I do not have a domain server, I am working with workgroups.  I have disabled "Simple File Sharing".

 

 

0 Kudos
Message 10 of 21
(10,120 Views)