IDEC MICROSmart FC6A Series Ladder Programming Manual page 168

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

7: B
A
INARY
RITHMETIC
Repeat Operation in the DIV Instruction
Since the DIV (division) instruction (except float data) uses two destination devices, the quotient and remainder are stored as
described below. Source devices S1 and S2 and destination device D1 can be assigned to repeat individually or in combination.
When destination device D1 is not assigned to repeat, the final result is set to destination device D1 (quotient) and D1+1
(remainder). When repeat is assigned, assigned as many consecutive devices as the repeat cycles starting with the designated
device are used.
Division instructions in float data do not generate remainders and use two consecutive data registers to store quotients. When
repeat is assigned for destination of float data, as many consecutive data registers as the repeat cycles are used.
Repeat One Source Device
• Data Type: Word and Integer
When only S1 (source) is assigned to repeat, the final result is set to destination devices D1 and D1+1.
DIV(W)
SOTU
I1
• Data Type: Double Word and Long
When only S1 (source) is assigned to repeat, the final result is set to destination devices D1·D1+1 and D1+2·D1+3.
DIV(D)
SOTU
I1
• Data Type: Float
When only S1 (source) is assigned to repeat, the final result is set to destination devices D1·D1+1.
DIV(F)
SOTU
I1
Repeat Destination Device Only
• Data Type: Word and Integer
When only D1 (destination) is assigned to repeat, the same result is set to 6 devices starting with D1.
DIV(W)
SOTU
I1
• Data Type: Double Word and Long
When only D1 (destination) is assigned to repeat, the same result is set to 6 devices starting with D1·D1+1.
DIV(D)
SOTU
I1
• Data Type: Float
When only D1 (destination) is assigned to repeat, the same result is set to 3 devices starting with D1·D1+1.
DIV(F)
SOTU
I1
7-10
I
NSTRUCTIONS
S1 R
S2 –
D1 –
D10
D20
D30
S1 R
S2 –
D1 –
D10
D20
D30
S1 R
S2 –
D1 –
D10
D20
D30
S1 –
S2 –
D1 R
D10
D20
D30
S1 –
S2 –
D1 R
D10
D20
D30
S1 –
S2 –
D1 R
D10
D20
D30
FC6A S
MICROS
ERIES
MART
S1 (Repeat = 3)
REP
D10
3
D11
D12
S
1
(
R
e
p
e
t a
=
3
REP
D10·D11
3
D12·D13
D14·D15
S
1
(
R
e
p
e
t a
=
3
REP
3
D10·D11
D12·D13
D14·D15
S1 (Repeat = 0)
REP
D10
3
D10
D10
S
1
(
R
e
p
e
t a
=
0
REP
D10·D11
3
D10·D11
D10·D11
S
1
(
R
e
p
e
t a
=
0
REP
3
D10·D11
D10·D11
D10·D11
L
P
M
ADDER
ROGRAMMING
ANUAL
S2 (Repeat = 0)
÷
D20
÷
D20
÷
D20
)
S2 (Repeat = 0)
÷
D
2
0
D ·
2
1
(
D
÷
D20·D21
(D30·D31)
÷
D20·D21
D30·D31
Quotient
)
S2 (Repeat = 0)
÷
D20·D21
÷
D20·D21
÷
D20·D21
S2 (Repeat = 0)
÷
D20
÷
D20
÷
D20
)
S2 (Repeat = 0)
÷
D
2
0
D ·
2
1
D
÷
D20·D21
D32·D33
÷
D20·D21
D34·D35
Quotient
)
S2 (Repeat = 0)
÷
D20·D21
÷
D20·D21
÷
D20·D21
FC9Y-B1726
D1 (Repeat = 0)
(D30)
(D31)
(D30)
(D31)
D30
D31
Quotient
Remainder
D
1
(
R
e
p
e
t a
=
0
)
3
0
D ·
3
) 1
(
D
3
2
D ·
3
) 3
(D32·D33)
D32·D33
Remainder
D
1
(
R
e
p
e
t a
=
0
)
(D30·D31)
(D30·D31)
D30·D31
Quotient
D1 (Repeat = 3)
D30
D33
D31
D34
D32
D35
Quotient
Remainder
D
1
(
R
e
p
e
t a
=
3
)
3
0
D ·
3
1
D
3
6
D ·
3
7
D38·D39
D40·D41
Remainder
D
1
(
R
e
p
e
t a
=
3
)
D30·D31
D32·D33
D34·D35
Quotient

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents