EasyManua.ls Logo

LS Industrial Systems XBC-DR10E - Page 228

LS Industrial Systems XBC-DR10E
542 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 Instruction Details
XBC E-Type Main Unit 6-111 Ve r. 1
6.21.3 R2I, R2IP, R2D, R2DP
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x
R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
R2I(P)
R2D(P)
S
O
O
O
O
O
O
O
-
-
-
-
O
O
O
O
O
2~4 O - -
D
O
O
O
-
O
O
O
-
-
-
-
-
O
O
O
O
Operand
Description
Data Type
S
Area Number where Real number is saved, or Real number
REAL
D
Device Position to save data converted to Real Data Format
INT/DINT
[Flag Set]
Flag Description Device Number
Error
When R2I Instruction used and S specified Single Real Number is out of
-32,768~32,767 range.
When R2D Instruction used and S specified Single Real Number is out of
-2,147,483,648 ~2,147,483,647 range.
F110
1) R2I (Real to Integer)
(1) R2I converts S+1,S specified Real Number(32-bit) to 16-bit Integer data to save in D.
(12345.678)
S+1, S
b15
b0
hE6B6
h4640
b31
h303A
(12346)
b0b15
D
(2) If S+1,S specified Real Number value exceeds -32,768~32,767 range, operation error occurs.
The result of 32,767 will be saved if input value is bigger than 32,767, and -32,768 will be saved if input value
is smaller than -32,768.
(3) Value of below decimals will be omitted after rounding off the nearest integer.
2) R2D (Real to Double Integer)
(1) R2D converts S+1,S specified 32-bit Integer data to Long Real Number(32-bit) and saves in D+1,D.
(123456.78)
S+1, S
b15
b0
h2065
h47F1
b31
(123457)
b0b15
D+1, D
h0001
hE241
b31
(2) If S+1,S specified Real Number’s value exceeds -2,147,483,648~2,147,483,647 range, operation error
occurs. The result of 2,147,483,647 will be saved if Real value is bigger than 2,147,483,647, and -
2,147,483,648 will be saved if Real value is smaller than -2,147,483,648.
(3) Value of below decimals is will be omitted after rounding off the nearest integer.
R2I,
R2D
means
P
S
D
R2IP,
R2DP
S
D

Table of Contents

Related product manuals