Recommendation for designating variable types, Function block library lenzeelectricalshaft.lib, Preface and general information – Lenze DDS Global Drive PLC Developer Studio User Manual
Page 8: 1 recommendation for designating variable types

Function block library LenzeElectricalShaft.lib
Preface and general information
1−4
l
LenzeElectricalShaft.lib EN 1.2
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_
VAR_INPUT
Q_
VAR_OUTPUT
IQ_
VAR_IN_OUT
R_
VAR RETAIN
C_
VAR CONSTANT
CR_
VAR CONSTANT RETAIN
g_
VAR_GLOBAL
gR_
VAR_GLOBAL RETAIN
gC_
VAR_GLOBAL CONSTANT
gCR_
VAR_GLOBAL CONSTANT RETAIN
Example
for a global array of type integer that includes fixed setpoints (analog) for a speed setting:
g_anFixSetSpeedValue_a