Logging OPC tag

Hello,

I'm trying to show the history of an OPC tag that comes from a Siemens 1500 PLC. In my vision I have a easy chart that shows a memory tag and I also want it to show the value and history of the value of the OPC tag, but for some reason it is not showing the value. I have history enabled and assigned the default database (Sample_SQlite_Database) to it, but it won't show up if I add it to the easy chart. Does this has something to do with the fact that it is an OPC tag and not a memory tag?

The red line is the memory tag and the blue must be the OPC tag but is not showing.

Quick question, how long has history been enabled on the tag?

Now for like 30 minutes but after I enabled it. I changed the value in the PLC so I could see that change in the easy chart

It will work. Change the value a few times or temporarily set a high poll rate to build some history. Then, make sure your Y-axis is scaled correctly, so the values will display in the visible chart. Also, ensure that your X-axis isn't zoomed out so far that the data points are restricted to a single pixel, and finally, make sure your pen color is sufficiently different from your plot background to create contrast.

Beyond those steps, the only thing that could prevent historical pen visibility would be an unlicensed module that is beyond its trial period, but if that were the case, you would probably be asking why the Easy Chart was red in color.

I have checked everything and when I do exactly the same with a memory tag every thing works but when I do it with a OPC tag it doesn't work.

Create a window with a table and make a tag history binding for the tags. Select "As Stored". That should reveal what data is actually being stored in the Historian.

Also, check whether your tag history is set up for Discrete or Analog. The data compression affects how this updates.

https://docs.inductiveautomation.com/display/DOC81/Configuring+Tag+History#ConfiguringTagHistory-DeadbandandAnalogCompression

I made the table and it appears that it is not storing the values for some reason. Any idea why?
image
These are the settings for the OPC tag that I want to see the history of.

It stored some value earlier to day
image

The most common cause of this, when external OPC servers are involved, is a wrong clock time in that remote server. History will be stored in the past, possibly the far past, when this is the case.

(OPC Servers are responsible for supplying accurate timestamps for their values, so they can efficiently package up multiple changes into single packets and have the separate samples processed correctly.)

2 Likes

So if I understand it correctly is it probably some setting in my PLC OPC server?
What you say makes sens cause if I look at the timestamp that it is sending with the value it is some value in 2012.....
image
.

3 Likes

I found out that the module time of my PLC was still in 2012 for some reason. I changed setting to update the time to PG/PC and now it is up to date. Thanks for help!!

4 Likes

To keep this from happening again, you might want to investigate how to keep a Siemens PLC's clock synchronized with your plant (or with the world--I favor GPS-based clock tools).

2 Likes

Now for some reason it is not showing the recent values of any tag that I add. If I change a value it still shows the old value and not the updated one.

I have tried restarting the designer, the database is still status valid and the timestamps are up to date this time.

Is your gateway time off, too?

I don't really know were I need to look for that but in the gateway status the local time is up to date
image

I'd manually query the historian partition table to see if new values are being recorded, and with what timestamp.

the latest update that went to te database was at 4:14 PM. Now it is 4:31

so it is not updating the value to the database.

Compare the timestamp on the tag's live value to the raw timestamp in the DB. Also make sure the value is actually changing. Repeat reports of the same value will not change the timestamp.

The timestamp of a changed value just gets to the current time. but there is nothing changing in de DB no new value, no timestamp change, nothing.
The value is changing to a different value then it was before and I can see that the timestamp is changed to the recent time.

I have no idea why it worked before and suddenly not anymore. Is there a limit on the default gateway DB?

I'm out of ideas. Deadband? Deadband style == Analog? (Or style == auto with data type float?)