Realising a GRAFCET as a function chart (FC)

The topics presented in this section will only be of interest to those readers who want to realise a GRAFCET in a PLC program and already have the necessary PLC knowledge. The PLC end system is irrelevant, since the PLC objects used exist in all PLC families (S7-300/400, S7-1200/1500, IEC 61131 controllers).

Manual realisation of the GRAFCET in GRAFCET Studio is not necessary. The Pro Edition of GRAFCET Studio allows you to transfer the GRAFCET you have created directly to a PLC. This means that GRAFCET Studio allows the GRAFCET to be used directly as a programming language for a PLC.

As this convenient option is only available in GRAFCET Studio Pro and GRAFCET charts have always been realised manually up until this point, we explain the requisite formalisms in this section.

Realisation of a GRAFCET into a PLC program takes place using the example in the section "Hydraulic short-stroke press". Each step is realised by what is referred to as a step flag in the form of a reset-dominant memory (SR memory). A set and reset condition exists for each step therefore. This makes it very easy to realise the interdependency of the steps, because, for instance, the set conditions are realised via AND boxes. In principle, the following conditions are defined for the realisation:

  • The initial step is initially set when all subsequent steps are not set.

  • Each subsequent step after the initial step is set by the transition conditions in the transitions and the predecessor step.

  • The resetting of each step is always initiated by the subsequent step – unless, however, this is the last step, which is then reset by the last transition condition in the backward sequence.

  • The symbols for the steps (SR memory) are prefixed with X followed by the step label (e.g. X0, X5). The label therefore corresponds to the step variables in GRAFCET.

This is how the basic structure for steps 1 to 5 depicted in Fig. 4.156 is created. The actions on the steps and the transition conditions are not yet considered here.

Fig. 4.156 Realisation of a basic GRAFCET structure as an FC

Fig. 4,157 As a reminder, the GRAFCET chart for the pressing example again Fig. 4,158 Inserting the transition conditions

The figure above shows the realisation of the GRAFCET according to the principles that have been established.

Once the transition conditions have been appropriately added (see figure above), the GRAFCET is implemented except for the actions.

Continuing actions can be implemented very easily as an FC by linking the action to the step directly. In this can be seen using step 5 as an example.

Fig. 4.159 The continuing action can be attached directly to output Q of the step flag.

Since there is no action added to step 3 in the GRAFCET chart, no assignation is attached to the Q output of the step flag X3. A continuing action with an assignation condition is attached to step 1. This is implemented in FC by attaching an AND operation at the Q output of the step flag X1. The operand S1PressTop is attached negated to the second input of the AND block. This is shown in .

Fig. 4.160 Realisation of the continuing action with assignation condition in FC in the example of taking step 1

A storing action on event is attached to step 2 in the GRAFCET chart, which describes the operand Y1ClosePress with the value True. An SR memory is used for the operand Y1ClosePress. An AND block is positioned at the set input, with the first input being allocated the step flag X2 and the second input being allocated the evaluation of the positive edge for S4Start. The operand Y1ClosePress is also influenced by step 4 in the GRAFCET chart, and namely by a storing action on activation. The operand Y1ClosePress is given the value False here. This is implemented in the FC by directly calling out the step flag X4 on the reset input of the SR memory of Y1ClosePress. You can see the realisation in .

Fig. 4.161 Realisation of the conditions for the operand Y1ClosePress in the FC

The GRAFCET chart is therefore realised in its entirety in the FC.