Learning phase 3: Continuing actions with assignation conditions

The continuing action writes the step status (True or False) to an operand. If you want the assignation to depend on an additional condition, then you should use the continuing action with assignation condition. This learning phase introduces and applies this action type.

Learning steps:

  • Assignation conditions for continuing actions
  • Using several continuing actions per step
  • Using time-dependent assignation conditions with bit and logical operators

In an assignation condition with 2s/X1 is specified on a continuing action H1SignalLamp. As long as step 1 is idle, the value False is always written to the operand H1SignalLamp. The time delay is started as soon as step 1 is active, and the assignation condition is fulfilled after 2 seconds. The value True is now written to the operand H1SignalLamp. As a result, the value True being written by the continuing action to the operand is delayed by two seconds.

Fig. 3.81 Continuing action with time-dependent assignation condition

In the second example, the condition for the status depends on an operand with the label S1.

Fig. 3.82 Continuing action with assignation condition in which an operand is used

A limit switch signal S1 is expected here. The time-dependent condition only starts if S1 returns the value True. In Watch mode (Item 1), step 1 is active. The assignation condition remains False, since S1 still returns False. In Item 2, S1 has adopted the value True and the timer was started. After the delay time of two seconds expires, the operand H1SignalLamp is set to True (Item 3). If S1 changed back to False, the continuing action would also write the value False to the operand. The timer would also be reset.

If the step has the status True and the result of the assignation condition also has the status True, then the status True is written to an operand of a continuing action with assignation condition, otherwise the status False.

In Example 3, you can see a time-dependent assignation condition with a logical operator. As soon as the value in the operand B1Press is greater than the value in B2Press, the timer is started and the continuing action Y1 activated once the timer ends. Thus, the value True is written to the operand Y1.

Fig. 3.83 Time-dependent assignation condition with a logical operator

Please take note of the following important aspect: The condition specified on the action can also be fulfilled prior to the activation of the step linked to the action. This means it is evaluated separately from the activation of the step.

In the example above, this means: Once the comparison B1Press > B2Press is fulfilled, the time begins to elapse – separate to step 1. Therefore, it may well be that step 1 is active and the delay time has already elapsed, as the comparison B1Press > B2Press has been fulfilled for more than two seconds.

Note: A comparison must always be set in square brackets.

The storing action on event will be presented later on in this workbook. In the case of this action, the condition is only evaluated if the step belonging to the action is active.

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

A container is to be filled automatically until the signal gauge S1 on the container is reached (Fill level reached = False). A pump and valve are switched on for this purpose. The pump with an ON delay of two seconds vs. the valve must be started so that it does not pump against the closed valve.

Fig. 3.84 Diagram of the technology for the application

Definition of the operands:

Symbol Description
S1LevelIndicator Sensor, value = False if surrounded by liquid
Y1Valve Valve actuator Y1, True = Valve is open
M1Pump Motor pump

It is quite simple to realise this task in GRAFCET. Two continuing actions are required, each action having its own assignation condition. The initial step turns the valve on as soon as S1 returns the value True. A time-dependent assignation condition is defined for the pump; the condition is an ON delay. As soon as S1 returns the value True, the time starts, and after two seconds, the pump is assigned the value True. You can see the solution in below.

Fig. 3.85 The solution to the application

In the figure on the right, the assignation condition with S1LevelIndicator has the status False, so that both continuing actions also write the status False to the operands (Item 1). The valve is switched on in Item 2 and the timer is started within the time-dependent assignation condition.

Fig. 3.86 Filling the container in the test

After the time has elapsed, the continuing action becomes active and the operand M1Pump is therefore assigned the value True (Item 3).

  • A continuing action can be assigned an assignation condition.
  • If the assignation condition returns True as the value and if the appropriate step is also True, then the continuing action is activated and True is written to the operand as the value.
  • You can use bit operators, logical operators and time functions in the assignation conditions. Edges (rising edge, falling edge) are not allowed here.

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

If the S1Start button is pressed, lamp H1 should illuminate for five seconds. Subsequently, lamp H2 should blink until the S2Reboot button is pressed. You can then initiate the operation again with S1Start. The blinking of H2 should have a pulse/pause time of one second each.

Both buttons deliver the value True on being pressed.

Fig. 3.87 Diagram of the technology for the example Start/Reboot

Fig. 3.88 GRAFCET solution

The solution for the task becomes a little more difficult when realising the blinking display.

Step 2 becomes active when S1Start is actuated. The time then begins to run within the transition condition 5S/X2, since the step variable X2 has the status True. The continuing action at step 2 also becomes active and operand H1 is therefore set to True. After five seconds, the transition to step 3 ensues. Two continuing actions with assignation conditions are attached to step 3. The action on the left describes operand H2 with True when step 3 is active and the time-dependent assignation condition is fulfilled. The time for them is started when the operand InternFlag has the value False separate to step 3. It can be assumed, therefore, that when step 3 activates, the condition is already fulfilled and the value True is immediately assigned to operand H2. If operand H2 has the status True, then the time begins within the time-dependent assignation condition for the action InternFlag. After the time has expired, the operand InternFlag is set to True and H2 receives the value False, because the assignation condition for the action H2 is now no longer fulfilled. If the S2Reboot button is pressed, the transition to the initial step takes place and the process can be restarted.

  • Which statuses can the result of an assignation condition for a continuing action adopt?
  • Define an assignation condition which causes a time delay of three seconds after the operand S1 adopts the status True.
  • Can multiple actions be attached to one step?