Use Wallclock as trigger for CLR

halberd388

Member
Join Date
Apr 2006
Location
Montgomery, AL
Posts
4
Greetings all,

I am new to programming let alone Ladder Logic programming, having only taken 1 basic instruction/Allen Bradley hardware class yesterday. My AM wishes me to create a timer reset for 36 timers based upon 2 times (start of shift for 2 shifts), one at 05:00 and the other at 17:15 every day since we work 7 days a week; I know what I must do, using wallclock as a trigger for the CLR instructions for each timer one one rung, but I do not know what else I need to do.

We run mostly 1756 ENTB/A with Logix5555 processors (I hope I listed that correctly). Please excuse my newness, I was hired as a network admin and now I'm needed to assist the programmers for a year long project so I'm being rushed trained with very little training to speak of.
 
To clarify...

I know to use GSV (Get System Value) to pull the Date and Time info from the Logix5555, I know I have to use CLR instructions for each timer, but I don't know how to set XIC(s) based upon the specific times from DINT bits 3 and 4 (Hour and Minute) from the tag I create to pull the info from GSV.
 
There are some fundamental differences between the way CLR works and RST works when it comes to timers. CLR can be used to clear (or zero) the value in the accumulator of a timer (CLR TIMER.ACC), however it does not reset any of the timer status bits such as the DN (done) bit or the TT (timing) bit. Using a reset (RST TIMER) on the timer structure address will not only clear the value in the ACCumulator but also reset the status bits.
 
Use comparrisons and oneshots to peform the actual action.

This rung will reset TIMER1, TIMER2, and TIMER3 at 17:15

EQU WALLCLOCK.HOUR 17 EQU WALLCLOCK.MINUTE 15 ONS SSStorage.0 RST TIMER1 RST TIMER2 RST TIMER3

(adjust as needed to match your tag names and data structures as you have defined them)
 
Last edited:
Then thats a good reason to use CLR. I just wanted to make sure you were understanding the difference.

The one-shot it to make sure that the CLR occurs only once at the very beginning of 17:15. It is 17:15 for a full minute and there is probably not a need to execut the CLR thousands of times for that full minute.
 
Halberd, one thing you should be warned of. The wall clock time I think is a set variable, so doing a program download may screw up your time in the processor. If the wallclock time gets screwed up in the processor, you're reset times will get thrown off also. Just some food for thought.

Russ
 
I won't be loading the routine directly into the system that controls the time. We have a seperate PLC that specificly controls times and such, so no worries there. :)

We have around 60 PLCs, so I have alot of help, I came here to ask because I'm not allowed to ask newbie questions to the specialists.
 

Similar Topics

Hello, Been struggling with getting a 1769 L33ER PLC clock to accept an HMI entered time. I can successfully get the date/time to change but it...
Replies
7
Views
7,226
I have problem to set wallclock for controllogix by using SSV.
Replies
4
Views
2,804
My Wall Clock , on a CompactLogix ,as been working great , until now. My Year , Month , Day , Minute , Second , and Microsecond is good , but my...
Replies
5
Views
1,879
I setup this wallclock and using the AOI logic I don't get back the correct day as today would be the 5th day however I show 4 and for Wrk_F and G...
Replies
12
Views
2,715
Hi Guys, I am trying to get the PLC wall clock to trigger a reset. I have gone through various posts on PLCtalk website and other website did...
Replies
9
Views
3,437
Back
Top Bottom