9300 Servo PLC
Preface and general information
1-4
9300ServoPLC EN 1.4
Examples of the data-type entry
Examples of a data-type Meaning
b Bool
by Byte
r Integer
w Wor d
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 RETA IN
C_<Variablename> VAR CONSTANT
CR_<Variablename> VAR CONSTANT RETAIN
g_<Variablename> VAR_ GLOB AL
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