RET
Member
Forgive me but your example doesn't make much sense to me.
"Starting", as you have said implies a mode or state the machine is in, not a sequence. This screams bits to represent each mode or state. Within each mode/state you have a sequence that occurs. Or you could have 1 sequence, where steps 0 - 10 make up your "starting" mode, steps 11 - 20 your "running" mode, steps 21 - 30 your "stopping" mode...etc.
I can see on a large complex system having a master sequence of "Step 1 - Starting", "Step 2 - Running", "Step 3 - Stopping"...etc which is a sequence but really used to track state. Each of these kick off their required sub-sequences. Thinking about it, this example seems to be a good justification of integer:
Of course you can use bits in my example, but again for fluidity across the PLC/HMI/Documentation, integers are very clear. Even in this case, you have multiple sequences occurring but each is exclusive and identifiable simply by the integer step number.Code:// Using code formatting for clarity Step 1 - Starting Step 10 - "Starting Step initialize" Step 11 - "Starting Step #1" Step 12 - "Starting Step #2" . . . Step 19 - "Staring Step #9" Step 2 - Running Step 20 - "Running Step initialize" Step 21 - "Running Step #1" Step 22 - "Running Step #2" . . . Step 29 - "Running Step #9" Step 3 - Stopping Step 30 - "Stopping Step initialize" Step 31 - "Stopping Step #1" Step 32 - "Stopping Step #2" . . . Step 39 - "Stopping Step #9"
That's the problem, though, if you do have multiple sequences occurring in parallel. Having one integer tag to indicate the multiple sequences, steps or states that the machine may be in, especially if it's not a truly sequential operation, restricts your insight into the process, kind of like assigning an integer value to a single tag depending upon any myriad of alarms states that can be present, I'd like to know all of them.
I've seen it both ways, but the huge range of systems and processes that control people work in, nothing can be absolute for all, it just all depends on the system and situation.