New in the Community? Get started here

Schneider Electric Exchange Community

Discuss and solve problems in energy management and automation. Join conversations and share insights on products and solutions. Co-innovate and collaborate with a global network of peers.

Register Now
Geo SCADA Expert Forum
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Lt. Commander

[import] Quality Classifications and CurrentQuality

>>Message imported from previous forum - Category:ClearSCADA Software<<
User: brcgomezle, originally posted: 2019-01-08 21:45:43 Id:346
Hi.

I have a system where is common to do maintenance to the sensors we are reading. Each time a maintenance is started, the corresponding points in ClearScada are tagged using Quality Classifications feature, but the CurrentQuality of the point and the quality of the historic value never change from "Good" to "Bad". I'm using this feature such that all maintenances that will generate "bad" qualities won't be considered in my reports (Using historic views).

How can I set a "Bad" quality on my historic values when a Quality Classification is associated to a point?

Thanks for your help.


Reply User: sbeadle, posted: 2019-01-09 08:56:45
Approaches I have seen used:
1) Enable 'Put Aside' on the historic tab of all points. Then change your practice to override points in maintenance. This causes storage of data received while overridden into the Put Aside classification, which is not usually displayed on trends or history lists, but can be shown as another trace on trends or queried with slightly different SQL.
2) When the maintenance ends, script code to modify historic data from the start to the end of maintenance period - modified data can have a different quality, such as Bad or Uncertain.
3) Use the historic Validation feature. Validation would then need to be done on all history, because the default state is unvalidated.

 

Reply User: brcgomezle, posted: 2019-01-09 13:14:31
Your first comment almost leave me hopeless. Cannot believe this feature seems something fancy but useless to its purpose.


I will try your approaches in my local database and then in the real system, I will let you know how it ends. Thanks a lot for your help.


Reply User: sbeadle, posted: 2019-01-09 13:33:36
Sorry for the first comment - I believe you may be the first to try Quality Classifications! Your feedback is welcome.


Reply User: brcgomezle, posted: 2019-01-09 13:53:28
Don't worry, is good to know that there are other options anyway. I know how it feels to find a problem that seems nobody knows about.


Reply User: brcgomezle, posted: 2019-01-10 20:56:42
Hi sbeadle!

I'm trying to script and modify the values stored while the maintenance was performed. I'm using the following function:

oPoint.Interface.Historic.ModifyValue

But this inserts data into the historic values of the point with the quality I set. Do you know the function used in trends called "Modify Range of Values" but through script? I haven't found it.

Thank you


Reply User: sbeadle, posted: 2019-01-11 09:10:49
ModifyValues is not (yet) available from the API. I believe ModifyValue will change/overwrite the value if the timestamp is exactly the same as the original. This may be a problem in script as vbscript does not support fractional seconds. You could use script to call a Logic program written to read and write values in a range?


Reply User: brcgomezle, posted: 2019-01-11 15:21:36
I will try it. Once I have the results will let you know.


Reply User: brcgomezle, posted: 2019-06-26 20:50:34
Hi sbeadle,

I tried with scripts and definitely the best option is to enable Put Aside feature. At the time you need to tag values with 'bad' quality the corresponding point must be overriden. Once the condition is normalized, release the override value.

The put aside values won't appear in a normal CDBHISTORIC query and won't be consider into any HistoricView.

If it is necessary to see the variations while override value is set, at the end of the process Put aside values can be captured from CDBHISTORICALL and inserted into CDBHISTORIC using oPoint.Interface.Historic.InsertValue method with bad quality.

Thanks for your help.