Beckhoff / TF6000_ADS_DOTNET_V5_Samples

Sample code for the Version 6.X series of the TwinCAT ADS .NET Packages
https://infosys.beckhoff.com/content/1033/tc3_ads.net/9407515403.html?id=6770980177009971601
BSD Zero Clause License
37 stars 15 forks source link

Incorrect DateTimeOffset value at ValueChangedEventArgs #35

Closed Barteling closed 1 year ago

Barteling commented 1 year ago

When i receive a value changed notification i want to store the event time. But the timestamp given with the notification seems to be incorrect. It looks likes the time is in UTC 0. But the offset matches my current time zone.

image

RalfHeitmann commented 1 year ago

Where does the value changed Notification come from. Is it a different system (with different time settings/TimeZone)? Sourcing from a local system, I don't see any difference.

Barteling commented 1 year ago

Different system, i'll check the time on the system.

Does the date time variable come from the target system (plc)?

RalfHeitmann commented 1 year ago

Yes, that is the TimeStamp of the Notification occurence on the PLC (target) System. It bases on the TwinCAT time (that is synchronized with the system time on TwinCAT SystemService Start).

The TwinCAT time could have a drift to the System Time too because it runs independently from the System time between startups.

Barteling commented 1 year ago

I believe i messed up the date and time myself . So i close this one