LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SVs not logging data when binded to network

Hi guys,

I'm using the following:
DSC Module for logging data from Shared Variable Library
OPC Client to connect to the PLC
Labview 8.5
Win XP SP2

In my project explorer, Right click data.lvlib, "Edit Variables" and making "Network: bind to source" OFF for all my SVs, My application works like a dream and data is logged into the database and i'm able to retrieve it and generate a report.
but when "Network: bind to source" is ON and the SVs connected to their specific tags in through the OPC client, and the Device (PLC) in the channel running in Simulation mode. Then i'm not able to retrieve any data which i thought was being logged in! after checking the database dataset Marking, i realised that these SVs are not logging any data!!!

Does anyone have an idea to what could be happening? The data that is written by the user on the Front panel is being processed correctly at the PLC, so data is correctly being sent to it. it's only when logging that data to the DSC database, nothing is happening there!!!

kind regards,
Simon Ayoub.
0 Kudos
Message 1 of 8
(7,306 Views)
In your LabVIEW project, navigate to Tools >> Shared Variable >> Variable Manager.  Make sure that your library is deployed, and drag your shared variables over to the "watched variables" section.  What is the corresponding quality and error code?  You might want to take a look at this article to further troubleshoot your shared variables.
 
Also, what OPC server are you using?  Another step in troubleshooting would be to download Server Explorer.  This is another client that can be used to moniter the items on your PLC.  Use this client to see if your items are updating correctly when connected to your OPC server, and it will tell us if the problem is with your server or the LabVIEW DSC client.
 
Let us know what your results are, thanks!
 
0 Kudos
Message 2 of 8
(7,252 Views)
Thanx Meghan for your quick reply.
I have the data.lvlib set to autodeploy. i will also do the tests that you have pointed out. and will get back to you with the results on friday, as tomorrow i won't be in the office.

Cheers.
Simon
0 Kudos
Message 3 of 8
(7,184 Views)
Hello Meghan,

Thank you for the help in running my application with the data library being binded to its source. i was deploying the variable twice and the firewall was on... so it seems to be working now...

can i ask you for help in the following topic?

I can't seem to be able to make any sense of DSC!!! i have a library of  SVs (they all have deadband = 0, so to log at every wright), and a dataset marking (encoperating some of those SVs) which is set to start when logging SV = "start" and to stop when logging SV = "stop"

I'm assuming that logging data into CITADEL from these SVs only starts when then the logging SV = "start", then logging will stop when that SV = "stop". Am i correct to assume that?? i've been reading every result on the NI website from DSC search and can't get straight forward info! Smiley Sad

What happening with my application, is that data is still written after i set the value to "stop" which is causing the reporting to produce faulty data!!! the data is being mixed between the datasets!!! so if i have multiple dataset, sometimes the correct value in the array of data isn't index 0 (since it's from previous dataset) but at index 1!!!

any ideas??


cheers,
Simon
0 Kudos
Message 4 of 8
(6,925 Views)

Hi Simon,

Your assumptions are correct.  I would suggest comparing your code to the "DataSet Marking Demo.vi" found in the NI Example Finder under Toolkits and Modules >> Datalogging and Supervisory Control >> Managing Historical Data.  I ran this VI and I didn't notice that any data was being logged after the shared variable is set to "stop".  Hope this helps, thanks Simon!

0 Kudos
Message 5 of 8
(6,771 Views)
Thanx Meghan,

I've already looked at the DataSet Marking Demo so many times.
The difference is that their are logging a signal.

As for me, i'm only logging (or should be loading) the SV once after i start recording to the database! so i'm not sure why i'm getting zeros and other values in the data array!
I have attached a VI to show how i'm getting the data out of the data array from multiple runs with the same RUNID.

It would have been very helpful is there was a way to search for the Shared variables in the project!! i will be checking if i'm writing to these SVs where i'm not supposed to be.

Cheers,
Simon
0 Kudos
Message 6 of 8
(6,110 Views)

Hi Simon,

Thanks for including your code.  I am missing one subVI titled computername.vi.  Also, I would need to see your Read Data Set by Run ID.vi to troubleshoot this issue, and the VI is password protected.  Please provide this password if possible.  If this is not something you want to post in the discussion forums, I would suggest creating a new service request and contacting support by either e-mail or phone.  You can go to ni.com/ask to create a new service request. Thanks Simon!

0 Kudos
Message 7 of 8
(5,005 Views)
Hello Meghan,

As you have suggested, i have created a service request and contacted NI Australia (sydney), also supplied them with a complete Sample Project.

Thank you for your help.

Simon
0 Kudos
Message 8 of 8
(4,972 Views)