L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 256

Advertising
background image

L-force | PLC Designer

Editors in PLC Designer

254

DMS 3.2 EN 02/2011 TD29



Example:

TYPE CAL_Day :(

CAL_MONDAY,

CAL_TUESDAY,

CAL_WEDNESDAY,

CAL_THIRSDAY,

CAL_FRIDAY,

CAL_SATURDAY,

CAL_SUNDAY);

Declaration:

eToday: CAL_Day;

Functions, Function blocks, Programs (POU)

The names of functions, function blocks and programs consist of the library prefix
(Example: CAN), an underscore and an expressive short name of the POU (Example:
SendTelegram). Like with variables always the first letter of a word of the POU name
should be a capital letter, the others should be small letters. It is recommended to
compose the name of the POU of a verb and a substantive.

Example:

FUNCTION_BLOCK CAN_SendTelegram (* prefix: canst *)

In the declaration part a short description of the POU should be provided as a
comment. Further on all inputs and outputs should be provided with comments. In

case of function blocks the associated prefix for set-up instances should follow
directly after the name. Actions get no prefix; just actions which should be called only
internally, i.e. by the POU itself, start with prv_.

Each function - for the reason of compatibility with previous PLC Designer versions -

must have at least one parameter. External functions must not use structures as
return values.

Identifiers for Visualizations

Note: Currently you must avoid that a visualization has the same name like another
POU in the project. This would lead to problems in case of changes between
visualizations.

Advertising