EasyManua.ls Logo

FATEK FBs-4A2D - Page 163

FATEK FBs-4A2D
348 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...
Basic Function Instruction
6-38
FUN 21 D P
BIN
BCD TO BIN CONVERSION
(Converts BCD data of the device specified at S into BIN and stores the result in D)
FUN 21 D P
BIN
Operand
S : The register to be converted
D : The register to store the converted data
(BIN code)
The S, D may combine with V, Z, P0~P9 to
serve indirect addressing
WX WY WM WS TMR CTR HR IR OR HR HSCR RTCR SR ROR DR
Range
Ope-
rand
WX0
WX240
WY0
WY240
WM0
WM1896
WS0
WS984
T0
T255
C0
C255
R0
R3839
R3840
R3903
R3904
R3919
R3920
R4047
R4096
R4127
R4128
R4135
R4136
R4167
R5000
R8071
D0
D4095
S
D * *
The decimal (BCD) data must be converted to binary (BIN) data first in order for PLC to accept the data
which is originally in decimal unit (BCD code) inputted from external device such as digital switch because
the BCD data can not be accepted by PLC for its operations.
Converts BCD data of the device specified at S into BIN and writes the result in D when the operation
control input "EN" =1 or "EN" ( P instruction) from 0 to 1. If the data in S is not in BCD, then the error flag
FO0 is set to 1 and the old data of D are retained.
Constant is converted to BIN automatically when store in program and can not be used as a source
operand of this function.
Example 16-bit BCD to BIN conversion
Ladder diagram Key operations Mnemonic code
S :
D :
R
WX 0
1
21P. BIN
EN
X0
ERR
ORG
ORG X 0
FUN 21P
S : WX 0
D : R 1
X15 X0
1 2 3 4
S
WX0 0 001001000110100
Ø
X0
B15 B0
D R1 0 000010011110010

Other manuals for FATEK FBs-4A2D

Related product manuals