12: B
OOLEAN
C
OMPUTATION
I
NSTRUCTIONS
« FC4A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
»
12-3
Repeat Operation in the ANDW, ORW, and XORW Instructions
Source operands S1 and S2 and destination operand D1 can be designated to repeat individually or in combination. When
destination operand D1 is not designated to repeat, the final result is set to destination operand D1. When repeat is desig-
nated, consecutive operands as many as the repeat cycles starting with the designated operand are used.
Since the repeat operation works similarly on the ANDW (AND word), ORW (OR word), and XORW (exclusive OR
word) instructions of the word and integer data types, the following examples are described using the ANDW instruction
of the word data type.
Repeat One Source Operand
When only S1 (source) is designated to repeat, the final result is set to destination operand D1.
Repeat Destination Operand Only
When only D1 (destination) is designated to repeat, the same result is set to 3 operands starting with D1.
Repeat Two Source Operands
When S1 and S2 (source) are designated to repeat, the final result is set to destination operand D1.
Repeat Source and Destination Operands
When S1 (source) and D1 (destination) are designated to repeat, different results are set to 3 operands starting with D1.
Repeat All Source and Destination Operands
When all operands are designated to repeat, different results are set to 3 operands starting with D1.
I1
D10
S1 (Repeat = 3)
D1 (Repeat = 0)
S2 (Repeat = 0)
·
(D30)
D20
D11
D12
·
·
D20
D20
(D30)
D30
SOTU
REP
3
S1 R
D10
D1 –
D30
S2 –
D20
ANDW(W)
I1
REP
3
S1 –
D10
D1 R
D30
S2 –
D20
SOTU
ANDW(W)
D10
S1 (Repeat = 0)
D1 (Repeat = 3)
S2 (Repeat = 0)
·
D30
D20
D10
D10
·
·
D20
D20
D31
D32
I1
REP
3
D1 –
D30
S2 R
D20
SOTU
D10
S1 (Repeat = 3)
D1 (Repeat = 0)
S2 (Repeat = 3)
·
(D30)
D20
D11
D12
·
·
D21
D22
(D30)
D30
S1 R
D10
ANDW(W)
I1
REP
3
S1 R
D10
D1 R
D30
S2 –
D20
SOTU
ANDW(W)
D10
S1 (Repeat = 3)
D1 (Repeat = 3)
S2 (Repeat = 0)
·
D30
D20
D11
D12
·
·
D20
D20
D31
D32
I1
REP
3
D1 R
D30
S2 R
D20
SOTU
D10
S1 (Repeat = 3)
D1 (Repeat = 3)
S2 (Repeat = 3)
·
D30
D20
D11
D12
·
·
D21
D22
D31
D32
S1 R
D10
ANDW(W)
Summary of Contents for FC4A-C10R2
Page 1: ...FC4A SERIES Micro Programmable Logic Controller User s Manual FC9Y B812 ...
Page 6: ...PREFACE 4 FC4A MICROSMART USER S MANUAL ...
Page 94: ...2 MODULE SPECIFICATIONS 2 74 FC4A MICROSMART USER S MANUAL ...
Page 184: ...6 ALLOCATION NUMBERS 6 20 FC4A MICROSMART USER S MANUAL ...
Page 218: ...8 ADVANCED INSTRUCTIONS 8 8 FC4A MICROSMART USER S MANUAL ...
Page 240: ...11 BINARY ARITHMETIC INSTRUCTIONS 11 8 FC4A MICROSMART USER S MANUAL ...
Page 244: ...12 BOOLEAN COMPUTATION INSTRUCTIONS 12 4 FC4A MICROSMART USER S MANUAL ...
Page 252: ...13 SHIFT ROTATE INSTRUCTIONS 13 8 FC4A MICROSMART USER S MANUAL ...
Page 274: ...15 WEEK PROGRAMMER INSTRUCTIONS 15 8 FC4A MICROSMART USER S MANUAL ...
Page 378: ...22 DUAL TEACHING TIMER INSTRUCTIONS 22 4 FC4A MICROSMART USER S MANUAL ...
Page 386: ...23 INTELLIGENT MODULE ACCESS INSTRUCTIONS 23 8 FC4A MICROSMART USER S MANUAL ...
Page 408: ...24 ANALOG I O CONTROL 24 22 FC4A MICROSMART USER S MANUAL ...
Page 426: ...26 COMPUTER LINK COMMUNICATION 26 6 FC4A MICROSMART USER S MANUAL ...