Setting Datapoint Time

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
rbischoff
Posts:2
Joined: Thu Sep 10, 2015 12:29 am

Setting Datapoint Time

Post by rbischoff »

I am writing a script that reads in historic data from a csv file and then sets the DPEs accordingly. I need the timestamp and value for each of the datapoints in the csv file to get set into WinCC. I have tried using dpSetTimed() and dpSetTimedWait(), but they don't seem to doing what I would like. Is there a function that can do this?

The two red circled values should be the same.

Any help would be greatly appreciated.

Image
Attachments
DPE_Time.PNG

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Setting Datapoint Time

Post by leoknipp »

Hello,

with the function dpSetTimed/dpSetTimedWait you can set a value with a defined time.
Please check at the panel for the _original config which timestamp and which status is displayed. The table shown in the screenshot probably does not show the time stamp for the _original value if there is also an alert pending for the given dp-element.

Also please check if you get an error at the PVSS_II.log-file when using dpSetTimed().

Please note that values have to be written in the correct chronological order. Otherwise the time stamp is corrected automatically and the status bit _stime_inv is set.
E.g. if the current timestamp for an _original-value is 2015.10.01 09:00:00 you cannot write an _original-value with a timestamp before this time, e.g. 2015.09.30 12:00:00.

Best Regards
Leopold Knipp
Senior Support Specialist

rbischoff
Posts:2
Joined: Thu Sep 10, 2015 12:29 am

Re: Setting Datapoint Time

Post by rbischoff »

Thank you for the feedback Leopold. The issue was that the timestamps were not in chronological order. I originally used dpSet() and it assigned the timestamps with the current time, so there was no way for me to assign the historic data.

Thanks again,
Ryan

3 posts • Page 1 of 1