J,
I really couldn't decifer the sequence as you described it. I'm sure the other guys were just generalizing... at least, maybe, until they saw your AB file, which I can't look at. I don't do AB. I do PLC's. (
Flame Shields Up!)
At any rate...
This is one of those situations where it is best to look at the process backwards... that is, under what conditions do you want...
Cyl-1 Extended...
Cyl-2 Extended...
Cyl-3 Extended...
Cyl-4 Extended?
You indicated that the Cylinder Valves are ON/OFF = EXT/RET (I think).
It's easy enough to build a simple table...
Stage-1 Stage-2 Stage-3 Stage-4 ... Stage-X
+---------+---------+---------+---------+-->
EXT Cyl-1 | ON | OFF | OFF | OFF |
+---------+---------+---------+---------+-->
EXT Cyl-2 | OFF | ON | OFF | OFF |
+---------+---------+---------+---------+-->
EXT Cyl-3 | OFF | OFF | ON | ON |
+---------+---------+---------+---------+-->
EXT Cyl-4 | OFF | OFF | OFF | ON |
+---------+---------+---------+---------+-->
If EXT Cyl-X is ON, as defined by the particular stage, then turn ON Cyl-X.
So, if Stage-X, or Stage-Y, or... then EXT Cyl-X, -Y?, -Z? Turn ON whatever is required by the particular Stage.
When you "see" that Stage-X has been accomplished (reading your reed-switches), change stage numbers.
That is, if "Do Stage-X" and "IS Stage-X", then RESET "Do Stage-X and SET "Do Stage-Y"
Controlling the actual outputs is the easy part...
If Stage-1, then Cyl-1 and Cyl-?
If Stage-2, then Cyl-2 and Cyl-?
etc...
The harder part, which ain't hard at all, is to determine the current "Stage".
You somehow determine that you need to begin the sequence; fine.
Then it becomes a matter of calling for a "Stage" and then verifying that the Stage has occurred. Once the Stage has occurred, quit calling for that particular Stage and then call for the next Stage.
Now, assuming that there are four cylinders, Cyl-1, -2, -3, and -4 and each cylinder is called "individualy" in sequence, that is,
Cyl-1 Ext, then
Cyl-1 RET, and Cyl-2 Ext, then
Cyl-2 RET, and Cyl-3 Ext, then
Cyl-3 RET, and Cyl-4 Ext, then, the code looks like this...
initializing code ---> "Do Stage-1"
If "Do Stage-1" and "IS Stage-1" then
RST "Do Stage-1"
SET "Do Stage-2"
If "Do Stage-2" and "IS Stage-2" then
RST "Do Stage-2"
SET "Do Stage-3"
If "Do Stage-3" and "IS Stage-3" then
RST "Do Stage-3"
SET "Do Stage-4"
If "Do Stage-4" and "IS Stage-4" then
RST "Do Stage-4"
SET ...... "Done"???
This comment isn't any better than some of the others, but it might give some insight to other lurkers.
You certainly can use "words" if you want to for the "cute" effect, but you can also use simple control relay bits for the same effect and they will be easier to troubleshoot. That is, the "status" will be easily apparent!