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

Page 85

Advertising
background image

L-force | PLC Designer

Concepts and Base Components

DMS 4.1 EN 03/2011 TD29

83

Method call also when application is stopped
In the device description file it can be defined that a certain method should always be
called task-cyclically by a certain function block instance (of a library module). If this
method has the following input parameters, it will be processed also when the active
application currently is not running.

VAR_INPUT
pTaskInfo : POINTER TO DWORD;
pApplicationInfo: POINTER TO _IMPLICIT_APPLICATION_INFO;
END_VAR

The programmer now can check the application status via pApplicationInfo, and define
what should happen. Example: IF pApplicationInfo^.state=RUNNING THEN
<instructions> END_IF.

3.7.6

Property

Note: This functionality is only available if supported by the currently used feature
set.

A "property" is an object type, which can be inserted below a program or function
block via command "Add object / Property" from the context menu. In the Add
Property
dialog the name, return type and desired implementation language have to
be specified.
A "property" contains two special methods: These will be inserted automatically in the
objects tree below the property object:
- the "Set" method is called when the property is written, that is the name of the
property is used as input.
- the "Get" method is called when the property is read, that is the name of the property
is used as output.

Example:
Function block FB1 uses a local variable "milli". This variable is determined by the
properties Get and Set:
Get:

seconds := milli / 1000;

Set:

milli := seconds * 1000;

Advertising