Action

Actions can be defined and assigned to Function Block and Programs ( ‘Project’ ‘Add Action’). The action represents a further implementation which can be entirely created in another language as the “normal” implementation. Each action is given a name.

An action works with the data from the function block or programme which it belongs to. The action uses the same input/output variables and local variables as the “normal” implementation uses.

../_images/07d765cccb9da9680a317d312ade54de

In the example given, calling up the function block Counter increases or decreases the output variable “out”, depending on the value of the input variable “in”. Calling up the action Reset of the function block sets the output variable to zero. The same variable “out” is written in both cases.

Calling \ an action:

An action is called up with <Program_name>.<Action_name> or <Instance_name>.<Action_name>. Regard the notation in FBD (see example below) ! If it is required to call up the action within its own block, one just uses the name of the action in the text editors and in the graphic form the Function Block call up without Function Block Instances information.

Examples for calls of the above described \ action from another POU

Declaration for all examples:

PROGRAM PLC_PRG
  VAR
   Inst : Counter;
  END_VAR

Call of action ‘Reset’ in another POU, which is programmed in IL:

CAL Inst.Reset(In := FALSE)
  LD Inst.out
  ST  ERG

Call of action ‘Reset’ in another POU, which is programmed in ST:

Inst.Reset(In := FALSE);
  Erg := Inst.out;

Call of action ‘Reset’ in another POU, which is programmed in FBD:

../_images/1b3bd7c9cba98a020a317d314faf4168

Note

Actions play an important role in blocks in sequential function charts. The IEC standard does not recognise actions other than actions of the Sequential Function Chart (SFC).