Read SLC 5/05 Clock Hour & Minutes

Ones_Zeros

Member
Join Date
Feb 2014
Location
at work
Posts
367
Hello
I was needing to stop one device and start the second device
at a certain time each day, for example 10:00 am each day.
I thought the best way to do this would be to use
the SLC 5/05 clock Hours and Minutes register below.

S:37 Year
S:38 Month
S:39 Day
S:40 Hour
S:41 Minute

How would be the best way to start unit #1 at 10:00am each day and let
it run for 24 hours. Then stop unit# 1 the next day at 10:00am and then startup unit# 2 and let it run for 24 hours.

Just keep repeating the process each day cycling between unit#1 & unit# 2

Thanks for helping
 
So this is basically a daily duty rotate at 10:00am?

S40:0 EQU 10 (with one shot so it only executes once) - set duty change bit.

Duty change bit toggles Duty bit.

If you have more than 2 devices use an integer register to keep track of duty and increment it each time Duty Change bit is set. Wrap around back to 1 when greater than number of devices
 
Those are the registers commonly checked for the date & time.


One thing to keep in mind with the SLC's is they do not have a real-time clock in them. The CPU counts milliseconds and increments the clock itself.


I found that if you check S:42 Second it seems to make the CPU skip timing during that check. I had one program I checked the second quite a few times and the clock lost about 5 minutes every day.


Now as a standard I MOV S:42 N7:42 at the beginning of the scan and check N7:42 throughout the program without affecting the clock. When I did this the CPU clock became more reliable.


But they can still be off a few seconds a day that can accumulate to minutes a year. If the time is critical I took a suggestion from this forum and put a digital appliance timer on an input, set the timer to come on at 7:30 AM and when it comes on, with a OSR, I MOV 30 S:41 and MOV 0 S:42. If really critical I check exactly when the timer comes on and can MOV that exact time, say 29 to minute and 17 to second.
 
Thanks let make sure I follow

- add a one shot in behind the S40:0 EQU 10 bit to trigger the “duty cycle output #1” at 10:00am
- what could I use to reset the one shot bit for the #1 unit? Could I have the “duty cycle output #1” to reset the one shot bit so it’s ready to execute the next day at 10:00am for unit#2
- I think your saying the one shot will prevent unit#1 from running again the next day
- what starts unit#2 after unit#1 stops? I would have to have the same clock S40:0 EQU 10 bit to start #2 unit right?

I may be over thinking this but wanted to make sure I understand the logic

Thanks for helping
 
The oneshot is to get a pulse at 10am. Use the pulse to toggle a bit that is used to drive the two devices.

Ok but I don’t want to run them both at the same time. (unit#1) will run at 10:00am and run for 24 hours and then turn off at 10:00am the next day then startup (unit#2) to run for 24 hours. I’d like to set a timer to turn off (unit#1) 5 minutes after (unit#2) gets to running.

Thanks again
 
Use the day parameter (S:39) as a permissive. Unit #1 runs on odd days, Unit #2 runs on even days. Same clock parameters used for both units.

Or create your own incrementing number as the permissive.

Same as Bit_Bucket_07's method
 
Last edited:
I’d like to send you guys an example of the list Logix
and let me know what I need to add or remove if that’s ok?

One thing I noticed is it looks like the “ONS” instruction
is not available in the SLC 5/05 controller? It’s grated out
and won’t let me select it.

Is there an alternative instruction I can use?

Thanks
 
It should.be there but regardless you can also make your own sort of.oneshot.tomit.executes only once per day. Latch a bit that has an xio of the same bit then unlatch it again when the minutes has incremented again. The also you.can toggle so when that rung exectutes it checks a bit to.latch if its un latched and unlatch if its latched then this toggle bit is used to control which pump.
If using 3 or.more pumps you can use a counter and rest function with compares for each number being a different pump.
 
One thing I noticed is it looks like the “ONS” instruction
is not available in the SLC 5/05 controller? It’s grated out
and won’t let me select it.

Is there an alternative instruction I can use?

Thanks


Check for OSR (One Shot Rising)


The day-of-month suggestion won't work as there are months with 31 days
 
Last edited:
I’d like to send you guys an example of the list Logix
and let me know what I need to add or remove if that’s ok?

One thing I noticed is it looks like the “ONS” instruction
is not available in the SLC 5/05 controller? It’s grated out
and won’t let me select it.

Is there an alternative instruction I can use?

Thanks


You are aware that in AB, a one-shot is not an output instruction, as it is in some other PLCs?
 

Similar Topics

Hello, is it possible to read a message using a controllogix L61, from a SLC, that is connected to a PLC-5 that already is sending data to the...
Replies
7
Views
2,112
Hello, I inherited a control system one of my predecessors thought it was a good idea to put logic for cant optimization and Kinetix motion...
Replies
15
Views
3,456
Hello. I have a new 5069 L320ER that I installed and I am trying to read and write data to an existing SLC5/05 via Ethernet. They are both on the...
Replies
4
Views
2,520
Hello, I have a PID block in my program controlling pump speed in order to get a correct Differential pressure. The way I have it set up is the...
Replies
3
Views
1,238
Good Evening , I'm finally understanding a MSG instruction a little better. My question is , I'm using a MSG read in a CompactLogix to see...
Replies
3
Views
1,876
Back
Top Bottom