LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

opc client connection

Hello

 

I am using the Labview 8.6 OPC Client to read shared variables from a Siemens Simatic Net OPC Server on an ordinary desktop.  This worked correctly until Sunday of last week (clocks changed). 

 

I have gone back to the start.  The OPC Server is running and I can see variables changing as expected in Siemens OPC Scout.  I have checked with them that this means the Server is running properly.

 

I have created a library and inside placed a new I/O server.  Here I selected OPC Clients and found the Simatic OPC Server.  I deployed this as normal.  I then created another library to store all my shared variables in.  However, when I go to create a bound variable none of the connections are shown.

The NI OPC Client Status variables show

Active? True

Connected? False

Enable Logging Diagnostic Information Ture

Lastest Diagnostic CoCreatInstanceEx: CLSID=B6EACB30 

I have attached the log files showing the connection error.

 

I've tried removing the opc server library and starting from scratch.  Ive tried stopping and starting the OPC server and client.  I have another OPC server running on the maching which can be connected fine.

 

A server failure is shown in variable manager.

 

Any thoughts, ideas, suggestions would be most welcome

 

 

Alan

Download All
0 Kudos
Message 1 of 13
(5,504 Views)
bumpbum
0 Kudos
Message 2 of 13
(5,486 Views)

Update

 

Have installed NI Server Explorer.  Have connected to the OPC Server and all of the values are changing as would be expected.  So something to do with the way I am creating bound variables and binding them to the variables in the OPC Server.  Anyone know of any good examples?

 

Alan

0 Kudos
Message 3 of 13
(5,478 Views)

Hi Alan,

 

Thanks for your post and I hope your well today.


Firstly, are you using LabVIEW 8.6.1? IF so, there is a fix for bound variables which without it causes them not to work! 

 

If so please see the download page for more, 

http://joule.ni.com/nidu/cds/view/p/lang/en/id/1255 

 

Are you binding the variables manually?

 

If so what options are you selecting?

 

Here is a knowledgebase article which mentions binding,

 

When I Deploy My Application Why Do My Shared Variables No Longer Work?

http://digital.ni.com/public.nsf/allkb/AED9E710A06A6C56862574EF0053DFA1?OpenDocument

 

Can you see them in the distrubted system manager (LabVIEW>>Tools>>DSM). This tool allows you to see all variables - and there current values. I would make sure the variable lb is deployed. 

 

Please let me know how your getting on, and hopefully I can work with you to resolve your issue.

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 13
(5,473 Views)

Hi Hillman thanks for your help

 

I made a mistake its actually LV 8.5.1 on this machine, still no joy.   I have 6.1 installed but just never got round to opening my code in it. 

 

I am binding the variables manually. 

 

Firstly I create a library and place the OPC client in it. I do this by

a) Right click on the library, insert new i/o server

b) Select OPC Clients

c) Browse = Machine, Machine = localhost, OPC.SimaticNET, Update Rate = 100ms

 

Then I create a library for the shared variables

a) Right click on the library, create shared variables

b) Change project items to network items

c) Select the machine Im working on

d) Select the OPC Server

e) Then here the variables usually appear in the folder

Instead the folder contains only the NI OPC Client Status.  As before when I view the connected? variable it says FALSE and the error message given by the OPC Client Log file is "The Server Process could not be started because the configured identity is incorrect.  Check the username and password."  Siemens have assured me there is no username/password authorisation process.

I can see the variables changing in NI Server Explorer but there is Server Failure in Variable Manager. 

I opened Tools>DSCModule>MonitorVariables and the values change here. 

In the Distributed System Manager (on LV6.1) I see only the same NIOPCClientStatus folder and no variables...see attached.

 

I still havent really got to the bottom of why the NIClient stopped in the first place.  I use MAX to log some of the shared variables.  The logging stopped at approximately 10am on Sunday morning.  The clocks changed on Saturday night....I was expecting a gap of an hour between 1am and 2am when the PCs clock would have changed but there is no gap.

 

Off to try creating a new project in 8.6.

 

Alan

 

0 Kudos
Message 5 of 13
(5,448 Views)
0 Kudos
Message 6 of 13
(5,447 Views)

 Hi Alan,

 

Good afternoon and I hope your well today.

 

I am looking through the information you've posted and I was wondering if you had configured the NI Shared Variable Engine at all?

 

1. If not then, to configure the NI SVE to run as a specific user. Follow these steps to reconfigure the SVE service:

  1. Go to Control Panel»Administrative Tools»Services.
  2. Right-click National Instruments Variable Engine and choose Stop.
  3. Right-click National Instruments Variable Engine and select Properties.
  4. On the Log On tab select This Account and enter the user account information which has been granted the DCOM privileges on both the client and server PCs.
  5. Click OK to apply the settings.
  6. Right-click National Instruments Variable Engine and choose Start.
  7. After reconfiguring the National Instrument Variable Engine service, restart both the Client and the Server PCs to refresh DCOM security settings.

 2. And also can you confirm that the SVE process is actually running? It might be stopping when you close different tools.. 

 

 3. If you just setup a basic VI to write and read from a variable - does it work? and the same with bound variables?

 

4. Have you tried creating a bound variable from the option, right click on library>>  create bound variable? and either way, the OPCfolder the variables aren't listed?

 

Just a few suggsetions why I look into things,

Hope this helps. 

 

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 7 of 13
(5,431 Views)

Hi there

 

Thanks for your help

 

I tried stopping and starting the variable engine as you advised and there is only one user account on this PC.  Previously I set all the DCOM privelages to allow for all user accounts,

 

After a restart.  I'm pretty certain the Variable Engine is running.  There is a process called tagsrv.exe running (and using CPU time) as can be seen in Windows Explorer.

 

Tried setting up the I/O Server again and creating boung variables (in a new dummy project)  still no joy I'm afraid. 

 

Ive been looking at other threads to do with DCOM setting.  As far as I can see Ive got the firewall off and all users given access to all of the OPC Servers and Clients.

 

I'm stumped, especially since it worked fine before and just stopped randomly.

 

Alan

0 Kudos
Message 8 of 13
(5,426 Views)

Hi NI Community,

 

I am working with Alan via email at NI UK Support on this issue.

 

If you anyone has any suggestions then I am sure me and Alan would be very grateful.

 

I ofcourse will update the post (Alan too I'm sure) on our finds and solution/outcomes.

 

Thanks, 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 9 of 13
(5,401 Views)

It sounds like you may not be using NI OPC Servers.  If you were, I would suggest you go to:

Tools >> Options >> Service tab and verify that "Automatically start as a Windows NT service" is checked.

When this was unchecked, I had to keep Shared Variable Manager or Distributed System Manager open for the OPC server to function.

 

I had similar browse issues, where I could not see my variables unless this setting was configured.  That is, while NI OPC Servers is set to run as an application out of the box, it must be run as a service to function with shared variables.  There may be something similar going on with your server.

 

-Jason


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 10 of 13
(5,273 Views)