Example 4

Shared Resource

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.

Let’s consider two transportation cars (wagons) which serve two discharging places:

Initially both cars are in the respective resting positions. By pressing button p1 car C1 performs the trip ACA. If button p2 is pressed, car C2 performs trip BCB. When the cars return to the initial position (A and B), they remain resting and wait for a new command. Moving commands are ignored when the respective car is not in the resting position. Motor M1 moves C1 to its right, and analogously M3 for C2. Motor M2 moves car C1 to it left, and M4 moves C2 in the same direction. The direction switch is controlled by a solenoid valve V. When V=0 the direction switch points to path BCB; when V=1 the direction selected is ACA. When a car arrives to the switching area, di, can only pursuit the trip towards C if the track di-C is free (with i=1,2). Logical controllers corresponding to the following situations will be represented by Grafcets:

Example 4.1:

- Continuous actions associated to the motors.

- Action in activation defines the value of the variable controlling the solenoid valve V.

- Semaphore notion: by using a step to symbolize a free resource and two convergences and, it is possible to control the car access to the shared zone.

- Note that the receptivity which gives the order to car 1 to move forward is 1 and the one of car 2 is /X2. Thus, an always true receptivity is used in order to give priority to car 1.

- Following transition edge associated to the variable of transitions 5 and 11 signs that the shared zone if free.

The extra button “p1 and p2” allows to simulate the simultaneous pressing of the respective buttons.

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.

By pressing button p1 or button p2 the corresponding car starts moving towards point C. When a car arrives the switching zone it checks if the shared track is free. If it is, it moves forward, otherwise it waits until it stays free. In the situation when both cars arrive simultaneously to the switching zone (d1 and d2), priority to move forward it assigned to C1.

Example 4.2:

- The solution implemented in example 4.1 is adapted here with partial grafcets.

- In this form it is possible to visualize the control of active parts (car and semaphore) independently.

- Condition associated with transition 13 refers to steps where cars start entering the switching zone and the condition of transition 15 is where cars release the switching area.

- The receptivity of transition 3 (previous example) is replaced by condition X3 (indication of shared resource availability).

- Transition 9 receptivity condition (previous example) is adapted from /X2 para /d1.X3, i.e, car 2 moves forward when car 1 is not at the beginning of the switching area (d1=0) and the shared resource is free (X3=1).

The extra button “p1 and p2” allows to simulate the simultaneous pressing of the respective buttons

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 example the cars control is implemented by using partial Grafcets.

Example 4.3:

- To understand how to implemented the access to a shared resource.

- In this example it is applied a control to the cars which enables using the shared resource alternatively.

- In this case it is necessary second semaphore (step 13).

- The semaphore active initially is step 3 (priority of access to car 1).

- In this case, a semaphore step is never active two times in a row. This guaranties the alternative access to the shared resource.

The extra button “p1 and p2” allows to simulate the simultaneous pressing of the respective buttons

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.

Here, cars will have access to track di-C alternatively (with i=1,2). Initially just car 1 can perform the trip towards C. C2 can perform the trip towards C, after C1 has used the shared resource. If car C1 is commanded to perform trip ACA again before C2 has perform trip BCB, it will have to wait in the switching zone until C2 finish using track d2-C. And so on… A car can never use the shared resource twice consecutively.