Appendix D How to Use PLC Function
|
Revision June 2008, 04EE, SW--PW V1.11/CTL V2.11
D-55
API
Mnemonic
Operands
Function
23
DIV P S
1
, S
2
,
D Division
Bit Devices
Word devices
Program Steps
Type
OP
X Y M K H
KnX KnY KnM T
C
D
S
1
*
*
*
*
*
*
*
*
S
2
*
*
*
*
*
*
*
*
D
*
*
*
*
*
DIV, DIVP: 7 steps
Operands:
S
1
: Dividend
S
2
: Divisor
D
: Quotient and remainder
Explanations:
1.
In 16-bit instruction,
D
occupies 2 consecutive devices.
2.
This instruction divides
S
1
and
S
2
in BIN format and stores the result in
D
. Be careful with
the positive/negative signs of
S
1
,
S
2
and
D
when doing 16-bit and 32-bit operations.
16-bit instruction:
+1
=
/
Quotient
Remainder
Program Example:
When X0 = On, D0 will be divided by D10 and the quotient will be stored in D20 and remainder in
D21. On/Off of the highest bit indicates the positive/negative status of the result value.
X0
DIV
D0
D10
D20
D0
D10
K4Y0
DIV
API Mnemonic
Operands
Function
24
INC P
D
Increment
Bit Devices
Word devices
Program Steps
Type
OP
X Y M K H
KnX KnY KnM T
C
D
D
*
*
*
*
*
INC, INCP: 3 steps
Содержание AC Motor Drive VFD-E
Страница 1: ......
Страница 2: ......
Страница 3: ......
Страница 13: ...This page intentionally left blank...
Страница 27: ...Chapter 1 Introduction 1 14 Revision June 2008 04EE SW PW V1 11 CTL V2 11 This page intentionally left blank...
Страница 233: ......
Страница 237: ...Appendix A Specifications A 4 Revision June 2008 04EE SW PW V1 11 CTL V2 11 This page intentionally left blank...
Страница 272: ...Appendix B Accessories Revision June 2008 04EE SW PW V1 11 CTL V2 11 B 35 B 11 DIN Rail B 11 1 MKE DRA...
Страница 274: ...Appendix B Accessories Revision June 2008 04EE SW PW V1 11 CTL V2 11 B 37...
Страница 275: ...Appendix B Accessories B 38 Revision June 2008 04EE SW PW V1 11 CTL V2 11 This page intentionally left blank...
Страница 349: ...Appendix D How to Use PLC Function D 66 Revision June 2008 04EE SW PW V1 11 CTL V2 11 This page intentionally left blank...