EasyManua.ls Logo

Mitsubishi Electric R16MTCPU - BCD -> bin Conversion: bin

Mitsubishi Electric R16MTCPU
354 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...
158
4 OPERATION CONTROL PROGRAMS
4.7 Standard Functions
BCD -> BIN conversion: BIN
Setting data
Usable data
: Usable
Description, data type of result
Processing details
The BCD data specified with (S) is converted into BIN data.
If (S) is a 16-bit integer type, the data range is 0 to 9999.
If (S) is a 32-bit integer type, the data range is 0 to 99999999.
Operation error
An operation error will occur if:
A value other than 0 to 9 is in any digit of (S).
(S) is an indirectly specified device and its device No. is outside the range.
Program example
Program which converts the BCD data of D0 into BIN data and substitutes the result to #0
Format Number of basic steps Usable steps
F/FS G
BIN(S) 4 
Setting
data
Usable Data
Bit
device
Word device Constant Calculation
expression
Bit
conditional
expression
Comparison
conditional
expression
16-bit
integer
type
32-bit
integer
type (L)
64-bit
floating
point
type (F)
16-bit
integer
type
(K/H)
32-bit
integer
type
(K/H, L)
64-bit
floating
point
type (K)
(S) 
Setting data Description Data type of result
(S) BCD data which will be converted into BIN data Data type of (S) (Integer type)
#0 = BIN(D0)
1D0
001010
b15 b0
0#0
010011100001111
b15 b0
011010 101
BIN 9999 BCD 9999
Thousands Hundreds Tens Units

Table of Contents

Other manuals for Mitsubishi Electric R16MTCPU

Related product manuals