129
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
5 How to Specify Devices and Constants to Instructions
5.2 Specification of Constants K, H and E (Decimal, Hexadecimal and Real Number)
1
In
troduct
io
n
2
Ov
e
rv
ie
w
3
In
st
ru
ct
ion
Li
st
4
D
evi
ce
s
in
De
ta
il
5
Speci
fied t
h
e
D
evi
ce &
C
onst
a
nt
6
Bef
o
re
Pr
ogr
a
m
m
ing
7
Bas
ic
In
st
ru
cti
o
n
8
FNC0
0
-FNC0
9
P
ro
g
ra
m F
lo
w
9
FNC1
0
-FNC1
9
M
ov
e
&
C
om
par
e
10
FNC
20-
FNC
2
9
Ar
ith.
&
Logi
c
O
per
at
io
n
Scientific notation (real number) is valid in the following instructions:
- Conversion from binary floating point (real number) into scientific notation (real number): FNC118
([D]EBCD)
- Conversion from scientific notation (real number) into binary floating point (real number): FNC119
([D]EBIN)
5.2
Specification of Constants K, H and E
(Decimal, Hexadecimal and Real Number)
When handling constants in a sequence program, use constant K (decimal), H (hexadecimal) or E (floating
point).
In peripheral equipment for programming, add "K" to a decimal number, "H" to a hexadecimal number and "E"
to a floating point (real number) for operations associated with numeric values in instructions. (Examples:
K100 (decimal number), H64 (hexadecimal number) and E1.23 (or E1.23 + 10) (real number))
The roles and functions of constants are described below.
5.2.1
Constant K (decimal number)
"K" indicates a decimal integer, and is mainly used to specify the set value of timers and counters and
numeric values in operands in applied instructions. (Example: K1234)
The decimal constant specification range is as follows:
- When word data (16 bits) is used ... K-32768 to K32767
- When two-word data (32 bits) is used ... K-2,147,483,648 to K2,147,483,647
5.2.2
Constant H (hexadecimal number)
"H" indicates a hexadecimal number, and is mainly used to specify numeric values in operands in applied
instructions. (Example: H1234)
When each digit is used in the range from 0 to 9, the status (1 or 0) of each bit is equivalent to BCD code, so
BCD data can be specified also.
(Example: H1234 ... When specifying BCD data, specify each digit of hexadecimal number in 0 to 9.)
The hexadecimal constant setting range is as follows:
- When word data (16 bits) is used ... H0 to HFFFF (H0 to H9999 in the case of BCD data)
- When two-word data (32 bits) is used ... H0 to HFFFFFFFF (H0 to H99999999 in the case of BCD data)
5.2.3
Constant E (real number)
"E" indicates a real number (floating point data), and is mainly used to specify numeric values in operands in
applied instructions. (Example: E1.234 or E1.234 + 3)
The real number setting range is from
−
1.0
×
2
128
to
−
1.0
×
2
−
126
, 0 and 1.0
×
2
−
126
to 1.0
×
2
128
.
In a sequence program, a real number can be specified in two methods, "normal expression" and "exponent
expression".
- Normal expression: .................. Specify a numeric value as it is.
For example, specify "10.2345" in the form "E10.2345".
- Exponent expression: .............. Specify a numeric value in the format "(numeric value)
×
10
n
".
For example, specify "1234" in the form "E1.234 + 3".
"+3" in "E1.234 + 3" indicates 10
n
. ("+3" indicates "10
3
".)
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......