[ControlLogix] Local time on PLC says PDT, but hour is +7

defcon.klaxon

Lifetime Supporting Member
Join Date
Feb 2015
Location
Far NorCal
Posts
616
I'm working on some code that timestamps certain functions, and I've noticed that the hours value is +7 in the tag I'm using for time, but it displays the correct time when I go to the PLC's properties (Date/Time tab). This is on both a ControlLogix and CompactLogix PLC.

The "Date and Time" display on the Date/Time tab has the correct local time; my timezone is UTC-08:00 for Pacific time, and I have the box checked for Adjust for Daylight Saving. Time Synchronization is currently not enabled, I'm going to tackle that later.

The way I grab time is through a GSV (Class Name is WallClockTime, Attribute Name is DateTime, Destination is a UDT I made for Year, Month, Day, Hour, Minute, and Second). All other values come in just fine (Year/Month/Day, and Minute/Second) so it seems like for some reason, the hour is ignoring my time zone offset and daylight saving time offset and it going off of UTC.

Any ideas for why it's doing this, and how I can get my hour tag to have the proper value without manually offsetting its value? My guess is that I'm grabbing the info from the wrong source.
 
Instead of DateTime, you need LocalDateTime.

LocalDateTime was I believe added somewhere around firmware revision 13 (don't quote me on that) - it caught me out once when flashing from v11 to v19 firmware. The time had been working fine previously, but all of a sudden it was 11 hours out!
 

Similar Topics

This ControlLogix PLC is located remotely via fiber. At the PLC location, the fiber comes in, goes through a "BlackBox" converter, then out to...
Replies
9
Views
3,964
Hi all, i would like to be able to assign a bit in my program to show if an output modules electronic fuse has popped. does any one know if...
Replies
5
Views
2,168
Why does the controllogix redundancy modules use a single mode fiber vs multimode fiber?
Replies
1
Views
57
Hello, I have two 16 point input cards and 1 16 point output card showing module faulted on my IO tree in Logix Designer. The fault code is...
Replies
7
Views
207
Hello, My associate and I are trying to sync up two ControlLogix racks (7-slot chassis) with identical modules. We are able to see the secondary...
Replies
4
Views
184
Back
Top Bottom