7: B
INARY
A
RITHMETIC
I
NSTRUCTIONS
7-14
FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
ROOT (Root)
Valid Devices
For valid device address ranges, see "Device Addresses" on page 2-1.
When F (float) data 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 FC6A Series MICROSmart.
When F (float) data 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 FC6A Series MICROSmart.
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 "User Program Execution Errors" on page 3-10.
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.
Valid Data Types
Examples: ROOT
Data type W:
When input is on, the square root of the device assigned by S1 is extracted
and stored to the destination assigned 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 the device assigned by S1·S1+1 is
extracted and is stored to the destination assigned 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 the device assigned by S1·S1+1 is
extracted and is stored to the destination assigned by D1·D1+1.
Device
Function
I
Q
M
R
T
C
D
P
Constant
Repeat
S1 (Source 1)
Binary data
—
—
—
—
—
—
X
—
X
—
D1 (Destination 1)
Destination to store results
—
—
—
—
—
—
X
—
—
—
ROOT(*)
S1
*****
D1
*****
S1
→
D1
S1·S1+1
→
D1·D1+1
S1·S1+1
→
D1·D1+1
W (word)
X
When a word device such as D (data register) is assigned as the source or destination, 1 point (word data) or 2
points (double-word or float data) are used.
I (integer)
—
D (double word)
X
L (long)
—
F (float)
X
55
D10
741
D20
Before Execution
After Execution
55
7.4161
=
4294967295
D11·D12
6553599
D21·D22
4294967295
65535.99999
=
20.738916
D13·D14
4.554
D23·D24
20.738916 = 4.554...
D1
D20
I0
ROOT(W)
S1
D10
D1
D21
I1
ROOT(D)
S1
D11
D1
D23
I2
ROOT(F)
S1
D13
Summary of Contents for MICROSmart FC6A Series
Page 1: ...B 1726 7 FC6A SERIES Ladder Programming Manual ...
Page 8: ...Preface 7 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 32: ...1 OPERATION BASICS 1 20 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 96: ...3 INSTRUCTIONS REFERENCE 3 18 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 130: ...4 BASIC INSTRUCTIONS 4 34 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 192: ...9 SHIFT ROTATE INSTRUCTIONS 9 12 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 272: ...12 DISPLAY INSTRUCTIONS 12 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 284: ...14 REFRESH INSTRUCTIONS 14 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 502: ...25 DATA LOG INSTRUCTIONS 25 22 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 546: ...26 SCRIPT 26 44 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 598: ...APPENDIX A 14 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...