FT1A S
MART
A
XIS
U
SER
’
S
M
ANUAL
FT9Y-B1382
8-13
8: B
INARY
A
RITHMETIC
I
NSTRUCTIONS
INC (Increment)
DEC (Decrement)
Applicable CPU Modules
Valid Devices
For the valid device address range, see pages 6-1 and 6-2
(Basic Vol.).
Since the INC and DEC instructions are executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should be used as
required.
Valid Data Types
Increment beyond Limits
When the S/D value is at its maximum and incremented by one, the value returns to 0, turning on the carry (M8003).
Decrement beyond Limits
When the S/D value is at its minimum and decremented by one, the value returns to its maximum value (word or double-word
data type) or to –1 (integer or long data type), turning on the borrow (M8003).
Example: INC
Example: DEC
Data type W or I:
S/D + 1
S/D
Data type D or L:
S/D·S/D+1 + 1
S/D·S/D+1
When input is on, one is added to the 16- or 32-bit data designated by device S/D and the result is stored to
the same device.
INC(*)
S/D
*****
Data type W or I:
S/D – 1
S/D
Data type D or L:
S/D·S/D+1 – 1
S/D·S/D+1
When input is on, one is subtracted from the 16- or 32-bit data designated by device S/D and the result is
stored to the same device.
DEC(*)
S/D
*****
FT1A-12
FT1A-24
FT1A-40
FT1A-48
FT1A-Touch
X
X
X
X
X
Device
Function
I
Q
M
R
T
C
D
Constant
Repeat
S/D (Source/Destination)
Device to increment data
—
—
—
—
—
—
X
—
—
W (word)
X
When a word device such as D (data register) is designated as the source/destination, 1 point (word or integer
data type) or 2 points (double-word or long data type) are used.
I (integer)
X
D (double word)
X
L (long)
X
F (float)
—
S/D
D10
When input I0 is turned on, the data of D10 is incremented by one.
If the SOTU is not programmed, the data of D10 is incremented in each scan.
I0
INC(W)
SOTU
100
D10
+
101
D10
1
S/D
D20
I1
DEC(W)
SOTU
When input I1 is turned on, the data of D20 is decremented by one.
If the SOTU is not programmed, the data of D20 is decremented in each scan.
100
D20
–
99
D20
1
Содержание microsmart pentra
Страница 1: ...FT1A SERIES FC9Y B1382 Ladder Programming Manual ...
Страница 6: ...Preface 5 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 104: ...7 DATA COMPARISON INSTRUCTIONS 7 10 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 122: ...8 BINARY ARITHMETIC INSTRUCTIONS 8 18 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 138: ...10 SHIFT ROTATE INSTRUCTIONS 10 12 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 162: ...11 DATA CONVERSION INSTRUCTIONS 11 24 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 188: ...12 CALENDAR COMPARISON INSTRUCTIONS 12 26 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 198: ...15 REFRESH INSTRUCTIONS 15 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 202: ...16 INTERRUPT CONTROL INSTRUCTIONS 16 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 266: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 318: ...25 USER COMMUNICATION INSTRUCTIONS 25 22 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...