GSV wallclocktime problem

sparky mark

Member
Join Date
Jul 2008
Location
Lititz, PA
Posts
12
using a 1768-L45
when I use a GSV / class name WallClockTime / attribute LocalDateTime
I get the year / month / day / hour / minute / second as expected except that the hours are always 5 hours advanced. So if it is 10 AM I get 15 for the hours. Seems like I am always getting GMT, and I would like to get local time.
PLC CPU date/time is set correctly and eastern time zone (UTC -05:00)is set. is there a way to get the local hours without doing some math on the hour value.
Thanks in advance for your help.
 
OK found it

There were two GSV's in the program. one with attribute DateTime and one with attribute LocalDateTime and both writing to the same tag.
Thanks for your help.
 
And to clarify for anyone else reading this thread. "DateTime" is UTC. LocalDateTime is adjusting for timezone and DST. Typically you want the LocalDateTime.

OG
 
And to clarify for anyone else reading this thread. "DateTime" is UTC. LocalDateTime is adjusting for timezone and DST. Typically you want the LocalDateTime.

OG

The "LocalDateTime" is not adjusted for DST, unless you set it up and enable it. The RTC does not do DST adjustment automatically. It only adjusts for timezone, based on the configuration.

To make the RTC do DST adjustment, you have to "ApplyDST" (INT : non-zero) and not "ApplyDST" (INT : zero) on the dates you need it it adjust, the adjustment is a number of minutes you have to preset into DSTAdjustment

Many people believe that the DST adjustment is "built-in" - it isn't, it's an offset you have to control with code.
 

Similar Topics

Hello.. I'm working to get myself up to speed with the use of the GSV instruction to retrieve controller time values in the Logix5000 world. But...
Replies
8
Views
9,515
Hello, I am doing a PLC5-Contrologix plant migration. So far with the same exact GSV WallClockTime to DateTime array half of my controllers...
Replies
2
Views
1,578
Hello: Before posting had a look to previous posts for Logix Studio's GSV WallClockTime, but did not see anything that could help me. Would be...
Replies
4
Views
1,881
Good Morning , I know it has been a lot of discussion about the Wall Clock in ControlLogix. I have been looking at the sample program, and...
Replies
6
Views
6,143
I am trying to get the Wall clock time with GSV. I was looking at this you tube video Here, I noticed that the Data type that they picked was...
Replies
5
Views
5,941
Back
Top Bottom