Example 1

Cycle with a single sequence

Problem:

Note: The animations could only work if the "Zoom" of the browser is equal to 100%. If you need to adjust, go to settings of the browser.

Consider a car which can be moved between positions A and B.

The car presence in A is represented by the Boolean variable a=1, while the presence in B is represented by b=1. The car voyage is triggered by a button m (m=1 when pressed). Initially the car is car is positioned in A (resting position). The outputs of the control system are D and E (D=1, the car is commanded to move to its right; E=1, the car is commanded to move to its left. The logic controllers corresponding to the following situations are implemented:

Example 1.1:

- The transition edge of variable m (from ‘0’ to ‘1’) starts the sequence.

The actions are continuous and associated to the respective steps.

Note: There are several buttons, bellow the button/switch, m, which allows to control the pace of the animation. Thus, for a better understanding of the Grafcet evolution it is possible to pause the animation and go through the evolution frame by frame . At any moment the normal pace can be resumed . Button allows to re-start the animation.

When the variable m changes from logical value ‘0’ to value ‘1’ (just when the button is pressed) the car starts its movement and performs the trip ABA. Whatever the logical value of button m when it arrives to A, the car stops and waits for the next change in variable m from ‘0’ to ‘1’ to occur.

Example 1.2:

- Positive edge transition of the associated variable to the switch, m, starts the sequence.

The switch guaranties that the sequence can only be executed again when the switch changes from logical ‘0’ to ‘1’.

Note: There are several buttons, bellow the button/switch, m, which allows to control the pace of the animation. Thus, for a better understanding of the Grafcet evolution it is possible to pause the animation and go through the evolution frame by frame . At any moment the normal pace can be resumed . Button allows to re-start the animation.

In this case the button m is replaced by a switch. When the switch is hold (m variable changes from ‘0’ to ‘1’) the car starts its movement and performs the trip ABA. Independently of the value of m, when the car arrives to A, the car stops and waits for the next rising edge (from ‘0’ to ‘1’) of variable m. A lamp, V, is activated when the car is in the resting position.

Example 1.3:

- Sequence starts when the switch m is activated.

- In this case, the condition regarding the m variable edge transition was removed. Thus, as soon as the switch is on the sequence is always re-started.

- In the case described in the previous point, transition 3 and 1 will be fired in turn (due to m=1), which will prevent action associated to step 0 (activate lamp V) to be executed. In this case, we have a case in which the continuous action is not executed (in the logic controller external time scale) due to the fast Grafcet evolution. The same does not happens in the case of stored actions.

To finish the cycle the switch must be putted in the off position.

Note: There are several buttons, bellow the button/switch, m, which allows to control the pace of the animation. Thus, for a better understanding of the Grafcet evolution it is possible to pause the animation and go through the evolution frame by frame . At any moment the normal pace can be resumed . Button allows to re-start the animation.

When the switch m is pressed the car starts its movement and performs the trip ABA. If m=1 (switch is on) when the car arrives at point A, the car continues the movement and performs a new cycle ABA. Otherwise the car cars stops in A. A lamp, V, is activated when the car is in the resting position.

Example 1.4:

- The sequence starts by putting the switch m on.

- As in the previous example, when the switch is on the sequence keeps being executed.

- To finish this cycle it is necessary to put the switch in the off state.

- The notion of an iterated firing is present in this example.

- The cycles executed by the car are registered by a counter C. This counter is incremented in transition 3- action transition.

- When the counter reaches the value 3 (maximum) holds the car in a resting state. This happens as in transition 1 the condition [C<3], associated to the receptivity is false.

When the car is at point B, it represents an example of a delayed action (step 2). The action of the car movement to the left will be executed 1 second after the corresponding step is activated.

Note: There are several buttons, bellow the button/switch, m, which allows to control the pace of the animation. Thus, for a better understanding of the Grafcet evolution it is possible to pause the animation and go through the evolution frame by frame . At any moment the normal pace can be resumed . Button allows to re-start the animation.

A lamp, V, is activated when the car is in the resting position. When the switch m is pressed the car starts its movement and performs the trip ABA. When the car reaches point B, the car will wait for a period of 1 second before returning to point A. If m=1 (switch is on) when the car arrives at point A, the car continues the movement and performs a new cycle ABA. Otherwise the car cars in stops in A. The number of trips which the car is allowed to do is limited (3 trips).