Hello,
I have a data point's archive, how can I correct my data point's value at a certain point of time using Control's script?
For example,
at first I use dpQuery() function for getting next archive's values:
MyDataPoint.myElement:_online..value = 150
MyDataPoint.myElement:_online..stime = 2020.09.04 12:15:00.350
then if I want to corect them I have to use correct values like these
MyDataPoint.myElement:_corr..value = 190
MyDataPoint.myElement:_corr..stime = 2020.09.04 12:15:00.350
but what functions or steps do I have to use for setting these correct values?
As far as I know then I could use dpQuery() fucntion with _offline's config element of MyDataPoint to see a result:
MyDataPoint.myElement:_offline..value = 190
MyDataPoint.myElement:_offline..stime = 2020.09.04 12:15:00.350
correct data point's value using Control's script
- MassEffect
- Posts:29
- Joined: Mon Aug 24, 2020 8:19 pm
correct data point's value using Control's script
- kilianvp
- Posts:443
- Joined: Fri Jan 16, 2015 10:29 am
Re: correct data point's value using Control's script
Assuming the variable Ttime has the value of MyDataPoint.myElement:_online..stime
Code: Select all
dpSetTimed(Ttime,"MyDataPoint.myElement:_corr..value",190);- MassEffect
- Posts:29
- Joined: Mon Aug 24, 2020 8:19 pm
Re: correct data point's value using Control's script
Thank you so much!
- MassEffect
- Posts:29
- Joined: Mon Aug 24, 2020 8:19 pm
Re: correct data point's value using Control's script
Another small question)
How can I remove any changes that was added using the function dpSetTimed(Ttime,"MyDataPoint.myElement:_corr..value",190)?
How can I remove any changes that was added using the function dpSetTimed(Ttime,"MyDataPoint.myElement:_corr..value",190)?
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: correct data point's value using Control's script
There is no possibility to delete values which are already saved in the WinCC OA archives.
You can only modify an existing value by writing a correction value for the same time again.
Best Regards
Leopold Knipp
Senior Support Specialist
You can only modify an existing value by writing a correction value for the same time again.
Best Regards
Leopold Knipp
Senior Support Specialist
- MassEffect
- Posts:29
- Joined: Mon Aug 24, 2020 8:19 pm
Re: correct data point's value using Control's script
Thank you!