GrafcetMaker Open the editor

Getting started

In this tutorial you draw the control of a small tank: when the operator presses start, a pump fills the tank until it is full, then a valve drains it until it is empty, and the system waits for the next start. It takes about ten minutes.

The grafcet you will draw start full empty 0 1 Pump 2 Valve
The grafcet you will draw

1. Find your way around

  • The canvas fills the window: that is where you draw. Everything else floats over it.
  • Top: the main menu ☰ and the project name on the left; the tools in the middle (select, pan, place step, transition, comment or action); problems and Simulate on the right.
  • Under the tools: the hints show what you can do right now. Watch them while you follow this tutorial.
  • Left: the Properties of what you select appear in a card while it is selected.
  • Bottom: zoom, undo and redo on the left; one tab per grafcet in the middle; the Variables, Problems, Chronogram and Outline buttons on the right. Each opens its panel on the right of the window.

A new project already contains the grafcet G1 with step 0. Its double square means it is an initial step: it is active when the system starts.

2. Add the first transition and step

  1. Click step 0 to select it.
  2. Press Enter. A transition and step 1 appear below, and an editor opens next to the transition so you can type its receptivity, the condition for moving on.
  3. Type start and press Enter.

start is not declared yet: while you type, the editor notes New variable start: BOOL input, and pressing Enter adds it to the variable list (a message says so).

3. Add an action

Step 1 is still selected. Press A, type Pump and press Enter: Pump is created as a BOOL output. The pump now runs as long as step 1 is active.

4. Continue the sequence

  1. Press Enter again: transition and step 2 are added after step 1. Type full as the receptivity and create the input.
  2. Press A and add the action Valve (create the output).

5. Close the loop

The cycle has to go back to step 0 when the tank is empty.

  1. With step 2 selected, press L. The hints say Click a step to loop back to it.
  2. Click step 0. A transition is added below step 2 with a link going up to step 0, drawn with an arrow because it goes upward.
  3. Type empty as its receptivity, press Enter and create the input.

Your chart now matches the figure at the top of this page.

6. Check it

Look at the counters at the top right: a red circle counts errors, an orange triangle counts warnings. Click them to open the Problems list. Each problem says what is wrong and where; click it to jump to the element, and use the fix button when there is one. A correct chart has no errors. See Troubleshooting for the meaning of each message.

7. Simulate

  1. Press F5. The diagram is locked and the Simulation panel appears on the left. Step 0 carries a token: it is active.
  2. In the panel, switch start on. The transition clears: step 1 becomes active and its action Pump shows a check mark ✓.
  3. Switch start off, then full on: step 2 becomes active and Valve turns on.
  4. Switch full off and empty on: the grafcet goes back to step 0.
  5. Open the Chronogram tab to see every signal over time. Press Shift+F5 to stop.

What happens if start stays on when the tank becomes empty? Try it: as soon as step 0 is active again, its transition is cleared again. That is GRAFCET behaving exactly as drawn. Use a rising edge ↑start to react only to a new press (type ^start, see Writing receptivities).

8. Save

Your work is saved in the browser automatically after every change. To get a file you can keep, send or put under version control, press Ctrl+S: the project is saved as <name>.grafcet.json. Double-click the project name at the top to rename it.

Where next?