From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shared OPC variable not updating DSC

Solved!
Go to solution

Hi everyone,

 

I am having some problems with shared variables and the OPC Client I/O server functionality in Labview 8.6.1. I have the DSC add-on installed as well.

 

I am using a lonworks OPC server from a company called Gesytec. I am able to monitor my lonworks traffic successfully using this software. I have set up an OPC Client I/O Server called Lon Server in my library. From there I added a shared variable called nvoUI[1] into a simple VI. When I run this VI, I get no errors or warnings, but I also get no output, either in the data field or the timestamp field. I've read a multitude of documentation on the forum and the knowledgebase, but I still haven't been able to make this work.

 

I have attached a picture of my project setup and my OPC server view, as well as a picture of my VI block diagram and front panel. I hope someone can help.

 

Thank you,

 

Danato Borelli

Download All
0 Kudos
Message 1 of 7
(5,528 Views)

So far today I have attempted to use a new project, a new library, and renamed variables all in an attempt to get some kind of connection to my VI. No success.

 

 

Ideas? Anyone?  

0 Kudos
Message 2 of 7
(5,506 Views)

Good Evening Danato,

 

Has the appropriate library been properly deployed?  This can be verified in Distributed System Manager (in the National Instruments folder in the Start Menu).  Do the values update here?

 

Have you tried accessing the opc tags via datasockets?

 

How Do I Connect to an OPC Server Using DataSocket?

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

0 Kudos
Message 3 of 7
(5,497 Views)

Hi Charlie,

 

I have deployed the library correctly, I believe. I blew away my existing library and started from scratch. I added an OPC client (called Gesytec) and I am able to view the approporiate I/O items.

 view IO items.JPG

 

I then created two bound variables.

create bound variables.JPG

 

I set up the properties as shown, hoping that one way or the other will work.

mult variable editor.JPG

 

I deployed these variables by right clicking and hitting "deploy all", and this is what the distributed system manager showed me.

dist system manager.JPG

 

I then dropped the 72.1.31.10 variable, which is set up as single process, into the VI shown in my previous post. The data output field remains blank, and the timestamp is all zeros. There is no error output. If I use the 72.1.31.0 variable, which is set up as network published, in a simple VI made for writing to a variable, I get the -1950679035 error code. I have read the knowledgebase articles about this error, but the only way I can make it go away is by switching to single process variables.

 

In a piece of information that may be related, I recieved this error message when I started my computer this morning, before I was able to use the windows login prompt:

 

Application popup: Microsoft Visual C++ Runtime Library : Runtime Error!

Program: ...gram Files\National Instruments\Shared\Tagger\tagsrv.exe

 

This application has requested the Runtime to terminate it in an unusual way.

Please contact the application's support team for more information.

 

Could the tag server problems be related to the issues I am seeing?

0 Kudos
Message 4 of 7
(5,481 Views)

Also, with respsect to your query about using datasocket, I had developed functional code prior to trying to use shared variables and the DSC module that used datasockets. Now when I attempt to run this code, the OPC server does not appear to recieve updates, but there are no errors shown in the labview VI. I have attached a picture of one of my VIs that previously functioned. I don't believe that I have had any setup changes that would have affected this? I am quite frustrated, as this has been quite a timesink.

 

Thank you,


Danato

0 Kudos
Message 5 of 7
(5,480 Views)

Good Evening Danato,

 

Create the variables as network-published, not single-process.  The error that you received is generally related to a corrupted library remaining deployed.  As you may have noticed, libraries remain deployed until specifically undeployed.

 

I would like you to try undeploying all of your libraries, recreating the library, and trying the test again.  Do the results persist?

Message 6 of 7
(5,458 Views)
Solution
Accepted by topic author danbor

Just to wrap things up:

 

I have figured out that my problem was multi-part.

 

1) Charlie's suggestion of undeploying all of my deployed libraries was a good one, I had many libraries active that were all referencing the same variables on my OPC server, which may have been causing problems. I didn't realize libraries remained deployed, I somewhat foolishly assumed that they were undeployed when the associated project was closed.

 

2) I did not realize at the time, but I had multiple copies of my OPC server running on my local machine. A copy was automatically started in the background when I started labview. It did not appear in the task bar or system tray. I only found it while looking through the task manager.

 

By undeploying my unused libraries and not starting a second instance of my OPC server, I was able to get my shared variables to function correctly. Thank you Charlie for your help.

 

Danato

0 Kudos
Message 7 of 7
(5,354 Views)