Weeky Schedule in RsLogix 500

MJC

Member
Join Date
Mar 2011
Location
ILL
Posts
125
Hi, I’m having a hard time wrapping my head around creating a weekly schedule for a pump to turn on.
Setup:
Micrologix 1400 1766-L32BWAA RsLogix 500

The pump schedule is Monday thru Sunday and the pump is to turn on at 20:00 hrs and off the next morning at 3:00. The attached logic screen shot is only for Sunday, and if I enter hour 3 in to the off time this will not work due to the day advancing to 1=Monday. Can anyone help?

untitled.jpg
 
First rung:
On Sunday the pump runs from 20:00 till Midnight.

Second rung:
On Monday the pump runs for 0:00 till 3:00 and from 20:00 till midnight.

Third rung
On Tuesday the pump runs from 0:00 till 3:00 and from 20:00 till midnight.

Fourth rung
On Wednesday the pump runs from 0:00 till 3:00 and from 20:00 till midnight.

etc.
 
@TConnoly, each day may have diffrent on time off time settings for the pump to turn on and off.
 
Mickey thanks for the suggestion this may be what I’m looking for I just have to figure out the hours of run time.
 
Last edited:
Thats fine, the same method can handle different times. The general idea I'm trying to get across is to handle each day separately instead of trying to handle a midnight roll over. Write it either using words or make a timing chart, day by day with your start and stop times. Any midnight crossing is a stop for that day and a start for the next day. From there it should be easy to program the rungs.
 
You can use a start time in hours and have the operator enter the duration time of the pump run time
 
Last edited:
@TConnolly can you please post an example of the logic when you get at chance. Thank you.I used the logic that Mickey and Adam303 posted but I really want to use the off time as an actual hour, and I'm not fully understanding your concept of doing this.
 
Will each run of the pump start late in one day and run past midnight until sometime early in the next morning? That would be easier. If it could be any time to any time then it's a little more complicated. We need to have a handle on the range of possibilities.
 
I see three cases:
  1. If Stop time > Start time, start today and stop today.
  2. If Stop time < Start time, start today and stop tomorrow. This includes stop at midnight, 12:00am or 0000 hours.
  3. If Stop time = Start time, this is the trivial case where the pump never runs.
You can use the day of week to point to arrays of start and stop times, but freeze the pointer while the pump is running.
 
I wonder why no one has suggested using a 7 day minute value

Timer = 0 to 7 * 24 * 60 -1 (Max Value is 10079)

Value is calculated from the RTC
(DOW * 24 * 60 ) + HR *60 + Min

Logic is now just GRT OR LES a value that spans a week

On Time and Off Time are also calculated based on settings - Up to the programmer to create the ON/OFF comparison values for each time
EG On Time = 10 pm DOW 0 to 4 gives 5 on times
Off Time = 3 am for DOW 1 to 5 gives 5 off times
eg
On1 = 10 * 60
Off1 = 1 * 24 * 60 + 3 * 60
IF Time >= On1 and time < Off1 OR
Time >= On2 and time < Off3 OR
Time >= On3 and time < Off3 etc
Then Pump is on
Else Pump is off

GEQ -----LES -----|-----(Pump ON)
Timer Timer |
On1 Off1 |
|
GEQ -----LES -----|
Timer Timer |
On2 Off2 |
|
GEQ -----LES -----|
Timer Timer
On3 Off3

ETC



Only hard part is a pump that starts before the end of the week and then must continue running into the start of the next week
one way to do this is use two comparisons one for the start of the week the other for the end of the week

Start of the week is On1 = 0 Off1 = ???

End of the Week On19 = ??? Off19 = 10080
 
Last edited:
Will each run of the pump start late in one day and run past midnight until sometime early in the next morning? That would be easier. If it could be any time to any time then it's a little more complicated. We need to have a handle on the range of possibilities.
Bernie the pump run times will be as follow for each day of the week

DOW On Time Off Time
Sunday 1:00 5:00
Monday 20:00 3:00
Tuesday 20:00 3:00
Wednesday 20:00 3:00
Thursday 20:00 3:00
Friday 20:00 3:00
Saturday 18:00 4:30
 
Although it may initially seem more complicated, using a sequencer is a great was to accomplish this. I have several set up for things like automatic temperature and pressure set-back that you just can't rely on employees to do on a regular basis. The nice thing about a sequencer is that you can use an HMI to form a graph with hours on the horizontal axis and days of the week on the vertical. Assigning a indicator pushbutton to each block alloows multiple schedule changes in a day if the need ever arises. Easy for anyone to change, too.
 

Similar Topics

I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
9
Views
164
I'm using a Micro850 with a Panelview 800, programming in CCW. We'd like the customer to be able to schedule the system to startup at a certain...
Replies
5
Views
123
Hi All, Thanks in advance for any information. We will be upgrading an 1756-L63 controller and two Ethernet Communications Modules (1756-ENBT)...
Replies
2
Views
1,206
I'm trying to create a schedule in the assetcentre, this schedule has only one event: backup and compare. The problem is that the event runs and...
Replies
1
Views
1,614
Hello, Does anyone know how to transfer a production schedule data into an Allen Bradley CompactLogix PLC? We have a machine that slices...
Replies
1
Views
1,686
Back
Top Bottom