8: B
INARY
A
RITHMETIC
I
NSTRUCTIONS
8-14
FT1A S
MART
A
XIS
U
SER
’
S
M
ANUAL
FT9Y-B1382
ROOT (Root)
Applicable CPU Modules
Valid Devices
For the valid device address range, see pages 6-1 and 6-2
(Basic Vol.).
When F (float) data type is selected and source device S1 contains a negative value, a user program execution error will result, turning on special
internal relay M8004 and the ERR LED on the CPU module.
When F (float) data type is selected and S1 does not comply with the normal floating-point format, a user program execution error will result,
turning on special internal relay M8004 and ERR LED on the CPU module.
When a user program execution error occurs, the execution of the instruction is canceled. The value of D1 is left unchanged and the next instruction
is executed. For user program execution errors, see Chapter 4 “User Program Execution Errors” on page 4-21.
Since the ROOT instruction is 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
Examples: ROOT
Data type W:
When input is on, the square root of device designated by S1 is extracted
and is stored to the destination designated by D1.
The square root is calculated to two decimals, omitting the figures below
the second place of decimals, and multiplied by 100.
Data type D:
When input is on, the square root of device designated by S1·S1+1 is
extracted and is stored to the destination designated by D1·D1+1.
The square root is calculated to two decimals, omitting the figures below
the second place of decimals, and multiplied by 100.
Data type F:
When input is on, the square root of device designated by S1·S1+1 is
extracted and is stored to the destination designated by D1·D1+1.
FT1A-12
FT1A-24
FT1A-40
FT1A-48
FT1A-Touch
X
X
X
X
X
ROOT(*)
S1
*****
D1
*****
S1
D1
S1·S1+1
D1·D1+1
S1·S1+1
D1·D1+1
Device
Function
I
Q
M
R
T
C
D
Constant
Repeat
S1 (Source 1)
Binary data
—
—
—
—
—
—
X
X
—
D1 (Destination 1)
Destination to store results
—
—
—
—
—
—
X
—
—
W (word)
X
When a word device such as D (data register) is designated as the source or destination, 1 point (word data type)
or 2 points (double-word or float data type) are used.
I (integer)
—
D (double word)
X
L (long)
—
F (float)
X
D1
D20
I0
ROOT(W)
S1
D10
55
D10
741
D20
Before Execution
After Execution
D1
D21
I1
ROOT(D)
S1
D11
D1
D23
I2
ROOT(F)
S1
D13
55
7.4161
=
4294967295
D11·D12
6553599
D21·D22
4294967295
65535.99999
=
20.738916
D13·D14
4.554
D23·D24
20.738916
4.554
=
Содержание 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 ...