A Brief Introduction to TwinCAT PLC Control Action As addition to function blocks and programs you can define actions. An action is an further implementation. It can be written in a different language than the 'normal' implementation. Each action gets a name. An action works with the data of the accompanying function block or program. It uses the same input/output variables and local variables like the 'normal' implementation.. When function block Counter is called, the output variable gets increased or decreased depending on the input variable 'in'. When action Reset, affiliated to the function block is called, the output variable is set to 0. In both cases the same variable out is written.
An action is called with . respectively . . If the action should be called within the 'mother' module, in text editors only the action name is used, in graphical editors the function block call without instance name. Example Declaration for all Examples: PROGRAM PLC_PRG VAR Inst : Counter; END_VAR In AWL: CAL Inst.Reset(In := FALSE) LD Inst.out ST ERG In ST: Inst.Reset(In := FALSE); Erg := Inst.out; In FBD: See Chapter SFC [ } 23] for more information about SFC Actions. In IEC 61131-3 there are only actions for SFC described. Ressourcen You need the ressources for configuring and organizing your project and for tracing variable values: TX1200 15 Version: 1.3