AH500 Motion Control Module Manual S : Source device; D : Device in which a result is stored The square root of the binary floating-point value in S is calculated, and the result is stored in D . If S is a floating-point value, the instruction will be used to calculate the floating-point value. If an operation result is 0, a zero flag will be ON. SM1064 is the zero flag in an Ox motion subroutine, and SM968 is the zero flag in O100. SM1049 is the operation error flag in an Ox motion subroutine, and SM953 is the operation error flag in O100.
If the value in S is not a positive value, an operation error will occur, the instruciton will not be executed, an operation error flag will be ON, and the error code 16#0E19 will appear. Explanation When X0.0 is ON, the square root of the binary floating-point value in (D1, D0) is calculated, and the result is stored in (D11, D10). Example 1 X0.0 (D1, D0) (D11, D10) Binary floating-point number Binary floating-point number Example 2 When X0.2 is ON, the square root of F1234.0 is calculated, and the result is stored in (D11, D10). X0.2 Additional remark Please refer to section 5.3 for more information about performing operations on floating-point numbers.
5-90 API Instruction code Operand Function S, D Square root of a binary 127 D ESQR P floating-point number Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S D Pulse instruction 16-bit instruction 32-bit instruction (6 steps) – DESQR D0 D10 DESQR F1234.0 D10