EasyManuals Logo

IDEC OpenNet series User Manual

IDEC OpenNet series
427 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #169 background imageLoading...
Page #169 background image
11: BINARY ARITHMETIC INSTRUCTIONS
11-4 OPENNET CONTROLLER USERS MANUAL
Examples: DIV
• Data Type: Word
• Data Type: Integer
• Data Type: Double Word
• Data Type: Long
I2
When input I2 is on, data of D10 is divided by data of D20. The
quotient is set to D30, and the remainder is set to D31.
Note: Destination uses two word operands in the division operation of word data type, so do not use data register D7999
as destination operand D1, otherwise a user program syntax error occurs, and the ERROR LED is lit. When using a bit oper-
and such as internal relay for destination, 32 internal relays are required; so do not use internal relay M2521 or a larger
number as destination operand D1.
REPS2
D20
D1
D30
S1
D10
DIV(W)
Quotient Remainder
50
D10
÷
7
D30
7
D20
1
D31
I2
REPS2
D20
D1
D30
S1
D10
DIV(I)
Quotient Remainder
50
D10
÷
7
D30
7
D20
1
D31
Note: Destination uses two word operands in the division operation of integer data type, so do not use data register
D7999 as destination operand D1, otherwise a user program syntax error occurs, and the ERROR LED is lit. When using a
bit operand such as internal relay for destination, 32 internal relays are required; so do not use internal relay M2521 or a
larger number as destination operand D1.
I1
REPS2
D20
D1
D30
S1
D10
DIV(D)
÷
100000
D10·D11
70000
D20·D21
1
D30·D31
30000
D32·D33
Quotient Remainder
Note: Destination uses four word operands in the division operation of double-word data type, so do not use data register
D7997 through D7999 as destination operand D1, otherwise a user program syntax error occurs, and the ERROR LED is
lit. When using a bit operand such as internal relay for destination, 64 internal relays are required; so do not use internal
relay M2481 or a larger number as destination operand D1.
I1
REPS2
D20
D1
D30
S1
D10
DIV(L)
÷
100000
D10·D11
70000
D20·D21
1
D30·D31
30000
D32·D33
Quotient Remainder
Note: Destination uses four word operands in the division operation of long data type, so do not use data register D7997
through D7999 as destination operand D1, otherwise a user program syntax error occurs, and the ERROR LED is lit. When
using a bit operand such as internal relay for destination, 64 internal relays are required; so do not use internal relay
M2481 or a larger number as destination operand D1.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IDEC OpenNet series and is the answer not in the manual?

IDEC OpenNet series Specifications

General IconGeneral
BrandIDEC
ModelOpenNet series
CategoryController
LanguageEnglish

Related product manuals