MS Server Express.
I am reading the temperature from a heat treatment furnace into ignition. The data comes from a S7-1200 using the PLC’s OPC UA server. I have tag history enabled and I am struggling to get the “on change” mode to work - no data is logged. It seems like ignition is not detecting the change in value. I use the on change mode for all my other historical tags with no issues. This is the only historical tag that comes from a third party OPC UA server.
I have noticed that if I enable “on change” the “sqlth_te” SQL table immediately shows a new, but retired tag.
If I use periodic mode, the data is logged to SQL as expected. Please can someone suggest a way to fix this issue?
Bump. Any ideas as to why this is not working?
When you change the sample mode it will retire the old configuration on DB and create a new updated configuration, even if it is on the same tag path, so that is normal behavior.
I doubt that “On Change” isn’t working, maybe you need wait at least for the second change to start see data is getting recorded.
Thanks for the reply. I’m sure that there is an error in my setup rather than an issue with ignition.
I have left the system running for a whole day using “on change”. Despite the temperature changing by approx 600degC during the heat treatment cycle, the only data point I managed to log was when I unplugged the thermocouple, resulting in a wire break reading (the PLC subs in 999.9).
Could this be an issue with the setup of the opc server on the s7-1200?
It’s a simple configuration and I don’t think your having a bad configuration either as far I can see in your screen shots. Can you attempt to use a easy chart and plot that variable, what do you see?
I have plotted the historical tag data on an easy chart and it only shows the current or live datapoints. No historical points are captured. I have done the same with a table. As soon as I change to periodic logging, everything works fine.
Independently from ignition, I have directly queried the database. When “on change” is enabled, no data is written to SQL.
Do a little experiment, change the tag type to memory and manually change values. While historical is on change detection mode is activated.
Do you data is getting recorded from your manual inputs?
Thanks. I have around 50 other historical tags, all with “on change” enabled. They all log to the same database and work perfectly. They use a combination of the Siemens, Rockwell and Modbus TCP drivers. This is the only tag that gets data from a third party OPC server and the only one with issues with “on demand”. I can’t change the tag at the moment because this is a production machine. I am tempted to change the connection to use the S7 driver instead of OPC UA. I’m confident that if I make a new memory tag, on demand historian will work fine.
Ohh so now the problems seems to be different. Can you go to gateway web page>config>opc quick client and from those folder browse to your OPC server and find the value. Ones you have found it can you read or subscribe the value. What do you see?
Can you share results from read:
and results for subscribe? (do a couple times)
What are you seen from quality??
Can you also open your Tag editor and see Diagnostics, are you seen a last published value?
Thanks for the pointer. See below. Reading and subscribing works but the timestamp is incorrect. I wonder if I need to fix the real time clock in the PLC?
The heck haha! a subscription from 2012?
You definitely need to check the time on that PLC. However, as far as I know, the subscription timestamp should be based on the time that clients receives a response, In other words it should be based on Ignition server datetime.
What is the time of your Ignition Server?
I had assumed the same. The ignition time is from our server which is sync’d with our network ntp server. It should be accurate.
I will fix the PLC clock tomorrow and report back.
Many thanks for the help so far.
The bad timestamp on the value from the PLC, possibly in combination with your Ignition version, is likely the problem.
Dear, which versions presents this “problem”?
I have like 20 OPC Servers connected
I think 8.1.2/8.1.3 had some issues dealing with bad timestamps while backfill support was being implemented.
This afternoon I configured the PLC so it syncs time with a NTP server. I have changed the history mode to “on change” and now it works fine.
We’re on Ignition version 8.1.0. I will plan on upgrading ignition in the near future
Thanks for your help!
I see this in 8.1.11 as well. the PLC clock is one hour ahead and on change does not work. Is there a fix in later Ignition versions?