VA Motion Controller Programming Manual
214
Truncating the fractional part of the input value
to get an integer value
When inputting 0~127 ,
output 0~127; input 128~255 , output -128~-1; input
and then increase output repeat 0~127,
-128~-1; input 1~-128 , output -1~
-128; input -129~-256 , output 127~0; input and then
decrease, output repeat -1~-128, 127~0
Input
0 to 32767
when
,
outputs
0 to
32767;
input
from 32768 to 65535
, the output
from
-32768 to -1;
input to add the output
Repeat
0~32767
,
-32768~-1;
input
-1~-32768
,
output
-1~-32768;
input
-32769~-65536
,
output
32767~0;
input and then decrease, the output
repeats
-1~-32768, 32767~0
When
0~2,147,483,647
is input , the output
is
0~2,147,483,647.
Input and then increase the output is
still
2,147,483,647;
input
-1~-2,147,483,648
, output
-1~-2,147,483,648
,
input and then reduce the output is
still
-2,147,483,648
usage (take TRUNC_SINT as an example)
LD, FBD programming language
Note
: IL, ST
language programming needs to insert variables
IN
and
OUT
or use constants in
the current
POU
variable worksheet
Funtion and Action examples
Floating point number 75.68 rounding
When the contact
C138
is
ON
when this
instruction is executed,
The address of
V266
in
the floating-point number
75.68
rounding stored
in the
V 267
in ;