Recommendation for designating variable types, Function library lenzedrive.lib, Preface and general information – Lenze DDS Function library Drive User Manual
Page 8: 1 recommendation for designating variable types
![background image](/manuals/566039/8/background.png)
1.2
Lenze software guidelines for variable names
Function library LenzeDrive.lib
Preface and general information
1−4
L
LenzeDrive.lib EN 1.7
Examples of the data−type entry
Examples of a data−type
Meaning
b
Bool
by
Byte
n
Integer
w
Word
dn
Double integer
dw
Double word
s
String
f
Real (float)
sn
Short integer
t
Time
un
Unsigned integer
udn
Unsigned double integer
usn
Unsigned short integer
Identifier (the proper variable name)
·
An identifier begins with a capital letter.
·
If an identifier is assembled from several "words", then each "word" must start with a capital
letter.
·
All other letters are written in lower case.
Examples:
Array of integers
anJogValue[10] ;
Bool
bIsEmpty ;
Word
wNumberOfValues ;
Integer
nLoop ;
Byte
byCurrentSelectedJogValue ;
1.2.1.1
Recommendation for designating variable types
In order to be able to recognize the type of variable in a program according to the name, it makes
sense to use the following designations, which are placed in front of the proper variable name and
separated from it by an underline stroke:
I_<Variablename>
VAR_INPUT
Q_<Variablename>
VAR_OUTPUT
IQ_<Variablename>
VAR_IN_OUT
R_<Variablename>
VAR RETAIN
C_<Variablename>
VAR CONSTANT
CR_<Variablename>
VAR CONSTANT RETAIN
g_<Variablename>
VAR_GLOBAL
gR_<Variablename>
VAR_GLOBAL RETAIN
gC_<Variablename>
VAR_GLOBAL CONSTANT
gCR_<Variablename>
VAR_GLOBAL CONSTANT RETAIN
Example
for a global array of type integer that includes fixed setpoints (analog) for a speed setting:
g_anFixSetSpeedValue_a