SQR
SQR, SQRP
SQR instruction computes the square root of source and saves the result to the Destination.
(It supports only in XP and PLC-S CPU series)
| |
S | Source |
D | Destination |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. |
| Error | Zero | Carry | ||
SQR SQRP | S | o | o | o | o | o | - | - | - | - | o | o | o | - | 3 | o | - | - |
D | o | - | o | o | o | - | - | - | - | o | o | o | - |
When enabled, the SQR instruction calculates the square root of source and saves the result in Destination.
The source must be greater than zero
Example)
If M00 is ON, the FLT instruction converts D100 to float value and saves its result to D90.
The SQR instruction calculates the square root of D90 and saves its result in D80.