Mitsubishi Electronics Mitsubishi Digital Electronics Video Gaming Accessories FX3G ユーザーズマニュアル

ページ / 936
149
FX
3G
/FX
3U
/FX
3UC
 Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
5 How to Specify Devices and Constants to Instructions
5.1 Numeric Values Handled in PLCs (Octal, Decimal, Hexadecimal and Real Numbers)
1
In
trodu
ct
ion
2
O
ver
vi
ew
3
In
st
ru
ct
ion 
Li
st
4
D
evices 
in D
etail
5
Specifi
ed t
he
D
evice &
 
C
onst
ant
6
Bef
ore 
Pr
ogr
am
m
ing
7
B
asic 
In
st
ru
ct
ion
8
FNC0
0-F
NC0
9
Pr
ogr
am
 Flow
9
FN
C
10-FN
C
19
Mo
ve
 &
 Co
mp
are
10
FNC2
0-F
NC2
9
Ar
ith.
 &
 Logic 
O
per
ati
on
5.
How to Specify Devices and Constants to Instructions
This chapter explains how to specify sources and destinations in sequence instructions which are the basis for
handling PLC instructions.
• Specifying constants as decimal, hexadecimal and real numbers
• Specifying digits of bit devices
• Specifying bit positions in data registers
• Directly specifying BFM (buffer memory) in special function blocks/units
• Indexing with index registers
5.1
Numeric Values Handled in PLCs
(Octal, Decimal, Hexadecimal and Real Numbers)
FX PLCs handle five types of numeric values according to the application and purpose.
This section explains the roles and functions of these numeric values.
5.1.1
Types of numeric values
1. Decimal numbers (DEC)
• Set value (constant K) of timers and counters
• Device numbers of auxiliary relays (M), timers (T), counters (C), state relays (S), etc.
• Numeric values in operands and instruction operations in applied instructions (constant K) 
2. Hexadecimal numbers (HEX)
• Numeric values in operands and instruction operations in applied instructions (constant H)
3. Binary numbers (BIN)
For a timer, counter or data register, a numeric value is specified in
decimal or hexadecimal as described above.  But all of these numeric
values are handled in the binary format inside PLCs.
When these devices are monitored in peripheral equipment, they are
automatically converted into the decimal format as shown in the figure
on the right (or can be converted into the hexadecimal format).
• Handling of negative value
A negative value is expressed in complement of PLCs.
For details, refer to the explanation of NEG (FNC 29) instruction.
4. Octal numbers (OCT)
In FX PLCs, device numbers of input relays and output relays are
assigned in octal.
Because "8" and "9" do not exist in octal, device numbers are carried
in the way "0 to 7, 10 to 17,  70 to 77, 100 to 107".
5. Binary coded decimal (BCD)
BCD format expresses each numeric value from 0 to 9 constructing each digit of a decimal number in a 4-bit binary
number.
Because handling of each digit is easy, this format is adopted in controlling digital switches of BCD output type and
seven-segment display units.
6. Real numbers (floating point data)
FX
3G
, FX
3U
 and FX
3UC
 PLCs have the floating point operation function to achieve high accuracy operation.
In floating point operations, binary floating points (real numbers) are used, and scientific notation (real numbers) are
used for monitoring them.
1
0
1
0
1
0
0
0
1
1
0
0
0
0
0
0
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
(binary)
Input from
keyboard
0: Positive value
1: Negative value
(decimal)
(decimal)
K   7   8   9
Monitoring in programming tool
Automatic
conversion
1+4+16+256+512
= 789
Example of decimal
number input
K   7   8   9