TimothyMoulder
Member
I've been thinking about the order in which states occur, and my question can be framed by how they are commented.
Let's say we have a single cylinder machine with three states : Cycle Start, Forward and Return.
Which is the better order? The latches are for clarity.
In the first example, the name "Forward State" refers to the machine's condition at that point. "Forward State" means "the machine is in a Forward State".
In the second example, the name "Forward State" refers to the activity happening in the state. "Forward State" means "the machine is moving into a Forward State".
Each has it's advantages. The first is purely accurate, but it has a disconnect with the outputs affected, i.e., the output is turned on in the previous state. The second activates all related outputs, then monitors the related inputs - each state is totally self-contained.
Which would you rather see in a program?
Let's say we have a single cylinder machine with three states : Cycle Start, Forward and Return.
Which is the better order? The latches are for clarity.
In the first example, the name "Forward State" refers to the machine's condition at that point. "Forward State" means "the machine is in a Forward State".
In the second example, the name "Forward State" refers to the activity happening in the state. "Forward State" means "the machine is moving into a Forward State".
Each has it's advantages. The first is purely accurate, but it has a disconnect with the outputs affected, i.e., the output is turned on in the previous state. The second activates all related outputs, then monitors the related inputs - each state is totally self-contained.
Which would you rather see in a program?
Example 1
I Cycle Start Output A
I-----I I--------------( )
I
I Cycle Start Forward LS Forward State
I-----I I------------I I-------------( L )
I I Cycle Start
I I-----( U )
I
I
I Forward State Return LS Return State
I-----I I------------I I-------------( L )
I I Forward State
I I-----( U )
I
Example 2
I Cycle Start Forward State
I-----I I--------------( L )
I I Cycle Start
I I-----( U )
I
I Forward State Output A
I-----I I----------------------------( )
I I Forward LS Return State
I I--------I I-----------( L )
I I Forward State
I I-----( U )
I
I Return State Return LS Return State
I-----I I------------I I-------------( U )
I
I
I