5:
Binary
Arithmetic
Instructions
5
‐
6
FC5A
MicroSmart
User’s
Manual FC9Y
‐
B1273
Repeat
Operation
in
the
ADD
and
SUB
Instructions
Source
devices
S1
and
S2
and
destination
device
D1
can
be
designated
to
repeat
individually
or
in
combination.
When
destination
device
D1
is
not
designated
to
repeat,
the
final
result
is
set
to
destination
device
D1.
When
repeat
is
desig
‐
nated,
consecutive
devices
as
many
as
the
repeat
cycles
starting
with
the
designated
device
are
used.
Since
the
repeat
operation
works
similarly
on
the
ADD
(addition)
and
SUB
(subtraction)
instructions,
the
following
examples
are
described
using
the
ADD
instruction.
Repeat
One
Source
Device
•
Data
Type:
Word
and
Integer
When
only
S1
(source)
is
designated
to
repeat,
the
final
result
is
set
to
destination
device
D1.
•
Data
Type:
Double
Word,
Long,
and
Float
When
only
S1
(source)
is
designated
to
repeat,
the
final
result
is
set
to
destination
device
D1
∙
D1+1.
Repeat
Destination
Device
Only
•
Data
Type:
Word
and
Integer
When
only
D1
(destination)
is
designated
to
repeat,
the
same
result
is
set
to
3
devices
starting
with
D1.
•
Data
Type:
Double
Word,
Long,
and
Float
When
only
D1
(destination)
is
designated
to
repeat,
the
same
result
is
set
to
3
devices
starting
with
D1
∙
D1+1.
Repeat
Two
Source
Devices
•
Data
Type:
Word
and
Integer
When
S1
and
S2
(source)
are
designated
to
repeat,
the
final
result
is
set
to
destination
device
D1.
•
Data
Type:
Double
Word,
Long,
and
Float
When
S1
and
S2
(source)
are
designated
to
repeat,
the
final
result
is
set
to
destination
device
D1
∙
D1+1.
I1
REP
3
S1
R
D10
D1
–
D30
15
D11
10
D10
20
D12
S1
(Repeat
=
3)
D1
(Repeat
=
0)
S2
–
D20
S2
(Repeat
=
0)
+
+
+
(40)
D30
(35)
D30
45
D30
25
D20
25
D20
25
D20
SOTU
ADD(W)
I1
REP
3
S1
R
D10
D1
–
D30
D12
∙
D13
D10
∙
D11
D14
∙
D15
S1
(Repeat
=
3)
D1
(Repeat
=
0)
S2
–
D20
S2
(Repeat
=
0)
+
+
+
(D30
∙
D31)
(D30
∙
D31)
D30
∙
D31
D20
∙
D21
D20
∙
D21
D20
∙
D21
SOTU
ADD(D)
I1
REP
3
S1
–
D10
D1
R
D30
10
D10
10
D10
10
D10
S1
(Repeat
=
0)
D1
(Repeat
=
3)
S2
–
D20
S2
(Repeat
=
0)
+
+
+
35
D31
35
D30
35
D32
25
D20
25
D20
25
D20
SOTU
ADD(W)
I1
REP
3
S1
–
D10
D1
R
D30
D10
∙
D11
D10
∙
D11
D10
∙
D11
S1
(Repeat
=
0)
D1
(Repeat
=
3)
S2
–
D20
S2
(Repeat
=
0)
+
+
+
D32
∙
D33
D30
∙
D31
D34
∙
D35
D20
∙
D21
D20
∙
D21
D20
∙
D21
SOTU
ADD(D)
I1
REP
3
S1
R
D10
D1
–
D30
15
D11
10
D10
20
D12
S1
(Repeat
=
3)
D1
(Repeat
=
0)
S2
R
D20
S2
(Repeat
=
3)
+
+
+
(50)
D30
(35)
D30
65
D30
35
D21
25
D20
45
D22
SOTU
ADD(W)
I1
REP
3
S1
R
D10
D1
–
D30
D12
∙
D13
D10
∙
D11
D14
∙
D15
S1
(Repeat
=
3)
D1
(Repeat
=
0)
S2
R
D20
S2
(Repeat
=
3)
+
+
+
(D30
∙
D31)
(D30
∙
D31)
D30
∙
D31
D22
∙
D23
D20
∙
D21
D24
∙
D25
SOTU
ADD(D)
Содержание MICROSmart FC5A Series
Страница 1: ...FC5A SERIES FC9Y B1273 1 User s Manual Advanced Volume ...
Страница 2: ......
Страница 8: ...Preface 6 FC5A MicroSmart User s Manual FC9Y B1273 ...
Страница 14: ...TABLE OF CONTENTS vi FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 52: ...4 DATA COMPARISON INSTRUCTIONS 4 10 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 72: ...5 Binary Arithmetic Instructions 5 20 FC5A MicroSmart User s Manual FC9Y B1273 ...
Страница 88: ...7 SHIFT ROTATE INSTRUCTIONS 7 12 FC5A MicroSmart User s Manual FC9Y B1273 ...
Страница 112: ...8 DATA CONVERSION INSTRUCTIONS 8 24 FC5A MicroSmart User s Manual FC9Y B1273 ...
Страница 138: ...11 PROGRAM BRANCHING INSTRUCTIONS 11 14 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 178: ...13 PULSE INSTRUCTIONS 13 32 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 202: ...14 PID INSTRUCTION 14 24 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 206: ...15 DUAL TEACHING TIMER INSTRUCTIONS 15 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 214: ...16 INTELLIGENT MODULE ACCESS INSTRUCTIONS 16 8 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 248: ...21 COMPUTER LINK COMMUNICATION 21 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 272: ...23 MODBUS TCP COMMUNICATION 23 10 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 332: ...25 EXPANSION RS232C RS485 COMMUNICATION 25 16 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 341: ...NOTE FC5A MICROSMART USER S MANUAL FC9Y B1273 1 ...
Страница 342: ...NOTE 2 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...