GSV Walltimeclock Retentive?

Kentech1

Member
Join Date
May 2015
Location
Kent
Posts
1
I am currently working on a refinery site and looking at an ongoing issue regarding a loss of data after power loss to a Contrologix 5562 Processor. These are gas usage totaliser readings returning to zero. Inside the code the totalisers are reset when the PLCTime variable is set to midnight each day and yearly totaliser on the new years eve at midnight (Year 1, Month 1, Day 1, Hour 0, Minute 0. The PLCTime is produced by a GSV Walltimeclock function, this is in the main routine.

I know that variables should be retained after a power loss, but i wasn't sure how this dealt with the GSV Walltimeclock. Is it correct to think for the first scan this would default to Year 1, Month 1, Day 1, Hour 0, Minute 0, Second 0, mS 0. If this is the case is there a way around this??
 
I made a simple program using the GSV and Compare instructions to latch bits if Localtime[n] was equal to zero. I used year, month, day, hour and minute. The only way I was able to make bits latch was to remove the battery from the plc. Of course this required to download the project after power up. When I did this the hour bit latched and WallClocktime defaulted to 1/1/1998 00:00

No bits latched with battery in place and cycle of power. The time was retained.

S:FS is the first scan bit in RS5K. Search for that to see if the first scan resets your values.

good luck with your project and Welcome to the Forum.

edit: program was done on L5562 version 18
 
Last edited:
Welcome to the Forum !

Is it correct to think for the first scan this would default to Year 1, Month 1, Day 1, Hour 0, Minute 0, Second 0, mS 0

This is only true if the controller battery is dead or disconnected, and the main power has been cycled.

I agree that a powerup routine of something conditioned on the S:FS first scan bit is probably resetting this logic. Also check to be sure that nobody is running the "Logix 5000 Clock Sync Utility" on a misconfigured computer.
 

Similar Topics

I'm trying to dig to the source of a minor "recoverable" system fault throwing a fault light on a machine that has been confusing my operator...
Replies
3
Views
124
So, I'm really just trying to get some experience by practicing with arrays. I'm using studio 5000 v33. I have one rung with an XIC bit that's...
Replies
5
Views
275
Hello all, I know in the past it's been the case that we wanted to limit the total number of GSV calls per scan of the PLC. Is that still the...
Replies
2
Views
677
Hello, I have a question regarding the status checking of the module in the secondary chassis in a redundancy setup. CHASSIS 1 ...
Replies
6
Views
1,169
Hello Members We have a controllogix redundancy setup and need to display the status of redundancy in panelview. I have found in the manual the...
Replies
8
Views
1,294
Back
Top Bottom