New possibilities with GRAFCET

The description of the functioning of an automation system is one of the essential aspects of automation technology. The European standard "GRAFCET" has been developed especially for this purpose and is ideally suited for this application. The required expenditure is often not made, despite the benefits resulting from the creation of a GRAFCET for a system. Because for many the GRAFCET provides no more benefits once the planning phase is completed.
But what if you could transfer the GRAFCET directly into a PLC?

GRAFCET is a description language used to describe the operation of a machine or its sequence. This standard is valid throughout Europe and has existed for more than 14 years under the designation "DIN EN 60848". The standard was developed in France: GRAFCET stands for Graphe Fonctionnel de Commande Etape Transition”. This means: "Representation of the control function with steps and transition conditions". This makes it possible to describe step chains or sequence controls very well.

Those responsible for the GRAFCET standard have meticulously ensured that the required symbols are easy to draw and that the number of various elements is also as few as possible. For these reasons, a GRAFCET plan can also be implemented without much effort using pencil and paper.

The essential elements of a GRAFCET plan are:

  • Steps (square)
    A step can be active or inactive. If a step is active, the machine is already in this state (for example, a bottle is being filled).
  • Transitions (horizontal line intersecting the line of action)
    The transition includes a condition. If this condition is true, the transition to the subsequent step takes place, that is, the following step becomes active. The previously active step is deactivated.
  • Actions (rectangle)
    Actions are always assigned to a step. In one action, e.g. an actuator is switched on. This could, for example, be a valve.
    Multiple actions can be linked to a step.
  • Directed lines (horizontal and vertical lines)
    The directed lines links individual elements (steps, transitions, actions) to one another.

In addition, GRAFCET provides elements to build hierarchies and structures. These include, for example, the forced commands, which can be used, among other things, to implement the conditions for the operating states (manual/automatic) of a system.

Fig 1: Example of a simple GRAFCET

Figure 1 shows a simple GRAFCET plan. What happens here?

First, the so-called initial step with the designation "1" is activated. Thus, the action to the right is also active and the binary output "Q0" is activated. The condition of the subsequent transition is defined by the term "1s/X1". This means that the transition is triggered as soon as step "1" is active for one second. At the transition, step "2" becomes active and step "1" becomes inactive. With the activation of step "2" the output "Q1" is also activated. After step "2" has been activated for one second, step "3" is activated, and again, after one second, the step returns to step "1".
The outputs Q0 to Q2 are thus switched on one after the other for one second each.

GRAFCET provides several variants of steps and actions with different properties. In the transition condition, a binary link (AND/OR) can be formulated; edge evaluations, comparators and time response can also be implemented. Binary operands are not the only ones that can be used within an action; the use of digital operands, including computational operations is also possible. All in all, a powerful and easy to learn description language.

A detailed description of GRAFCET can be found in the newly published book "GRAFCET Workbook" (available in English language for free).

GRAFCET is used across disciplines and is an integral part of most curricula of technical training courses. This provides the prerequisites so that various disciplines can 'talk' to each other 'in' GRAFCET.
If a new plant is developed, the designers can describe the sequence of the system via the GRAFCET. Thus, the experts from the fields of mechanics and electrical engineering have a discussion basis using which the first problems can be recognized and solved already during planning. This also helps to assess the need for actuators and sensors. The actuators and sensors of the machine are linked in a control program which usually runs in a programmable controller. A PLC programmer must therefore create the control program, whereby the GRAFCET acts as his programming basis. The machine must then be put into operation. The GRAFCET also plays an important role here: Does the machine now really work the way the designers have envisaged?

Of course, the machine operator also has advantages when he has knowledge of the precise operation of his machine. For example, the service staff does not always have to be called in the event of a fault.

Conclusion: The GRAFCET can be extremely useful if there is an up-to-date GRAFCET plan.

Everyone knows: Detailed machine documentation is necessary so that an equipment can be successfully built, programmed, commissioned and maintained.

Important: The documentation must be up-to-date. If, therefore, changes are made to the equipment, regardless of the scope, the documentation (the GRAFCET plan) must be updated accordingly. And here is mostly where the problems start: In case of a system modification the programming must be adjusted. If you do not change the GRAFCET plan now, the programming and the documentation diverge from each other to such an extent that you can no longer use the original documentation.

This is also the reason why GRAFCET has not been widely used in practice. Some effort is required to ensure that the actual state of the programming is consistent with the GRAFCET plan.

Here comes the wish: If I have already spent the effort and have created a GRAFCET plan from the outset, then I would also like to use it in the controller. Then, programming and documentation would never diverge.

The wish to transfer a GRAFCET logic into a controller is as old as the GRAFCET itself. But GRAFCET is not a programming language, but rather a description language.

The following scenario would be optimal:

You create a GRAFCET plan and load its logic to a device, regardless of which manufacturer has produced the device.

