EasyManua.ls Logo

LS Industrial Systems XBC-DR10E - Page 220

LS Industrial Systems XBC-DR10E
542 pages
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-103 Ve r. 1
6.20.2 BCD4, BCD4P, BCD8, BCD8P
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)
BCD4(P)
BCD8(P)
S
O
O
O
-
O
-
-
-
-
O
O
O
O
-
-
-
3~5 O - -
D
O
O
O
-
O
-
-
-
-
O
O
-
-
-
-
-
Operand Description Data Type
S
Data to convert to BCD or bit position of device number data is saved in
NIBBLE/BYTE
D
Bit position of device number to save data converted
NIBBLE/BYTE
[Flag Set]
Flag
Description
Device Number
Error
For BCD4 when S’s value is other than 0~9.
For BCD8 when S’s value is other than 0~99.
F110
1) BCD4 (Nibble Binary Coded Decimal)
(1) Converts specified S device’s 4-bit BIN data to (0~9) BCD4 and saves in specified D device area.
(2) Error Flag (F110) will be set if S value is other than (0~9).
2) BCD8 (Byte Binary Coded Decimal)
(1) Converts specified S device’s 8-bit BIN data to (0~9) BCD8 and saves in specified D device area.
(2) Error Flag (F110) will be set if S value is other than (0~99).
3) Program Example
(1) If P00000 is On, ‘9’s Nibble data will be BCD converted to ‘h9’ from P0200’s No. 4 bit.
(2) If P00001 is On, ‘99’s Byte data will be BCD converted to ‘h99’ from P0400’s No. 8 bit.
BCD4 9 P02004
P00000
BCD8 99 P04008
P00001
BCD4, BCD8
means BCD4/BCD8
S
D
P
S
D
BCD4P, BCD8P

Table of Contents

Related product manuals