GrafcetMaker Open the editor

Actions

Actions are the rectangles to the right of a step. They say what the system does while, or when, the step is active. Select a step and press A to add one; press A again on an action to add the next one. Choose its kind with the picture buttons of the Properties panel: each one shows how the diagram draws that kind.

Continuous actions

The most common kind. The text is the name of an output (or internal variable), e.g. Pump. The output is true while the step is active, and false as soon as no active step drives it.

Choose the Conditional kind to add a condition (an assignment condition): its input appears under the kind buttons, and the output is true while the step is active and the condition is true. It is drawn on a short line above the box.

Lamp while step 4 is active; Horn only while alarm is also true 4 Lamp Horn alarm
Lamp while step 4 is active; Horn only while alarm is also true

Timers in the condition give the delayed and time-limited actions of other notations:

  • 5s/X4 — delayed: the output turns on 5 s after step 4 became active.
  • /(5s/X4) — time-limited: on during the first 5 s of step 4 only.

Note: steps crossed during a transient evolution (see GRAFCET basics) do not execute their continuous actions.

Stored actions

A stored action changes a value once, and the value stays until another action changes it. Its text is an assignment: C := C + 1, Motor := 0, Speed := 2.5. To set a BOOL variable to TRUE, its name alone is enough: Motor means Motor := 1.

  • On activation — executed when the step becomes active. Drawn with an arrow ↑ above the box.
  • On deactivation — executed when the step becomes inactive. Drawn with an arrow ↓ below the box.
  • On event — executed each time the event occurs while the step is active, e.g. ↑reset. Drawn with a flag at the top right, next to the event. Enter the event in the Properties panel; an action on event without an event never executes and is reported as a problem.
Stored on activation (↑), on deactivation (↓) and on an event (flag) 5 C := C + 1 Motor := 0 C := 0 ↑reset
Stored on activation (↑), on deactivation (↓) and on an event (flag)

Activation and deactivation actions can also have a condition: they are executed only if it is true at that moment.

Stored actions are executed even by steps that are only crossed during a transient evolution. Use them to count, to latch a value (Motor := 1 in one step, Motor := 0 in another) or to remember that something happened.

Forcing orders

A forcing order imposes a situation on another partial grafcet while its step is active: G2{8} activates step 8 of grafcet G2 only, G2{*} freezes G2 in its current situation, G2{} deactivates all its steps and G2{INIT} puts it back in its initial situation. It is drawn with a double frame. See Macro-steps, enclosing steps and forcing.

Actions without a step

An action does not have to belong to a step. With nothing selected, press A (or pick the Action tool) and click empty canvas: the action is drawn on its own, without a link, and it is always active.

  • A continuous action without a step sets its output whenever its assignment condition is true, whatever the steps: Lamp with the condition a * b is the logic Lamp = a · b. Without a condition the output is always true.
  • A stored action on an event runs every time the event occurs, e.g. C := C + 1 on ↑pulse counts pulses. On activation, it runs once when the simulation starts. On deactivation it never runs, since the action is never deactivated.

Drag any action to move it: onto a step to attach it there (the step lights up and a mark shows its place among the step's actions), or onto empty canvas to leave it without a step.

Several actions

A step can have any number of actions; they are drawn side by side. Drag one along the row to change their order, or use Move action left / right in the Properties panel, where a selected step lists its actions as compact rows (click one to unfold it). Delete an action with Del.

Watch out: when two steps that can be active together both drive the same output with continuous actions, the result is hard to read. GrafcetMaker warns you about it.