How could this be realized? The manufacturers usually use different hardware as well as different programming systems. The solution would be some type of "GRAFCET engine". This would be an intermediate layer that is fed with a GRAFCET logic. This intermediate layer is manufacturer-dependent, it must therefore be available for the device and must be installed on it. If this were the case, then a GRAFCET plan could be created and transferred directly to such a device.

Assuming it is possible to create a GRAFCET plan and transfer it to a device (for example, a PLC), the following application scenarios can be implemented and the following advantages are obtained:

  • The complete control program can be created with GRAFCET for smaller machines and equipment (drilling rig, sheet bending machine etc.).
  • For larger machines and equipment, partial areas are implemented in GRAFCET, e.g. the step chains. Things such as PID controllers, motion control, etc. are, as before, programmed in a control-specific manner (for example in FBD, LD, SCL).
  • Certain processes can be modified or reprogrammed in the system by the end customer (system operator). The end customer then does not need the extensive programming tool of the PLC manufacturer, but can do so using a small, simple tool. Here, the technical staff of the end customer needs 'only' the knowledge of GRAFCET and no PLC programming expertise.
  • GRAFCET for maintenance support: In addition to the 'normal' control program, a GRAFCET developed specifically for the error search is stored in the PLC which supports the maintenance staff if needed. Here, too, the PLC manufacturer's programming software would not be necessary.
  • Documentation and programming are standardized.
  • The PLC of the manufacturer A is replaced by a PLC of the manufacturer B. If the programming was performed via GRAFCET, the same GRAFCET is transferred to PLC-B without modification.
    Adjustments would be necessary only in the address assignment (Symbol table).
  • Use in training:
    • Existing training equipment and mechatronic systems can be programmed conventionally or with GRAFCET.
    • Training equipment can be equipped with an Arduino or Raspberry PI and programmed with GRAFCET.

GRAFCET is not a programming language, but rather a description language for sequence controls. Therefore, there will always be cases where a GRAFCET plan makes only limited sense. However, there are also applications for which a GRAFCET programming system is a very elegant solution.

All small and medium-sized sequence controls without regulation, motion and communication tasks are particularly suitable for the GRAFCET programming, e.g.:

  • Drilling rigs
  • Processing stations
  • Sheet metal benders
  • Extraction systems

Less suitable and not fully realized are extensive machines and plants with distributed control systems or time-critical operations where there is a struggle for every millisecond of cycle time. Here the GRAFCET can only take over a part of the system control. Things like e.g. PID controllers or communication tasks must be carried out using the native languages and thus the tool of the PLC manufacturer.

The theory described puts a new software into practice: A GRAFCET-Engine realize the platform independence on the device. After the GRAFCET engine is installed on the device, it can be programmed with GRAFCET Studio.

Fig 2:GRAFCET-Studio

GRAFCET Studio offers the following features:

  • Creation of a GRAFCET according to DIN EN 60848
  • Simulation of the GRAFCET on the PC (GRAFCET engine runs on the PC)
  • Transfer of the GRAFCET logic to the device
  • Monitoring the GRAFCET: The status of the transition conditions (True, False, Time Delay) is displayed as well as the status of the individual steps
  • Loading an existing GRAFCET logic from a device

GRAFCET Studio currently supports the following devices: Siemens S7-1200/1500/300/400, Arduino-Boards, IOT2000 from SIEMENS.

GRAFCET Studio cannot completely replace the programming software of the device manufacturer because the device must be

prepared in the first step: The GRAFCET engine must be installed on the device with the device manufacturer's programming software. The inputs/outputs must also be parameterized (addressing, measuring ranges of the analog inputs, output ranges of the analog outputs). The device can then be used with GRAFCET Studio.

If these settings are constant for a system type (for example, series machines), and a device can accept this data by inserting an external storage medium (for example, memory card), the preparation process is only necessary once per type of installation.

GRAFCET Studio currently supports max. 255 steps.

The platform independence through the GRAFCET engine also presents a disadvantage: A chain processed by the GRAFCET engine is not as performant as a step chain developed in the native programming languages (SCL, STL). However, this is only relevant for time-critical applications.

Since 2005, GRAFCET has been firmly anchored in training. GRAFCET is a component of the curriculum in numerous technical training courses in Germany. For example, in the training of mechatronics, electronics engineers for automation technology and industrial engineering as well as industrial mechanics. Including in Secondary Technical Schools and two-year Secondary Chemical Technology Schools focusing on Production Technology. GRAFCET is also used in training at technical high schools.

A large number of trained specialists are therefore familiar with GRAFCET and are thus able to program a programmable controller with a suitable software tool.

There is new impetus for the GRAFCET topic. The use of GRAFCET as a manufacturer-independent programming language increases its benefits many times over. GRAFCET Studio provides several new possibilities (see section application scenarios) for programmers and end users. For example, it is possible for the first time to program an S7-1200/1500 from Siemens using a small, simple tool.

Author:
Dipl.-Ing. (FH) Matthias Habermann mh@mhj.de

MHJ-Software GmbH & Co. KG
Albert-Einstein-Str. 101
75015 Bretten – Germany
www.mhj.de