Sequencer With Changing Steps

The Plc Kid

Member
Join Date
Feb 2009
Location
Macon, Georgia
Posts
3,233
I need some guidance on writing a sequencing program and I really don’t want to use the sequencer instruction.

This is a slc 5/04 processor and it is used for an oiling system. This system has 8 zones and all zones are not always active and that is where the difficulty begins.

The valve for each zone needs to open from between 1 to 85 seconds and when a zone becomes active its time put into the step sequence. For example let’s say we have zones 1, 3, 5 active and the time for each of the zones is 10 seconds. Now later zones 2 and 4 become active and their time is 60 seconds this needs to be put into the sequence.

All these zones run off 1 psi pump. So how is the best way to build a simple easy to follow sequencer and how the best way to enable and disable zones and put those times in and out of the sequence.

When a zone is not active I would like to skip its time and move to the next zone.

I have written an entire program for this machine my first project this big and I have been banging my head all day to get to the best and cleanest solution to do this.

I just want to get it right the first time. Can someone give some example that may apply or be similar?

I just need a point or a shove in the right direction
 
I think I would avoid a sequencer also. I think they are great where you do the same thing every time.

You could have the sequencer look for value "A open" ie 10. IF A machine is running then a value would be put into "value A open" ie 10 - if not zero. If the value is 0 the valve stays shut if 10 the valve opens.
Been a while since I did sequencer and I do not have AB book here.

Think I would go with timers.
So you have 3 zones A B C
A is 10 sec B is 20 C is 30. Those are run times. OFF times for simplicity are double the run time.

A and C are running.
So RUN switch for A is shut and timer start for 10 sec. Valve open. timer hits 10 stops and start 20 sec timer. When 20 reset 10 sec timer restarts and reopens valve.

B would be next in ladder logic but its "circuit" is turned off so skip to C

C would be doing same thing as A with its own timer values in its "sequence".

Dan Bentler

Bit simplistic but I think good for starters.
 
what decides the time for zones ?

following your example, zones 1,3, and 5 are ON for 10 seconds...2 and 4 are ON for 60 second...who decides those timings and HOW ? the code shouldnt be too large
 
You have a lot more to clarify before anything meaningful can be said. These things may be obvious to you but not at all to us who are totally unfamiliar with your system. Let's take your paragraph:

The valve for each zone needs to open from between 1 to 85 seconds and when a zone becomes active its time put into the step sequence. For example let’s say we have zones 1, 3, 5 active and the time for each of the zones is 10 seconds. Now later zones 2 and 4 become active and their time is 60 seconds this needs to be put into the sequence.

Let's say just zones 1,3 and 5 are active with the 10 seconds you note. Please explain in a timing diagram when the outputs for these zones turn on, how long they stay on (especially, is more than one on at a time?), How long are they off, that is how long until they turn back on again? Is one ON/OFF timing what you call a 'sequence'?

Now describe the same action with zones 2 and 4 with the 60 seconds? What does it look like?

Actually answering this may make it clear in your mind how it needs to be programmed.
 
It needs to be a continuous loop or sequence always stepping.

The time values come from what you set in the hmi for each zone depending on what product is being run. If there is a value of zero then that valve or step in the sequence should be skipped. Or if the zone is not enabled from the hmi that zone or step in the sequencer should be skipped.

There should only ever be 1 on at a time i.e. zone 1 time down when finished jump to zone 2 time down when finished jump to zone 3 but zone 3 set to zero or disabled skip zone 3 and jump to zone 4,etc

The unit that is being replaced is some old single board control running custom software. It appears to have 1 time and changes the in ab would be the preset of the timer. If a zone is zero or inactive it loads the next active value in the sequence. Just trying to replicate the same setup in rslogix without the sequencer command. My manager has got burned with sequencers and says we have to do it without the sequencer command. But we can build our own.

I have built simple step sequencers before but loading the values and skipping inactive zones is where I am having a problem.
 
Boss does not want sequencet then do not do it.

Will you regularly change valve on or off times?

You can do with timers. As long as PLC turned on it will sequence thru and when a rung for timer turns on then it will open the valve for set time then shut valve for set time. Should take two timers for each valve and one input and one output per valve.

Dan Bentler
 
It needs to be a continuous loop or sequence always stepping.

The time values come from what you set in the hmi for each zone depending on what product is being run. If there is a value of zero then that valve or step in the sequence should be skipped. Or if the zone is not enabled from the hmi that zone or step in the sequencer should be skipped.

There should only ever be 1 on at a time i.e. zone 1 time down when finished jump to zone 2 time down when finished jump to zone 3 but zone 3 set to zero or disabled skip zone 3 and jump to zone 4,etc

The unit that is being replaced is some old single board control running custom software. It appears to have 1 time and changes the in ab would be the preset of the timer. If a zone is zero or inactive it loads the next active value in the sequence. Just trying to replicate the same setup in rslogix without the sequencer command. My manager has got burned with sequencers and says we have to do it without the sequencer command. But we can build our own.

