Programming
2.3 Variables
Expanding the user interface
2-26 Commissioning Manual, 11/2006, 6FC5397-0DP10-0BA0
The display mode of variables can be changed:
● For INTEGER, the display type can be changed.
B Binary
D Decimal signed
H hexadecimal
unsigned
With the addition of U for Unsigned
● For REAL data types, only the number of places after the decimal point can be changed.
Changing the type is illegal and generates an error message in the ERROR.COM file.
Example
Var1.typ = "IBW"
Var2.typ = "R3"
Number representation
Numbers can be represented in either binary, decimal, hexadecimal or exponential notation.
Numerical values in binary, hexadecimal and exponential notation must be enclosed in
single quotation marks:
Binary 'B01110110'
decimal 123.45
hexadecimal 'HF1A9'
exponential '-1.23EX-3'
Examples:
VAR1 = 'HF1A9'
REG[0]= 'B01110110'
DEF VAR7 = (R//'-1.23EX-3')
Note
When codes are generated with the "GC" function, only numerical values in decimal or
exponential notation are evaluated, but not those in binary or hexadecimal notation.