8 output SLC Sequencer help Pls

Lancie1 said:
Chris,

Take a look at this version. It only has 38 rungs, yet includes:

Other features you may need:
1. Decide if you need to reset the sequencer to Position 0 if the On/Off Selector Switch is turned off, forcing a sequence restart at Position 1, OR

2. If Selector Switch is turned off, should all valves close, and then restart at same place in the sequence when the switch is again turned on?


Hey Guys I am really impressed!!

This weekend i will load the code into my test plc here and check it all out.
I do like how the outputs are directly driven, i was using bits to read and write to because i didnt realise you could directly read the outputs, also i thought there was issues with double coils. Another issue i had was when you switch to stop, i didnt see how to de-energise the relay when it was operated direct from the sequencer.

Yes i do admit i do have lots to learn, thats why i am trying to get my company to place me on the AB 5 day course.
also i can see i would use soo much memory up on my code compared to yours, let alone all that time and excessive rungs.

Lancie1, there is one other feature that it needs (as you guessed) that is feature #2, when the run switch is switched off, the valves all need to close, then when switched back to run the sequence resumes from its last position.

I really do thank you for your time and efforts and will be studying to see exactly how the sequencer works so then i can give it a go writing some code myself.

Once again, i am really greatful, you are all a credit to the forum.

Regards Chris
 
Lancie1, there is one other feature that it needs (as you guessed) that is feature #2, when the run switch is switched off, the valves all need to close, then when switched back to run the sequence resumes from its last position.
That is not too difficult. What you have to do is:

1. Add a new rung to do Steps 1, 3, & 3 ONE time only (use another OSR): When Switch I:3/4 is turned OFF, IF R6:0.POS is greater than 0, then Subtract 1 from Word R6:2.POS (the current SQO Position minus 1 = Previous Position).

2. Save this result to a temporary memory location, (say save it to N7:2).

3. MOVE 0 to O:4.0 (closes all Valves).

4. Then as soon as I:3/4 is ON, do Step 5 ONE time: (you can use Rung 001 and add some output branches above and parallel with the B3:0/1 "START CYCLE" OTE.

5. If R6:0.POS is greater than 0, then MOVE N7:2 to R6:2.POS (thus setting the Sequencer back 1 step.

Now everything is in place for a normal startup, where the SQO is enabled 1 time by the OSR One-Shot on Rung 001. This makes the SQO advance 1 position, and guess what, turns on the output (opens the Valve) that was ON before I:3/4 was turned off!

Once again, i am really greatful, you are all a credit to the forum.
Your thanks are greatly appreciated.

PS: I just spotted an error on Rung 006. The two GEQ instructions should be changed to GRT instructions. That is so if the temperature difference is exactly 4 degrees, both Rungs 005 and 006 will not try to advance the SQO. There are probably a few other errors. Test it out thoroughly.
 
Last edited:
...also i thought there was issues with double coils.
The SQO is not a coil instruction. There is a big difference between SQO (Sequencer Output) and OTE (Output Energize).
OTE: On each scan, if rung is true, and if output is off, turn it on. If output is already on, do nothing. If rung is false, and output is on, turn it off. If it is already off, do nothing.

SQO: On each scan, If rung logic moves from false-to-true, advance ONE TIME to next sequence pattern. Adjust (ONE TIME) the bits in the output to match the pattern. Switch (on or off) only the bits in the Output Word that are NOT blocked by the Mask. Do nothing else UNTIL the rung logic goes false, then true again.
You might say that the SQO has a built-in One-Shot instruction. For each false-to-true transition, it operates only 1 time.

In your program, there are 2 things that prevent possible conflicting outputs for Slot 4. (1.) The SQO patterns are set up to only turn on the desired Outputs. In your program, only the right-most first 8 bits (first 8 Least Significant bits) in output word O:4.0 are turned On/Off. The other 8 bits in the word patterns are always 0, so the SQO does not conflict with any OTE instructions for Outputs O:4/8 to O:4/15. (2.) The SQO Mask is set to 00FFh (0000 0000 1111 1111 in binary). This also blocks the left-most 8 bits of O:4.0 from being affected by the SQO.
 
Last edited:
Hi All and Lancie1,

I do believe I have got there now with everyones help and support.

Friday did bring a change of specifications to the control of the valves so I have included all the mods that were required and attached the new code for you to checkout.

How the design ended up was as follows:

Valves 9&10 to be removed, no longer required to be closed in any condition, only have hand operated valves now.

Fault handling as before.
New requirement of protection and indication if air supply is lost, valves are double acting so if air supply is lost valve will not close, however it will stop the sequence.
Air supply fault indicator.
Common fault beacon to show air or valve fault, air fault is self healing however valve fault is latching.

I did find a few problems with the valve position indication, mostly being that it would not show a valve stuck open only handle the fault. I have now updated that to flash when stuck open or closed.

I have modified code to allow all outputs to de-energise in stop position or no air supply, then recommence from next step, reason for next step is so if a fault is detected it is possible to step through the sequence without further switches.

Again I would like to thank you all for helping me to understand sequencers and directly controlling outputs from them.

Do take a look at the code if you wish and if there is anything that could have been done easier i would love to know, I have throughly tested the code on the PLC now and everything is working as expected.

Many thanks to all, Regards Chris
 
mordred said:
heres an example with th counter method setup on a SLC 503

Couldn't you just mask N7 directly to the outputs?

So as the accu in the CU incrimented the outputs would appear to shift along one at a time.

Is there a "MASK" command in AB? I forget.
 
Yes, there are some instructions in Allen-Bradley RSLogix500 with Masks: MVM (Move with Mask) would work to move N7 directly to the Output word. It could be used with a Counter and a bunch of other lines to do what Chris did with the Sequencer.
 
Can the Dest. address be B3:0 so it can be put in series with other instructions on a rung to control an output?
 

Similar Topics

I had a 5/01 CPU give a CPU Fault. It lost the program and I was not able to establish communication with it. I replaced it with a 5/03 we had in...
Replies
3
Views
138
I have an strange thing happening with a SLC 5/04 On a 1746-OA16 output card I get 120 volts with or with out the output being true. The LED for...
Replies
5
Views
1,850
A customer asked if I could change an output address in a SLC 500 that he thinks is bad. I've not worked with that PLC before, so I asked him to...
Replies
6
Views
2,607
I just had a weird one last night and was wondering if anyone else has ever seen this. A SLC5/05, 7 slot rack. One thermocouple input, One 18...
Replies
3
Views
2,112
Just looking to learn something today.... My understanding is that an output shorting on a SLC Triac card is a pretty standard card failure, with...
Replies
6
Views
2,362
Back
Top Bottom