LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble reading OPC Server values with Labview

Hello there,

 

I am currently working with Siemens Equipment : a Simatic Microbox with an OPC Server.

I would like to read some variables' values provided by the OPC server with Labview 2012 (and DSC module), but I'm experiencing some difficulties.

 

I have set up my OPC Server as an I/O Server in a Labview projet. Then, I have created some Shared Values to treat them in Labview.

 

In the Distributed System Manager, I can read NI OPC Client Status :

Active -> true

Connected -> false

Enable logging diagnostic information -> false

OPC interface version -> OPC DA-3

Server ProgID -> OPC.SimaticNet.1

 

When I want to check any Shared Value, I have the comment : Server Failure.

 

I think DCOM/COM configuration of the client and the server are good (I can correctly read values with Siemens OPC Scout).

Maybe the issue comes from the connection between the OPC Server and Labview.

 

Has anyone had a similar problem ?
Thanks in advance,
Jeremy

0 Kudos
Message 1 of 15
(4,601 Views)

Up 😃

0 Kudos
Message 2 of 15
(4,584 Views)

You don't specify whether the server and the client are on the same PC or not.

I recently run in a situation where the Matrikon client was able to read from a remote server while the Labview program (using Datasocket) could not.

I suggest to try with Datasocket vi's to see what happens.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 3 of 15
(4,576 Views)

Hi, 

 

do you have NI OPC Server 2012 ?

 

Here i have a step by step Tutorial that may help to get started:

http://www.ni.com/white-paper/7450/en

 

Greetings from Munich,

Andreas K

Message 4 of 15
(4,553 Views)

Hi,

 

Thanks for your replies.

 

@pincpanter : you are right, I didn't mentionned it. The OPC Server is on an Industrial PC (Windows 7 embedded) connected to Siemens Equipment. The OPC Client is on a laptop, connected to the Industrial PC with Ethernet.

 

@AndreasKr : I followed a similar tutorial (http://www.ni.com/pdf/manuals/372946d.pdf), adapting it to my settings. The OPC Server is not NI one but Siemens (Simatic).

 

I will try to use VIs to create Shared Values to see what happens (or Datasocket as you suggested).

But if you have still ideas, I'll be pleased to read them !

 

Have a good day,

Jeremy

0 Kudos
Message 5 of 15
(4,546 Views)

Hello there,

 

I have tried your VI Pincpanter (thanks again) and I got this error

Code : 1184

Source : DataSocket Open in Read OPC variant.vi

 

Sadness is getting into me.

If you have any suggestion, I'll be glad to read you.

 

Have a good day,

Jeremy

0 Kudos
Message 6 of 15
(4,525 Views)

Hi Jeremy

 

i found some documents concerning our error..

 

Please check your DCOM settings:

http://www.opcfoundation.org/DownloadFile.aspx?CM=3&RI=326&CN=KEY&CI=282&CU=44

 

Also check your windows firewall settings please:

http://digital.ni.com/public.nsf/websearch/0D7B86F4B4D19A5E86256F9A006EECB1?OpenDocument

 

Further Infos:

http://zone.ni.com/reference/en-XX/help/371618D-01/lvdschelp/dsc_opc_trbsht/

 

Greetings from Munich, 

Andreas K

0 Kudos
Message 7 of 15
(4,519 Views)

Getting DCOM to work was a real nightmare! One good tutorial I found is the following.

Other two suggestions you may not find there are the following: on the server, activate the Windows service Remote Registry; on the server, use regedit32 to give proper access authorization to the registry items

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers

and

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 8 of 15
(4,512 Views)

Hi,

 

Thanks for your tutorials.

I have followed the indications and I have changed some checkboxes in the Security Limits.

 

But it is different now : I got "Process Failure" errors in the NI Distributed Manager instead of "Failure Error" (for all Sherd Values, even NI Server Status).

 

How can you give access to the registry items with regedit32 ?

 

Jeremy

 

 

0 Kudos
Message 9 of 15
(4,494 Views)

There is a dedicated context menu item you can activate right clicking on the registry "folder" I mentioned above

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 10 of 15
(4,486 Views)