Root: square root @root: square root – KEYENCE Visual KV Series User Manual
Page 209

2.4 Instruction Details
1
2
3-185
Chapter 2 Instructions
Example
Coding
Description
•
The ROOT instruction takes the square root of 32-bit data (binary number) of
which the high-order 16 bits are contained in DM0001 and low-order 16 bits are
contained in DM0000, and then input the result to DM0100.
•
The figures to the right the decimal point of the obtained square root are omitted,
and the result is input back to the same register.
•
When the result is 0, special utility relay No. 2010 turns ON.
•
The ROOT instruction takes the square root of a 32-bit numerical value. In this
case, the high-order 16 bits are contained in TM00, and the low-order 16 bits are
contained in the internal register.
Operands
Key operation
ROOT: Square Root
@ROOT: Square Root
Takes square root of 32-bit data (TM00:
higher order byte, internal register: lower
order byte), and inputs result back to same
register.
ROOT
ROOT
ORB
6
ORL
3
ORB
6
ORL
3
@
#,$
FUN
FUN
ROOT
0000
TM00
STA
DM0001
LDA
DM0000
LDA
DM0100
STA
Line No.
Instruction
Operand
0000
LD
0000
0001
LDA
DM0001
0002
CON
0003
STA
TM00
0004
CON
0005
LDA
DM0000
0006
CON
0007
ROOT
0008
CON
0009
STA
DM0100
T M 0 0
Internal register
Internal register
Higher order 16 bits
Lower order 16 bits
ORL
3
ORB
6
@
#,$
FUN
FUN
ENT
R-SRCH
ENT
R-SRCH
:
:
ROOT / @ROOT
KVNKA Chap 02_4dP.p65
08.3.11, 0:04 PM
185