Action, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual
Page 88
L-force | PLC Designer
Concepts and Base Components
86
DMS 4.1 EN 03/2011 TD29
Syntax:
INTERFACE
resp. for an interface extending another one:
INTERFACE
Example:
INTERFACE itf1 EXTENDS itf_base
Adding the desired collection of methods
To complete the definition of the interface, you have to add the desired collection of
methods. For this purpose select the interface entry in the POUs view and choose
command 'Add Object' to get the ''Add Object' dialog for defining a method to be part
of the interface. Add as many methods as desired and regard that those methods are
only allowed to have input-, output and inout-variables, but no body (implementation
part).
3.7.8
Action
Actions can be defined and assigned to function blocks and programs using the
command Add Object. An action is an additional implementation which can be created
in a different language than the "basic" implementation is. Each action is given a
name.
An action works with the data of the function block or program which it belongs to. It
uses the input/output variables and local variables defined there and does not contain
own declarations.
Abb. 10
Example of an action of a function block
In this example each call of the function block "FB1" will increase or decrease the
output variable "out", depending on the value of the input variable "in". Calling action
'Reset' of the function block will set the output variable "out" to zero. The same
variable "out" is written in both cases.