I have built simple step sequencers before but loading the values and skipping inactive zones is where I am having a problem.


so you need to use a pulsing bit to triger a counter that counts up to 7 and then resets it self, this the loop that will give you eight different values to compare with to control eight zones.

have a comparing instruction compare counter's value and e.g.

if counter = 0 then next instruction on the rung should be the active OR inactive bit, if active;
latch Pump ON.
latch interlock ' so that only this pump is on

timer done bit then resets pump ON and interlock and which ever zone is active in que will be operated next..

does that help ? if you understand BASIC, try to write it in a basic language and then translate to ladder this should be hard at all.


hope this help. Kyle
 
For this first of all you have to configure outputs in HMI about the Enable function & the required value with the HMI. This values of each timer you have to configure as a input to the PLC & set it to the SET VALUE of the respective timer. Than use one output in parallel with the timer output & use this output as a input to another timer(i.e when it is negative trigerred). Put the timer condition to enable as if the SET VALUE is zero make this timer off. For the third timer make two parallel connections at the input side. one at the falling edge of the timer2 & second if falling edge of no.1 is detected & timer2 output is off than count this timer. here also put enable signal as value is not zero start the counter, & use the same logic for all timer.

I am not familiar with AB plc but I have done it with Schnieder Modicon plc

reply that it is working or not
 
Basic Ideas:

Use an integer as a step counter.

Each step consists of two rungs.

The first rung is where the step actions happen, it starts with EQU instruction with the Step No and a constant. Next put an XIC "zone enabled" contact. Finally, put whatever actions you want for this step.

The second rung is where the step conditions are, it also starts with EQU instruction with the Step No and a constant. Next put all the conditions that indicate this step is complete. Finally, use a MOV instruction to place a new value in the Step No. Use a parallel branch around all the conditions with an XIO "zone enabled" contact.

The EQU with the Step No. makes your rungs only active for the step they are intended for. Using a MOV to control the Step No. gives you flexibility for future additions and modifications. Starting off with step numbers like 10, 20, 30 etc. makes later inserts much easier. Using a "zone enabled" contact to inhibit the actions, and move you immediately to the next step takes care of inactive zones. Really, when you think of it, it *is* just a special condition.

Hope this helps you get going. Good luck and let us know how it works out.
 
Last edited:
All these counters and steps. Why make it so complicated?

For each zone - if enabled MOV its preset into the preset for its timer otherwise MOV zero into the preset.

Set a chain of the 8 timers, each one starting from the DN bit of the previous. Ther first being reset by the DN bit of the last.

Then while each timer's TT is true fire the associated output.

My only concern is that, according to the spec, if only one zone is enabled it will fire continously. There has been no mention of an off time between these firings of one output.
 
The unit that is being replaced is some old single board control running custom software.
Therefore it probably was not very complex, just some cascaded timers. If a timer is set to 0, then that cycle is skipped automatically.

I find Bernie's KISS idea to be the best so far. I ran it past LogixPro (see attached PDF file) and it works well. I set up only 3 Zones to keep it on one print-out page, but any number of zones can easily be added. The first 3 rungs are actually not necessary if the HMI is set up to write time values directly to each zone timer Preset. If a zone timer Preset = 0, that zone gets 0 seconds output (skipped) and the next zone is energized.
 
Last edited:
What if you want to run zone 1 first, then zone 4, then zone 6, then back to zone 1 again?

I like a sequencer for this, just call it a "matrix map" or something and use MOV with indirect addressing for the zone bits and the timer presets instead of the classic sequencer instructions...no input sequencing, just a timer driving a pointer as long as the system is in auto...

Paul
 
Last edited:
Paul,

If the zones were in some random order, then a sequencer would be difficult to control also. However, the given specifications do not require anything except ascending numerical order. Also, the boss doesn't like sequencers. Who wants to argue with the boss?
[When] Zone 1 time [is] finished, jump to zone 2 time. [ ] When finished, jump to zone 3. But [ ] if zone 3 set to zero or disabled, skip zone 3 and jump to zone 4, etc,.
My manager has got burned with sequencers and says we have to do it without the sequencer command.
 
Last edited:

Similar Topics

I'm seeing some confusing descriptions on the Bit Sequencer (BIT SEQ) in the GE PLC instruction set and I'm converting one of these to AB so I...
Replies
11
Views
1,901
Hello All, Im alot more experienced with the CLICK PLC - They have a pretty user friendly Sequencer in their ladder logic software - very easy to...
Replies
2
Views
1,166
Hello everyone, stay safe at home, please. I'm looking for a solution in WPLSoft Delta in order to control 3 compressors boosters, attached...
Replies
25
Views
5,519
Hello Everyone, I have just started exploring the Sysmac studio and I am not familiar with the instruction set of the sysmac studio.I am trying...
Replies
2
Views
1,691
Hello All, I have a question regarding Honeywell HC 9000 sequencer function. I'm using this function to escalate energizing additional controls...
Replies
0
Views
1,328
Back
Top Bottom