The SQRT/SQRTP instructions both calculate the square root. When the SQRT instruction is executed, the square root of S1 is calculated and the value is saved in D1.
The SQRT/SQRTP instructions always pass power. If the variables designated in operands S1 and D1 are not the same type, an error will occur when using the SQRT/SQRTP instructions. Designate the same variable type in all operands S1 and D1.
Refer to the following for specifying a constant.
When operand D1 is a float variable
When 0f (zero and lower case "f") is input, the following values are interpreted as float values.
When operand D1 is a real variable
When 0r (zero and lower case "r") is input, the following values are interpreted as real values.
When calculating data in a specified array
Specify the array using Data [0] or Data [N] (N indicates an integer variable).
When operands S1 and D1 specify the entire array, an error will occur even if the specified variables are the same type.
Confirming Execution Results
The instruction will not execute if the value in operand S1 (infinite or non-numeric value) cannot be recognized.
The error code (6706) is written to #L_CalcErrCode.
The result in D1 maintains the value from the previous successfully run instruction.