Learning phase 5: Storing action on an event

The storing action on an event is only effective when its condition is met. This learning phase introduces you to the storing action on event and its application.

Learning steps:

  • Storing action on event
  • Definition of a condition for the event
  • Application of the AND (*) and OR (+) operators

The storing action on an event is represented by the symbol of a flag waving to the left. The condition for the action is also defined adjacent to this. In you can see an example of a storing action on an event. In this case, the negative edge for S3 is specified as the event. If step 2 is active and afterwards the negative edge appears on S3 (i.e. the status of S3 changes from True to False), then motor M1 starts.

Fig. 3.100 Storing action on an event with a negative edge

In contrast to the continuing action with an assignation condition, the following needs to be taken into account for a storing action on event:

The event must occur after the step to which the action is linked has become active. If the step is not active, the term for the event is not evaluated.

In the example above, this means: If the negative edge appears on S3 before step 2 is active, and step 2 becomes active afterwards, then the event is not fulfilled.

An AND operation is specified in the transition condition after step 2. The AND operator "*" links the two operands S2 and S1 here, whereby S1 is integrated into the operation negated. The condition is thus fulfilled if S2 has the status True and S1 the status False.

An AND operation is performed with "*"; an OR operation with the character "+".

Fig. 3.101 Storing action on an event with positive edge

You can see an example of the storing action on a positive edge in the figure above. If step 2 is active and a positive edge occurs on S3 afterwards (change of status from False to True), then the motor M1 starts.

Note on entering edge operations: You enter negative or positive edges in GRAFCET Studio with CTRL + [arrow up] or [arrow down].

PLC-Lab Filename GRAFCET-Studio Filename
Without PLC Lab system! M1M2.grafcet

In this exercise, you are to develop a GRAFCET with the following conditions:

Step 1: M2 and S2 need to be idle (False) in order to switch on the motor M1 over a continuing action with an assignation condition (basic position).

Step 2: The advance to step 2 takes place when M1 and S1 are True. In step 2, a storing action on the event "positive edge for S2" should set the motor M2 to *True.

Step 3: If S1 returns to False, then step 3 becomes active for two seconds and on exiting step 3, the operand M2 is set to False*. The initial step then returns to being active.

Note: The application task is described in pure textual terms. We recommend developing the GRAFCET with GRAFCET Studio in stages as described

Fig. 3.102 Solution to the application

Fig. 3.103 Storing action on an event

In Fig. 3.103 the basic position is fulfilled and M1 is set to True. In step 2, you can see the storing action with the event "pos. edge for S2". If step 2 is active and S2 then changes from False to True (pos. edge) then M2 is also assigned the value True. As you can see in the GRAFCET Studio I/O panel, M2 stays on the value True, even if S2 changes back to False.

The application is to be modified so that the transition from step 2 to step 3 is performed as soon as S1 has the value False, but also if step 2 has already been active for three seconds.

Fig. 3.104 New transition condition after step 3 with an OR operation

  • The symbol with the arrow pointing to the left is used for the storing action on event. The symbol reminds of a little flag.
  • A valid condition (term) for the event must be defined.
  • If a linking between operands is to be created in the condition by an AND operation, state the AND operation with the character "*".
  • If a linking between operands is to be created in the condition by an OR operation, state the OR operation with the character "+".
  • For storing actions on an event, assignation is made using the assignation operator ":=".
  • The GRAFCET standard recommends that the event is labelled with a ↑ positive or ↓ negative edge.

PLC-Lab Filename GRAFCET-Studio Filename
Presse.plclab Presse.grafcet

The pressing process of a hydraulic short-stroke press is started with a two-hand Start button and an inserted workpiece (sheet metal). The press then closes itself until the applied pressure of 10 bar is reached. A resting phase of five seconds then takes place and the press opens again. After the workpiece has been removed from the open press, the basic condition is restored and a signal is put out that a new workpiece can be inserted.

Fig. 3.105 Diagram of the technology of the hydraulic press

Definition of the operands: Symbol Description
S1PressTop "Press at top" sensor, value = False if pressed
S2PressBottom "Press at bottom" sensor, value = False if pressed
S3ItemAvailable "Workpiece inserted" sensor, value = True if pressed
S4Start "Start" button, returns True when pressed
PressureInBar Sensor for built-up applied pressure, value ranging from 0-50 bar
Y1ClosePress Valve for closing the press, True = Press closes
Y2OpenPress Valve for opening the press, True = Press opens
P1InsertItem "Insert workpiece" lamp

Step 1:

In the basic position – Press is at the top (negated query of S1PressTop) – the H1InsertItem lamp is set; this signals to the operator that a workpiece may be inserted. The transition condition for the subsequent transition is fulfilled as soon as the operation H1InsertItem AND S3ItemAvailable returns the value True. The transition to step 2 then takes place.

Step 2 and step 3:

In step 2, Y1ClosePress is set to True as soon as the positive edge S4Start is recognised. The press closes and the pressure builds up.

Step 4:

In this step, Y1ClosePress is now switched off, since the pressure has reached >= 50 bar, whereupon the resting phase starts with 5s/X4.

Step 5:

The press is opened and now waits for the operator to manually remove the workpiece so that S3ItemAvailable adopts the value False.

Fig. 3.106 GRAFCET for a hydraulic short-stroke press

  • What is so special about a storing action on an event compared to the storing action without an event?
  • When is the event for a storing action on event evaluated?
  • Which edges can the event have?
  • Does the assignation operator ":=" also have to be used with the storing action with an event?
  • Which character is used to represent an AND operation within a term?
  • Which character is used to represent an OR operation within a term?
  • Why is the expression [PressureInBar>= 50] placed in square brackets?
  • Step 1 is active in the figure below. Is the transition to step 2 performed if only S4 has the value True?