CapinWinky
Member
I've recently written several bits of code that needed record relative time between events to a high accuracy. I used the [WallClockTime -> CurrentValue] which is a LINT that is microseconds since 1970, but everything goes to **** if the operator changes the system time from the HMI. That made me look for an alternative and it looks like I have several to choose from. I was hopping someone that knows for certain could shed some light on the differences between them.
CST -> CurrentTime: This seems like the base value that Wallclock is offset from. Does it change if the system time is changed?
TimeSynchronization -> CurrentTimeMicroseconds: Not sure how this is different from CST. Is this a separate clock for CIP?
TimeSynchronization -> SystemTimeAndOffset -> SystemTime: Is this exactly the same as CurrentTimeMicroseconds?
WallClockTime -> CurrentValue: Microseconds since 1970. Since we use this to display the current date/time on the HMI and allow you to set the date/time from the HMI, this is a bad choice for timing in the program.
TON/TOF: Which time do these use to run? How high can they count? I know they require a scan every 69 minutes which is probably because they are using a DINT with microseconds as their source (would roll over after 70.58 minutes).
CST -> CurrentTime: This seems like the base value that Wallclock is offset from. Does it change if the system time is changed?
TimeSynchronization -> CurrentTimeMicroseconds: Not sure how this is different from CST. Is this a separate clock for CIP?
TimeSynchronization -> SystemTimeAndOffset -> SystemTime: Is this exactly the same as CurrentTimeMicroseconds?
WallClockTime -> CurrentValue: Microseconds since 1970. Since we use this to display the current date/time on the HMI and allow you to set the date/time from the HMI, this is a bad choice for timing in the program.
TON/TOF: Which time do these use to run? How high can they count? I know they require a scan every 69 minutes which is probably because they are using a DINT with microseconds as their source (would roll over after 70.58 minutes).