Chapter 6 Instruction Details
XBC E-Type Main Unit 6-106 Ve r. 1
6.20.4 BIN4, BIN4P, BIN8, BIN8P
Instruction
Step
P M K F L T C S Z D.x
R.x
U N D R
3~5 O - -
Data to convert or bit position of device number data is saved in
Bit position of device number to save data converted
[Flag Set]
Flag Description Device Number
Error
For BIN4(P), S’s device value is other than BCD format (0~9)
For BIN8(P), S’s device value is other than BCD format (0~99)
F110
1) BIN4
(1) Converts specified S device’s 4-bit BCD data (0~9) to BIN4 and saves in D.
(2) Error Flag (F110) will be set if S’s value is other than BCD format (0~9).
2) BIN8
(1) Converts specified S device’s 8-bit BCD data (0~99) to BIN8 and saves in D.
(2) Error Flag (F110) will be set if S value is other than BCD format (0~99)
3) Program Example
(1) If Input signal P00000 is On, BCD data is converted and saved from P0200’s No.4 bit.
If Input signal P00001 is On, BCD data is converted and saved from P0400’s No.8 bit.
BIN8 h99 P04008
P00001
BIN4 h9 P02004
P00000