FT1A S
MART
A
XIS
U
SER
’
S
M
ANUAL
FT9Y-B1382
8-1
8: B
INARY
A
RITHMETIC
I
NSTRUCTIONS
Introduction
The binary arithmetic instructions make it possible for the user to program computations using addition, subtraction,
multiplication, and division. For addition and subtraction devices, internal relay M8003 is used to carry or to borrow.
The ROOT instruction can be used to calculate the square root of the value stored in one or two data registers.
ADD (Addition)
SUB (Subtraction)
MUL (Multiplication)
DIV (Division)
Data type W or I:
S1 + S2
D1, CY
Data type D, L, or F:
S1·S1+1 + S2·S2+1
D1·D1+1, CY
When imnput is on, 16- or 32-bit data designated by source devices S1 and S2
are added. The result is set to destination device D1 and carry (M8003).
REP
**
S1(R)
*****
D1(R)
*****
ADD(*)
S2(R)
*****
Data type W or I:
S1 – S2
D1, BW
Data type D, L, or F:
S1·S1+1 – S2·S2+1
D1·D1+1, BW
When input is on, 16- or 32-bit data designated by source device S2 is
subtracted from 16- or 32-bit data designated by source device S1. The result
is set to destination device D1 and borrow (M8003).
REP
**
S1(R)
*****
D1(R)
*****
SUB(*)
S2(R)
*****
Data type W or I:
S1
S2
D1·D1+1
Data type D, L, or F:
S1·S1+1
S2·S2+1
D1·D1+1
When input is on, 16- or 32-bit data designated by source device S1 is
multiplied by 16- or 32-bit data designated by source device S2. The result is
set to destination device D1.
When the result exceeds the valid range for data types D or L, the ERR LED
and special internal relay M8004 (user program execution error) are turned on.
REP
**
S1(R)
*****
D1(R)
*****
MUL(*)
S2(R)
*****
Data type W or I: S1 ÷ S2
D1 (quotient), D1+1 (remainder)
Data type D or L:
S1·S1+1 ÷ S2·S2+1
D1·D1+1 (quotient),
D1+2·D1+3 (remainder)
Data type F:
S1·S1+1 ÷ S2·S2+1
D1·D1+1 (quotient)
When input is on, 16- or 32-bit data designated by source device S1 is divided
by 16- or 32-bit data designated by source device S2. The quotient is set to
16- or 32-bit destination device D1, and the remainder is set to the next 16- or
32-bit data. Data type F does not generate a remainder.
When S2 is 0 (dividing by 0), the ERR LED and special internal relay M8004
(user program execution error) are turned on.
A user program execution error also occurs in the following division
operations.
Data type I:
–32768 ÷ (–1)
Data type L:
–2147483648 ÷ (–1)
REP
**
S1(R)
*****
D1(R)
*****
DIV(*)
S2(R)
*****
Summary of Contents for microsmart pentra
Page 1: ...FT1A SERIES FC9Y B1382 Ladder Programming Manual ...
Page 6: ...Preface 5 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 104: ...7 DATA COMPARISON INSTRUCTIONS 7 10 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 122: ...8 BINARY ARITHMETIC INSTRUCTIONS 8 18 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 138: ...10 SHIFT ROTATE INSTRUCTIONS 10 12 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 162: ...11 DATA CONVERSION INSTRUCTIONS 11 24 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 188: ...12 CALENDAR COMPARISON INSTRUCTIONS 12 26 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 198: ...15 REFRESH INSTRUCTIONS 15 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 202: ...16 INTERRUPT CONTROL INSTRUCTIONS 16 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 266: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 318: ...25 USER COMMUNICATION INSTRUCTIONS 25 22 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...