Sign in to follow this  
Followers 0
ARYankee

Military Time for contrologix processor

4 posts in this topic

I've not had to set the time before on a proccessor so I may be missing something. Is there any way to set the processor time to military time? It would make my life so much easier in programming grabbing shift and daily batch counts.

Share this post


Link to post
Share on other sites
I don't have access to a ControlLogix system right now but I have never seen a PLC RTC readout in anything but 'military time' (hours from 0 through 23). If you mean something else please comment.

Share this post


Link to post
Share on other sites
The "wallclock time" object in the controller definitely uses 0- 23 for the Hour numbers. In v16 and later, there's both a controller time that's on UTC time, and a "Local Time" that's adjusted for time zone and can adjust for daylight saving time. You use a GSV instruction to put the DateTime or LocalDateTime attribute of the WallClockTime object into a DINT[7] array. The fourth element (offset [3]) is the Hour number. It's 1:43 PM here on the Pacific Coast, so the Hour value for LocalDateTime is 13 and the Hour value for the DateTime is 21.

Share this post


Link to post
Share on other sites
Thank you for the replies. I realized after I had posted this and the time passed noon that it was indeed in military time. 0-23. Now I feel goofy for even asking this. I do appreciate the help though. Edited by ARYankee

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0