![background image](http://html1.mh-extra.com/html/ls-industrial-systems/xbc-dn10e/xbc-dn10e_user-manual_1943831230.webp)
Chapter 6 Instruction Details
XBC E-Type Main Unit
6-113
Ver. 1
6.21.4 L2I, L2IP, L2D, L2DP
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)
L2I(P)
L2D(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 Long Real Data is saved, or Long Real Data
LREAL
D
Device Position to save data converted to IntegerData Format
INT/DINT
[Flag Set]
Flag
Description
Device
Number
Error
In case of L2I Instruction used and S specified Real Number is out of -
32,768~32,767 range.
In case of L2D Instruction used and S specified Real Number is out of -
2,147,483,648 ~2,147,483,647 range.
F110
1) L2I (Long real to Integer)
(1) L2I(P) converts S+3,S+2,S+1,S specified Long Real Number to Integer (16-bit) to save in D.
H4093
D+2
D+3
b63
b48
H4A45
H84FD
D
D+1
b32
b0
b16
H0FF6
(1234)
D
b15
b0
H04D2
(1234.5678901234)
(2) If S+3,S+2,S+1,S specified Long Real Number’s 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) L2D (Long real to Double Integer)
(1) D2L(P) converts S+3,S+2,S+1,S specified Long Real Data to Double Integer data (32-bit) to save in D+1,D.
L2I,
L2D
means
P S
D
L2IP,
L2DP
S
D
H4167
S+2
S+3
b63
b48
H8C29
HDCD6
S
S+1
b32
b0
b16
HE8B0
( 12345678. 901234)
( 12345678)
b0
b15
D+1, D
H00BC
H614E
b31
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...