Historical Trends are flat even though variables fluctuate

Hi Everyone,

I have got an issue with trends that I have never encountered before.

A normal trend would look something like the left half of the uploaded trend capture.

However, this morning, it was found that the trends had flatlined for a few days. The SCADA PC was restarted this morning; I also restarted it a few hours ago. It seems like every time the PC is restarted, the trends work for a while but then goes flat again.

I have checked all the connected PLCs. The tag values change with the PLC values changes. However, these changes are not seen on the trends. I have also restarted the 'Tag Historian' module a couple of times.

From what I know, all tags fetch the correct values from all PLCs. These values are reflected correctly on Vision pages. For example, a display showing some pressure will keep updating correctly. However, it looks like the updated values are NOT written to the historical database. This causes the trends to flatline.

What could be happening? Have I overlooked something? What is the remedy? Can anyone help me out please? Thanks.

Sasi Rai

Hi Sasi,

Could you give us more information about your architecture, including the database technology, data change frequency, and amount of data?

Have you checked the status of Store & Forward? Is it working as expected?

Hi m.cornet,

Thank you for your interest towards this issue.

PostgreSQL has been used in the project. However, I must admit that my knowledge in databases is rudimentary.

The 'Store & Forward' has got 5 quarantined items.

Duplicate Key Value is the reason behind the quarantine:

I also had a look at the logs and there are quite a few errors:

The 'DatasourceForwardTransaction' log show data forwarding errors, again due to duplicate key values. The 'ResultWriter' log records error executing historical tag read; not sure why/how.

This afternoon I queried the tag database and for all the tags I checked, the last entry was around 3 days ago. For example:


That's why the trends would have been flat.

This evening, even worse, the trends are all red:

What can I do? Any suggestion? Thanks.