sequencing help

jrfraney

Member
Join Date
Jul 2011
Location
Valley Springs
Posts
4
I'm new to the forum so first hi all.

Ok I need some help with some fans that I'm trying to sequence. First I'm using a ABB PM573-ETH PLC. Programming with coDeSys.

Basically what we are trying to accomplish is:

1. We have six fans with six switches. That are DI's.
2. When the first fan switch gets flipped it comes on right away.
3. When the second fan gets flipped on it has to wait for x amount of time before it is allowed to turn on.
4. This continues to happen until all are turned on. (they are given sequencing numbers based on the order they are switched on.)
5. These fans need to be able to be turned off and on all day without interruption.
6. Also I have a delay before the fans can get a sequence number because the people in the field flip the switches on and off expecting the fans to turn on. We have told them many times that there is a built in delay. (The delay has to be there for the purposes of the application.)


I have most of the code done but I'm running into issues with it getting out of sequence once the fans are on and I toggle other fans. I have attached a PDF of my code. If there is a more efficient way of doing this please let me know. I'm a self taught programmer and I'm struggling with this. If you need more information I'm glad to give it!

Thanks!!!
 
first what is your problem.
should the fans each have a delay before start or should there be a delay after a fan is started.
as the sequence you tell is timerelated i would use a array with six times in it.
why is there a delay? for power supply?
why not block the switching on until delay is passed and then give all switches back light on until one is on etc.
a delay for the switch is easy a TON
i would use function blocks (easier and more flexibel.
 
JR,

WOW! This looks complicated!

It does remind me of a program I once did for 11 heating units. This was to keep the system power demand as low as possible. The specifications were similar: Only 1 unit could start at a time, and there must be a time delay after starting each unit, to keep power demand = current required to start 1 unit + load of running units.

The reason I bring this up is that the Church Heating program for 11 units had to fit in the customer-selected programmable device, which happened to be slightly more than a programmable smart relay, the Omron ZEN. It has a very limited number of rungs, relays, and timers. I came up with a unique solution that some told me was impossible, and maybe it would work for your case of 6 units. At first study, I don't see anything to keep this method from working, except it does not use a Sequencing Number. If that is a requirement, then my method would not work.

The secret method is simply to quit looking at which units have started and so on, but instead look at whether and when a START IS POSSIBLE. In your case, a fan start-up is possible X minutes after the last start-up! How many relays do you need to keep up with that? ONLY ONE (along with a timer for each fan)! See the M5 relay in the Church Heating Sequencer. It took 42 rungs, but many of those were needed because of the ZEN limit of only 3 input instructions per rung. Normally, there are only 2 rungs required per unit, plus a rung for the START POSSIBLE relay.

I think if you substitued your Fan Start switch for the Thermostats in the ZEN program, you could translate the program fairly easily to use for your fan sequencer.
Here is a link to a PDF copy of the next-to-final program. The last version simply converted all the outputs to normally closed, to produce a fail-safe mode. Then if the ZEN got removed, thermostats worked normally to control units.

http://www.plctalk.net/qanda/showthread.php?t=7012&highlight=furnace+startup&page=10
 
Last edited:
The PDF copy is the ZIP file that Eric Nelson uploaded on Post #47. Back then, we could not post PDF files directly, so had to first ZIP them.

I think that if someone had a copy of the ABB programming software, they could convert the Church Heating Sequencer to do JR's job in about 10 minutes. I think it will take about 3 rungs x 6 fans + 1 = 19 rungs of logic to do the whole job. This assumes that it doesn't matter what order the fans start, just so every one gets its chance to start, and none start before X minutes since the last fan started. Here would be the rungs for Fan 1, and last rung for Latch Relay M5. Other 5 fans would be similar.
 
| Fan 1 Start |
| Request PB FAN1_FR FAN1_REQ |
|---+---o o---+-----|/|-----------( )------|
| | | |
| |FAN1_REQ | |
| +---| |----+ |
| M5- START |
| FAN1_REQ POSSIBLE FAN1_FR |
|-------| |---+-----| |----+---+-----( )-----|
| | | | |
| | FAN1_FR | | FAN1 TIMER |
| +-----| |----+ +----(T1)-----|
| |
| FAN1_FR T1 RESET M5 |
|-------| |---------|/|--------------(R)-----|
| | START
. . . . . . . POSSIBLE
|FAN1_FR FAN2_FR FAN3_FR FAN4_FR FAN5_FR FAN6_FR M5 |
|---|/|--+---|/|---+--|/|---+--|/|---+--|/|----+--|/|-+-(S)-|
| | | | | | | |
| T1 | T2 | T3 | T4 | T5 | T6 | |
|---| |--+---| |--+---| |--+---| |---+---| |---+--| |-- |
| |

 
Last edited:
You would need either a Stop PB next to the Start Request PB, or make the Start Request switch a maintained selector switch input.
 
Here is complete 6-FAN START SEQUENCER program in only 13 rungs. It runs on the LogixPro Simulator. It should easily convert to the ABB PLC.

Premise: A fan can start if it is next to request a start, or if X time has elapsed since the last fan start-up.

If two or more Start Requests occur within same X time period, there is a tie, and then the fan highest on the ladder rung logic has preference. For this reason, consideration should be given to the fan order when placing the rung logic.

For example, if these are ventilation fans used for cooling a building, and the building east-facing side (first to get hot during a typical day) has fans 4, 5, 6, then Fan Relays 4, 5, and 6 should be placed first, followed by Fans 1, 2, and 3 on the west side of the building. If there is a race between Fan 4 and Fan 1, 4 will win so will get to start first.

A rung could be added to Move a time value into ALL of the Timer Preset Values, so that if the delay time needs changing, it could be changed by changing only 1 number instead of 6.
 
Last edited:
If the Fan Switch Inputs are simple ON-OFF selector switches (as apparantly JR's fans have), then the first rung and every other rung can be deleted, so that each fan only needs one rung, plus the START POSSIBLE relay rung, for a total of only 7 rungs!
 
first what is your problem.
should the fans each have a delay before start or should there be a delay after a fan is started.
as the sequence you tell is timerelated i would use a array with six times in it.
why is there a delay? for power supply?
why not block the switching on until delay is passed and then give all switches back light on until one is on etc.
a delay for the switch is easy a TON
i would use function blocks (easier and more flexibel.



The first fan to be turned on should turn on right away. Then no other fan should be able to turn on until 20 minutes have past.

The delay is because these fans are for tunneling in a cold storage application. If the fans are not delayed and are allowed to start one after another we would reduce are refrigeration capabilities.


Lancie1 thanks for all the help!!

My program needs to put the fans in a sequence. If switch 3 is turned on first then it comes on right away and starts a timer that wont allow any fan to turn on until its done. But say switch 3 is turned on, then right after switch 4,1,2,6,5 are turned on this should happen.

Fan 3 comes on right away, 20 minutes after fan 4 comes on and starts another 20 min delay, fan 1 comes on and starts a 20 min delay, ect...
 
Last edited:
The simplest and fewest number of rungs will be to use a FIFO (First In, First Out) instruction, with a memory storage area length of 6 words.

The FIFO Load command will record the sequence of Fan Start Requests. The FIFO Unload command will be enabled each time a fan finishes the 20-minute period. Only 1 timer should be needed, starting at each fan start, and after 20 minutes, timer causes FIFO to Unload and start next fan in the sequence.

The ABB PLC should have a similar instruction for sequencing a series of word data.

Next question: How do you handle repeat requests? Say Fan 1 has run for 20 minutes, then all the other fans take their turn, but in the meantime Fan 1 is stopped and a new request put in for Fan 1. This means the FIFO could need to be much longer than 6 storage locations. It would need to be long enough to store all repeat requests. There has to be some upper limit artibrarialy set for the upper limit of allowed start requests - maybe 10 or 12 would be a reasonable number of allowed total requests, including repeats.

If the number of allowed requests is unlimited, then if different people (or different automatic equipment systems) are putting in these requests, then each area can maximize its run time (sabotage the sequencing system) by putting in a continuous stream of fan run requests. Once a Fan has a request locked into the FIFO, do you prevent that fan from putting in another request until after it has its turn and finished its 20-minute start time?

Another question: How long are the start requests good for? Do you reset the requests at the end of a work shift, end of 8-hour day, or end of 24-hour day? Do you let the requests carry over and just add new ones on top of the old ones?
 
Last edited:
The simplest and fewest number of rungs will be to use a FIFO (First In, First Out) instruction, with a memory storage area length of 6 words.

The FIFO Load command will record the sequence of Fan Start Requests. The FIFO Unload command will be enabled each time a fan finishes the 20-minute period. Only 1 timer should be needed, starting at each fan start, and after 20 minutes, timer causes FIFO to Unload and start next fan in the sequence.

The ABB PLC should have a similar instruction for sequencing a series of word data.

Next question: How do you handle repeat requests? Say Fan 1 has run for 20 minutes, then all the other fans take their turn, but in the meantime Fan 1 is stopped and a new request put in for Fan 1. This means the FIFO could need to be much longer than 6 storage locations. It would need to be long enough to store all repeat requests. There has to be some upper limit artibrarialy set for the upper limit of allowed start requests - maybe 10 or 12 would be a reasonable number of allowed total requests, including repeats.

If the number of allowed requests is unlimited, then if different people (or different automatic equipment systems) are putting in these requests, then each area can maximize its run time (sabotage the sequencing system) by putting in a continuous stream of fan run requests.

Another question: How long are the start requests good for? Do you reset the requests at the end of a work shift, end of 8-hour day, or end of 24-hour day? Do you let the requests carry over and just add new ones on top of the old ones?

I'm not sure of the FIFO command with ABB I will look into the help file and call tech support if i can't come up with anything.

For your repeat request question. I have tried to implement this with the two counters that I have. The first counter on rung 20 puts the fans into their respective start sequence after a small delay. That delay is because on the fan control panel there are the 6 on/off switches. The operators in the past have flipped the switches on then off repeatedly messing up the sequence.

The next counter on rung 33 is controlled by the timer in rung 1. It is used to cause the delay sequence.

These fans are worked 24 hours a day. They have a max run time of 2 hours. That max run time is not in the code yet. But they are turned on and off all day. They are not loaded in any particular order. They have temp probes by the fan and once the tunnel reaches temp they are unloaded and loaded with new product.

I have attached of photo during construction. The fans we are controlling are on the bottom.

NH3 Plant Pics 324.jpg
 
The operators in the past have flipped the switches on then off repeatedly messing up the sequence.
Yes, I can see they would try to get a fan higher up in the list if possible. If these are maintained-contact selector switches, I would put a seal-in relay for each fan switch in the PLC that latches on when the fan switch is on. Once a fan seal-in is on, it stays on until that fan has rose to the top of the sequence and run for 20 minutes. That would help eliminate the bogus requests. The problem is that (using maintained-contact fan selector switches), the PLC cannot really tell the difference between an old already-handled run request and a new never-handled request.

You might consider replacing the ON-OFF selectors with momentary contact pushbuttons. Pushing once locks in the fan request, and repeated pressing of the button does nothing until that fan has run for 20 minutes (or some other time or event has happened - temperature reached setpoint?). ONLY after that, another button press would enter that fan into the run sequence AGAIN.

I think my program will do 95% of what you need. It (1) allows the first fan to start immediately, and (2) the second request will be handled after some X settable time, and (3) a tie with two or more requests results in a run sequence.

My program orders this tie run sequence in the order that fans are put in the PLC rungs, but a FIFO could be used to set this order as the requests occurred. Problems start coming up when you try to keep up with the order of requests, because the method of entering and deleting those requests is not well-defined or well-controlled.
 
Last edited:
I studied the ABB AC500 Function Block library, and it looks like there is no built-in sequencer equal to a First In First Out instruction in the Allen Bradley PLCs. The closest I can recognize is the CamSwitch function block, which is not exactly the same function.
 
I like Lancies suggestion of the FIFO with a modification
we change it to a start order queue limited to the number of Fans (6) and each fan MUST have only one entry in the queue.

Initialize the Queue with 1 to 6
Now when an operator presses a switch that Fan comes to the Start of the Queue (ie the next fan to start) - Block that Queue Position and Fan from being changed by the operator for the next x min, The next Operator request goes into the next unblocked Queue Position

When a Fan Starts that Fan number is removed from the start of the queue and added to the End of the Queue

By doing this you end up with a initial list of Fan orders (first operator order wins for a time) that repeats


Then the rest of the code is like lancie said - Timers etc
 
The operators in the past have flipped the switches on then off repeatedly messing up the sequence.
I like Lancie's suggestion of the FIFO with a modification:
We change it to a start order queue, limited to the number of Fans (6) and each fan MUST have only one entry in the queue.
I agree. Looking at the picture, and thinking about the situation, it is ridiculous to allow any operator switch to mess up the sequence. To prevent that, the PLC program needs one more piece of information: A signal that the PROCESS IS COMPLETE (cooling tunnel has reached setpoint temperature). Six new inputs may need to be added for this. There may already be an indicator or signal for "Temperature Reached", otherwise operators would not know when they could unload a tunnel. With this additional bit of information, the PLC program can easily prevent any operator switch from messing up the fan start sequence or changing it any way whatsoever (once a fan is locked in a start position).

The program would work like this: Once the tunnel is loaded, operator presses button to request a fan start. Program assigns this fan a number from 1 to 6. This number is sealed in, and the switch for that fan is locked out so that any other presses or switches from that point is completely ignored UNTIL that fan tunnel reaches setpoint temperature. Then that fan number is unloaded from the run sequence, allowing another entry from any fan switch.
 
JR,

It seems part of the problem is that the function of these switches is not fully understood by all the operators. I know that I certainly cannot understand how they are supposed to work. It seems that important information is withheld from the operators. For example, if these are maintained-contact ON/OFf switches, then once an operator turns a switch on, that should signal that this fan be placed in the start que. What does turning the switch off signal? Does that mean to take it out again, or turn the fan off, or what? If the operator turns the switch off, he has no way to know if the fan is still in the run que, or whether someone else has already entered the request. There needs to be a couple of signal lights for each fan, one indicating "Start Request", and a second one for "Fan Running". These would help the operator know what is going on in the program.

To help you, I need more info about the fan switches. You say the operators flip them on and off. What is the proper signal supposed to be? Once a fan is needed, are the operators supposed to turn on a fan switch and leave it on? Are these maintained-contact selector switches? Your logic implies that they are. If a switch is turned off, does that mean that that fan is no longer needed, is done running, or what?
 

Similar Topics

I got a sg2-20 controller to handle operating a few relays on a machine I am building/modifying. I'm new to ladder logic but not programming...
Replies
12
Views
2,618
This is a great website! I have a vacuum lift that is going to be used to pick and place sheets of plywood. I am using RSLogix 5000. I have five...
Replies
8
Views
4,592
Anyone have any tips on a program that can stage on four discrete outputs one at a time based on a variable. These outputs must come on...
Replies
10
Views
5,151
Does anyone have sample logic with conveyors that start and stop according to product on the line?
Replies
1
Views
104
Hello, I am struggling to figure out some logic. I have an analog pressure sensor coming into the PLC and would like to have multiple timing...
Replies
4
Views
151
Back
Top Bottom