Справочник Пользователя для Mitsubishi Electronics FX2NC
FX Series Programmable Controlers
Applied Instructions 5
5-22
5.2.9
BCD (FNC18)
Operation 1: (Applicable to all units)
The binary source data (S) is converted into an
e q u i v a l e n t B C D n u m b e r a n d s t o r e d a t t h e
destination device (D). If the converted BCD number
exceeds the operational ranges of 0 to 9,999 (16 bit
The binary source data (S) is converted into an
e q u i v a l e n t B C D n u m b e r a n d s t o r e d a t t h e
destination device (D). If the converted BCD number
exceeds the operational ranges of 0 to 9,999 (16 bit
operation) and 0 to 99,999,999 (32 bit operation) an error will occur.This instruction can be
used to output data directly to a seven segment display.
used to output data directly to a seven segment display.
Operation 2: (Applicable units: FX
(2C)
)
This function is equivalent to FNC 118 EBCD Data
(S)is converted from ‘floating point’ format to
‘scientific format’ (D). This instruction requires
double word (32 bit) operation and data registers as
devices (S)and (D)to operate correctly.
(S)is converted from ‘floating point’ format to
‘scientific format’ (D). This instruction requires
double word (32 bit) operation and data registers as
devices (S)and (D)to operate correctly.
5.2.10
BIN (FNC 19)
Operation 1: (Applicable to all units)
The BCD source data (S) is converted into an
e q u i v a le n t b in ar y n um b e r a n d s t o r e d a t t h e
destination device (D). If the source data is not
The BCD source data (S) is converted into an
e q u i v a le n t b in ar y n um b e r a n d s t o r e d a t t h e
destination device (D). If the source data is not
provided in a BCD format an error will occur. This instruction can be used to read in data
directly from thumbwheel switches.
directly from thumbwheel switches.
Operation 2: (Applicable units: FX
(2C)
)
This function is equivalent to FNC 119 EBIN Data
(S) is converted from ‘scientific format’ to ‘floating
point’ format (D). This instruction requires double
word (32 bit) operation and data registers as
devices (S)and (D)to operate correctly.
(S) is converted from ‘scientific format’ to ‘floating
point’ format (D). This instruction requires double
word (32 bit) operation and data registers as
devices (S)and (D)to operate correctly.
Mnemonic
Function
Operands
Program steps
S
D
BCD
FNC 18
(
FNC 18
(
Binary
coded
decimal)
Converts binary
numbers to BCD
equivalents /
Converts floating
point data to
scientific format
numbers to BCD
equivalents /
Converts floating
point data to
scientific format
KnX,KnY, KnM, KnS,
T, C, D, V, Z
T, C, D, V, Z
KnY, KnM, KnS,
T, C, D, V, Z
T, C, D, V, Z
BCD, BCDP:
5 steps
DBCD,
DBCDP:
9 steps
5 steps
DBCD,
DBCDP:
9 steps
When using M8023 to convert data to scientific for-
mat, only double word (32 bit) data registers (D) may
be used. See page 4-46 for more details regarding
floating point format.
mat, only double word (32 bit) data registers (D) may
be used. See page 4-46 for more details regarding
floating point format.
Mnemonic
Function
Operands
Program steps
S
D
BIN
FNC 19
(Binary)
FNC 19
(Binary)
Converts BCD
numbers to their
binary equivalent /
Converts scientific
format data to float-
ing point format
numbers to their
binary equivalent /
Converts scientific
format data to float-
ing point format
KnX, KnY, KnM, KnS,
T, C, D, V, Z
T, C, D, V, Z
KnY, KnM, KnS,
T, C, D, V, Z
T, C, D, V, Z
BIN, BINP:
5 steps
5 steps
DBIN, DBINP:
9 steps
9 steps
When using M8023 to convert data to floating
point format, only double word (32 bit) data reg-
isters (D) may be used. See page 4-46 for more
details regarding floating point format.
point format, only double word (32 bit) data reg-
isters (D) may be used. See page 4-46 for more
details regarding floating point format.
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
PULSE-P
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
16 BIT OPERATION
FX
FX
0N
FX
0(s)
FX
(2C)
FX
2N(C)
32 BIT OPERATION
X0
BCD D 12 K2Y0
[ S ]
[ D ]
X30
M8023
M8000
M8023
DBCD
D 42
D 20
[ S ]
[ D ]
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
PULSE-P
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
16 BIT OPERATION
FX
FX
0N
FX
0(s)
FX
(2C)
FX
2N(C)
32 BIT OPERATION
X0
BIN
D 13
K2X0
[ S ]
[ D ]
X10
M8023
M8000
M8023
DBIN
D 12
D 10
[ S ]
[ D ]