177
Outline
Divides the 16-bit data by the divisor and stores the result in the specified
area and the remainder in special data register DT9015.
Program example
■
Operands
■
Explanation of example
• Divides the contents of data register DT100 by decimal constant K10 when trigger X0 turns ON. The quotient is
stored in data register DT0 and the remainder is stored in special data register DT9015.
Bit position
K10
0 0 0 0
0 0 0 0
11
8
0 0 0 0
1 0 1 0
3
0
Divisor [S2]: K10
X0: ON
15
•
•
12
•
•
•
•
7
4
•
•
Bit position
DT0
0 0 0 0
0 0 0 0
11
8
0 0 0 1
0 0 1 0
3
0
Quotient [D]: K18
15
•
•
12
•
•
•
•
7
4
•
•
Bit position
DT100
0 0 0 0
0 0 0 0
11
8
1 0 1 1
0 1 1 1
3
0
Dividend [S1]: K183
15
•
•
12
•
•
•
•
7
4
•
•
Bit position
DT9015
0 0 0 0
0 0 0 0
11
8
0 0 0 0
0 0 1 1
3
0
Remainder: K3
15
•
•
12
•
•
•
•
7
4
•
•
–
Timer/Counter
EV
Relay
SV
WR
WY
WX
Operand
S1
A
A
A
A
A:
N/A: Not Available
Register
DT
A
IY
IX
A
A
H
K
A
A
Constant
Index
modifier
A
Index
register
Available
A
S2
A
A
A
A
A
A
A
A
A
A
A
N/A A
A
A
A
A
A
N/A N/A
A
A
D
F32
(%)
16-bit data
[S1/S2
→
D... (DT9015)]
Availability
All series
Step
7
6-3. Description of High-level Instructions
16-bit equivalent constant or 16-bit area (for dividend)
16-bit equivalent constant or 16-bit area (for divisor)
16-bit area (for quotient), (remainder is stored in special data register DT9015)
Ladder Diagram
Boolean Non-ladder
Address Instruction
20
X0
F32 % , DT 100 , K10 , DT 0
D
Trigger
S2
S1
20
21
ST
X
0
F
32
(% )
DT
100
K
10
DT
0
S1
S2
D
Summary of Contents for FP1
Page 1: ...PROGRAMMABLE CONTROLLER FP1 is a global brand name of Matsushita Electric Works Hardware ...
Page 28: ...20 ...
Page 98: ...90 ...
Page 150: ...142 ...
Page 208: ...200 ...
Page 226: ...218 ...
Page 280: ...272 ...