11: BINARY ARITHMETIC INSTRUCTIONS
11-8 OPENNET CONTROLLER USER’S MANUAL
Repeat Source and Destination Operands
• Data Type: Word
When S1 (source) and D1 (destination) are designated to repeat, different results are set to 6 operands starting with D1.
• Data Type: Double Word
When S1 (source) and D1 (destination) are designated to repeat, different results are set to 6 operands starting with
D1·D1+1.
Repeat All Source and Destination Operands
• Data Type: Word
When all operands are designated to repeat, different results are set to 6 operands starting with D1.
• Data Type: Double Word
When all operands are designated to repeat, different results are set to 6 operands starting with D1·D1+1.
Note: When a user program execution error occurs in any repeat operation, special internal relay M8004 (user program exe-
cution error) and the ERROR LED are turned on and maintained while operation for other instructions is continued. For the
advanced instruction which has caused a user program execution error, results are not set to any destination.
I1
REP
3
S1 R
D10
D1 R
D30
D10
S1 (Repeat = 3) D1 (Repeat = 3)
S2 –
D20
S2 (Repeat = 0)
÷ D30D20 D33
D11
D12
÷
÷
D20
D20
D31
D32
D34
D35
Quotient Remainder
SOTU
DIV(W)
I1
REP
3
S1 R
D10
D1 R
D30
D10·D11
S1 (Repeat = 3) D1 (Repeat = 3)
S2 –
D20
S2 (Repeat = 0)
÷ D30·D31D20·D21 D36·D37
D12·D13
D14·D15
÷
÷
D20·D21
D20·D21
D32·D33
D34·D35
D38·D39
D40·D41
Quotient Remainder
SOTU
DIV(D)
I1
REP
3
S1 R
D10
D1 R
D30
D10
S1 (Repeat = 3) D1 (Repeat = 3)
S2 R
D20
S2 (Repeat = 3)
÷ D30D20 D33
D11
D12
÷
÷
D21
D22
D31
D32
D34
D35
Quotient Remainder
SOTU
DIV(W)
I1
REP
3
S1 R
D10
D1 R
D30
D10·D11
S1 (Repeat = 3) D1 (Repeat = 3)
S2 R
D20
S2 (Repeat = 3)
÷ D30·D31D20·D21 D36·D37
D12·D13
D14·D15
÷
÷
D22·D23
D24·D25
D32·D33
D34·D35
D38·D39
D40·D41
Quotient Remainder
SOTU
DIV(D)
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com