A state diagram can be converted to equations by writing an equation for each state and each transition.
A sample set of equations seen in See State Transition equations for the traffic light example, see a traffic light state diagram.
Each state and the transition must be assigned a unique variable name. (Note: It is a good idea to note these on the diagram)
traffic light system with plc control
These are then used to write equations for the diagram.
The transition equations are written by looking at each state, and then determining which transitions will end this state.
For example, if ST1 is true, and crosswalk button S1 is pushed, and S2 is not, then transition T1 will be true. The state equations corresponding to the state equations in the previous State Equation method, except that they now only refer to transitions. Recall, the basic form of these equations is that the State will be where it is already on, or it is turned on by a transition. The State will be off if the exiting transition occurs. In this example the first scan had his own transition, but it could also have been put into the equation for T4.

A state diagram is the equations, which he converted an equation for each state and each transition.
A sample set of equations found in the lake with the transition equations for the traffic light example, see a traffic light state diagram. Every state and the transition must have a unique variable name. (Hint: It’s a good idea to be on the card, note) This is then used to write equations for the diagram.
The transition equations are written by the individual states, and then determine a final crossing of the State. For example, if ST1 is true, and crosswalk button S1 is pushed, and S2 is not, then transition T1 will be true. The state equations corresponding to equations of state in the previous equation method, except that they now only refer or transitions. Revocation is the basic form of these equations, which will be the state if it is already on, or it was switched on during the transition.
The state is disabled if there is a departure transfer. In this example the first scan was itself in transition, but it would have been brought into the equation for T4.
traffic state diagram logic

State-Transition Logic equations

These Logic equations can be directly converted to the ladder logic in See Ladder Logic for the State-Transition Equations, See Ladder Logic for the state transition equations and See Ladder Logic for the state transition equations. It is very important that the transition equations occur, all the equations for the state. Updating the transition equations first and then update the state equations is negated to change the problem of state variable values - remember this problem was in the state equations discussed in the section.

Update Timer
traffic state diagram equations

PLC ladder Logic of the State-Transition Equations
Calculate State Equations
PLC ladder Logic of the State-Transition Equations
Update Outputs
PLC ladder Logic of the State-Transition Equations

This problem of prioritization also occurs with the logic equations of state transition.
The equations were written in See State Diagram for the priority for the equations of state transitions.
The problem occurs when there are transitions A and C simultaneously. Regarding the example transition T2 is given a higher priority, and if it is true, then the transition T3 will be suppressed when calculating STC.

PLC ladder Logic of the State-Transition Equations

Tags: activity sequence diagram, , , , , , , , , , Allen Bradley PLC, plc inputs and outputs, PLC ladder Exemple, plc ladder logic diagrams, PLC programming, programmable logic controllers plc, state machine diagrams, structured text plc plc, wiring diagram