User Manual
5 Programming
Example
Example 1
IF _Axis[0].ActPos > 20.0 THEN
MyREAL := 92;
END_IF
Example 2
IF MyInput1 = True THEN
MyREAL1 := 34.0;
MyREAL2 := 70023.0;
ELSE
MyDINT := 2;
END_IF
Example 3
IF _Axis[0].StatusBits.InPos = True THEN
MyREAL1 := 34.0;
MyREAL2 := 70023.0;
ELSEIF ABS(_Axis[0].ActPos) > 20.0 THEN
%QX0.1 := True;
ELSE
MyDINT := 2;
END_IF
5.13.10. Constants
The term "constants" refers an numeric item in programming that does not change. This can
be a number in typical representation, such as 10.345, or a named representation of a
number, such as PI or e.
Constant Number Representations
The expressions in RMCTools supports the following types of constant number
representations:
Constant
Type
Description
Notation
Decimal
Base 10 numbers. These can be
either DINT (32-bit integers) or
REAL (32-bit floating-point decimal)
numbers.
number
Examples:
1
156.8902
0.0034
Hexadecimal
Base 16 numbers. These are 32-bit
DWORD numbers.
16#number
Examples:
16#F3
16#0000104C
Hexadecimal numbers are
sometimes represented with a
deltamotion.com 333