cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

When is data in KEPServerEX marked as bad? Can it be forced as bad?

Tanquen
6-Contributor

When is data in KEPServerEX marked as bad? Can it be forced as bad?

The system that's currently logging historical data doesn't know if the data is bad or not. Communication to the device it's getting their data from is good but that device may not be talking to all the other devices it's gathering data from.

 

When the device we are getting data from thinks the data is bad it just maxes the value and doesn't leave it as last known. They then have all of their reports, trends, graphs, remove the high values from those requested from the current database.

 

Is there a way to have KEPServerEX mark the data with a bad quality code, when a certain value is read? So that the Ignition Tag Historian will know the sample should be excluded from data requests.

 

6 REPLIES 6
Tanquen
6-Contributor
(To:Tanquen)

Unfortunately while we have purchased many KEPServer licenses over the years for many different projects our last projects license expired 2 months ago so support will not answer the request for information on the issue.

 

I'm guessing support will not have an answer for this odd customer request anyway but it was worth asking. Maybe the next time we buy license from them, I can ask about it.

Getting the OPC within Kepware to do it might not be possible, but can you create a script in your SQL server to look for that max value and then update the records quality tag value to 0? Schedule that to run as often as you need it to . Daily, hourly, just before a report.... whenever

 

Having said that you could just as easily remove or zero the records that have that max value. 

I did ask Ignition about that and they say you can change the values in the Historian table that they do not support it and it can break stuff.

 

"It is possible but highly not recommended as manually managing the tag historian table can break your trends/historian. However, this would be highly complex. To achieve this, you would need to follow how our tag historian works in the back end. The first query retrieves the Gateway and Tag Provider of the tag on the sqlth_drv table. The second query retrieves the scan class in sqlth_scinfo based on your tag in accordance with the first query's result. The third query retrieves all the TE entries that matches your your tagpath along with the scid from the second query. The fourth query retrieves the correct partitions table that matches your window time frame on the sqlth_partitions table. Lastly, the fifth query will look onto the partition table based on the fourth query's result and use the tagid's from the third query to retrieve the data. On the fifth query, you can alter this to instead delete the records that have a value of 'x' to fit your needs."

 

Others in the Ignition forum said there would be issues. "The query would have to handle history partitioning, etc". "Especially for tags that use analog deadband, as it will scramble the reconstruction of the "compressed" samples."

 

I was just hoping there may be a way in KEPServerEX to mark the values bad before the Ignition Historian got them. Not something many are looking to do I'm sure. 

@Tanquen 

 

It is not possible to force KEPServerEX mark the data with a bad quality code as this would be outside of the OPC Standard.

 

Thanks,

 

*Chris

 

 

Tanquen
6-Contributor
(To:Tanquen)

"Solved! Go to Solution."

Not selected solution by me and there looks to be an Ignition option and still a Kepware option. Will add info here when we have something working.

 

What is the point if others can just pick a post as the solution?

Hi Tanquen,

 

As there is no solution on your issue I have removed the accepted solution from your post. 

 

Regards,

Anurag 

Top Tags