L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 87

Advertising
background image

L-force | PLC Designer

Concepts and Base Components

DMS 4.1 EN 03/2011 TD29

85

Regard the following:
• It is not allowed to declare variables within an interface. An interface has no body

(implementation part) and no actions. Just a collection of methods is defined
within an Interface and those methods are only allowed to have input-, output and
inout-variables.

• Variables declared with the type of an interface are always treated as references.
• A function block implementing an Interface must have assigned methods which

are named exactly as they are in the interface and which contain identically named
inputs, outputs and inouts.

Note: When copying or moving a method or property from a POU to an Interface the
contained implementations will be deleted automatically. When copying or moving
from an Interface to a POU the user will be asked to specify the desired
implementation language.


Inserting:
An Interface can be added via command "Add object / Interface". If it should be
assigned to an application, select the application in the device tree and use the
command from the context menu. Otherwise the new Interface will be added to the
POUs tree.
In the 'Add Interface' dialog enter a name for the new interface (<interface name>).
Optionally you can activate option Extends: if you want the current interface to be an
extension of another interface.
If "ITF1" extends "ITF_base", all methods described by ITF_base will be automatically
available in ITF1.

Abb. 9

Example for extending an interface

After having confirmed the settings with button Open, the editor window for the new
interface will open.

Advertising