2 lenze software guidelines for variable names, 1 hungarian notation, Lenze software guidelines for variable names – Lenze DDS Function library Drive User Manual

Page 7: Hungarian notation, Function library lenzedrive.lib

Advertising
background image

Function library LenzeDrive.lib

Preface and general information

1.2

Lenze software guidelines for variable names

1−3

L

LenzeDrive.lib EN 1.7

1.2

Lenze software guidelines for variable names

The previous concepts for Lenze controllers were based on codes that represented the input and
output signals, and the parameters of function blocks.

·

For the sake of clarity, names were defined for the codes in the documentation.

·

In addition, the signal types were defined by graphical symbols.

The user could see at a glance which kind of signal (analog, phase−angle etc.) had to be present at
the particular interface.

The concept for the new automation system does not use direct codes in the
programming. The IEC 61131−3 standard is used instead.

·

This standard is based on a structure of variable names.

·

If the user applies variables in his project, then he can name the variables as he chooses.

In order to avoid the growth of a multitude of different conventions for naming variables in existing
and future projects and function libraries that are programmed by Lenze personnel, we have set up
software guidelines that must be followed by all Lenze staff.

In this convention for creating variable names, Lenze keeps to the Hungarian Notation that has been
specifically expanded by Lenze.

If you make use of Lenze−specific functions or function blocks, you will immediately be able to see,
for instance, which data type you must transfer to a function block, and which type of data you will
receive as an output value.

1.2.1

Hungarian Notation

These conventions are used so that the most significant characteristics of a program variable can
instantly be recognized from its name.

Variable names

consist of

·

a prefix (optional)

·

a data−type entry

·

and an identifier

The prefix and data−type entry are usually formed by one or two characters. The identifier (the
"proper" name) should indicate the application, and is therefore usually somewhat longer.

Prefix examples

prefix

Meaning

a

Array (combined type), field

p

Pointer

Advertising