Basic Function Instruction
6 -3 3
FUN 16
D
P
(-
1
)
DECREMENT
(Subtracts 1 from the D value)
FUN 16
D
P
(-
1
)
Operand
D : The register to be decreased
D may combine with V, Z, P0~P9 to
serve indirect addressing
WY
WM
WS TMR CTR
HR
OR
HR
HSCR RTCR
SR
ROR
DR
X R
Range
Ope-
rand
WY0
∣
WY240
WM0
∣
WM1896
WS0
∣
WS984
T0
∣
T255
C0
∣
C255
R0
∣
R3839
R3904
∣
R3919
R3920
∣
R4047
R4096
∣
R4127
R4128
∣
R4135
R4136
∣
R4167
R5000
∣
R8071
D0
∣
D4095
V
、
Z
P 0 ~ P 9
D
○
○
○
○
○
○
○
○
○
○
○
*
○
*
○
○
Description
●
Subtracts 1 from the register D when the decrement control input "EN" =1 or "EN
↑
" (
P
instruction) from 0
to 1. If the value of D is already at the lower limit of negative number -32768 or -2147483648, subtracting
one from this value will change it to the upper limit of positive number 32767 or 2147483647. At the same
time, the underflow flag FO0 (UDF) is set to 1.
Example
16-bit decrement register
Ladder diagram
Key operations
Mnemonic code
X0
EN
16P.
(-1)
R 0
UDF
ORG
ORG X 0
FUN 16P
D : R 0
D
R0 0
Ø
X0
=
D
R0
-
1
Содержание FBs-CBE
Страница 78: ...MEMO ...
Страница 111: ...4 6 X0 X1 Node A Y0 Y1 Node B differential down Incerse differential up t Scan time Inverse t t ...
Страница 141: ...Basic Function Instruction 6 16 FUN 2 SKP SKIP START FUN 2 SKP Y2 Y1 Y0 T201 10S X0 X1 X2 0 10 0 ...
Страница 305: ...MEMO ...
Страница 348: ...MEMO ...