Time not correct with GSV instruction

MedSelmi

Member
Join Date
Dec 2019
Location
Montreal
Posts
15
Hello Experts !

I'm making improvement in old program with rslogix5000 v20 and L72S controller. I want getting the real system hour and there is already GSV instruction used in this program.
My problem is that I get only incorrect value of hour as you see in screenshot.
Please What could be the reason ?
Best Regards.

SystemTime.png
 
The GSV can be configured to retrieve either the "DateTime" or the "LocalDataTime". The LocalDateTime is adjusted for Time Zone and Daylight Savings just like what you are seeing in the Controller Properties window.

OG
 
In older versions of controllogix (such as v13) there wasn't a setting for time zone or a DST option. Most people just set the time in the PLC to the local time. Using the GSV(DateTime) always returned the local time.

When they added time zone and DST into the firmware in v16, our accustomed default of using GSV(DateTime) for the local time no longer worked. I think having that information in the PLC (at least for my industry) has been more trouble than it's worth. Much of the time, we now set the time zone setting to UTC and then apply whatever the local time zone's time is. By doing it this way we don't have to go change instructions in the logic.
 
It is also worth mentioning that DST adjustments to the WallClock are not automatically switched on and off for you.

You will have to write code to do it at the correct junctures of the year.
 
It is also worth mentioning that DST adjustments to the WallClock are not automatically switched on and off for you.

You will have to write code to do it at the correct junctures of the year.

Can you please give me more details about this point ? how can I do this ?
 
It's probably easier to simply make the change by hand twice a year.


"Easier" is most times not practical for a "fit and forget" project.

My "solution" is by no means perfect, but at least it will "auto-correct" within a few days. Without manual adjustment to the Wallclock's settings, it performs the DST adjustment automatically, based on the country's "rules" for DST
 

Similar Topics

Hello All, In our facility we are utilizing an Allen Bradley Compactlogix controller. I have a GSV instruction in my program which is currently...
Replies
9
Views
2,287
Daft question coming up...When I want to modify a value, what's the best/correct way to do this? At the moment, I am entering the value (e.g...
Replies
8
Views
435
Good day. I encountered a problem when calibrating a channel on the IF16H module. The module is located in the local backplane along with the...
Replies
5
Views
742
I have some programs that i received from 1 of our programmers whos installing a new machine in our plant. He added them to a external hard drive...
Replies
9
Views
1,358
Hi, At the moment, If the user fails to provide a valid username/password, the image attached appears "Invalid password or user name. Logon has...
Replies
12
Views
1,575
Back
Top Bottom