Delta AH500 Programming Manual page 516

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

AH 5 00 Pr ogr am m ing Ma n ua l
API
Instruction code
1518
D
BSQR
Device X
Y
M
S
D
Symbol:
Explanation:
1.
After the square root of the value in the device specified by S is calculated, the integer part is
stored in the device specified by D, and the fractional part is stored in the device specified by
D+1.
2.
The 16-bit value in S should be within the range between 0 and 9,999, and the 32-bit value in
S should be within the range between 0 and 99,999,999.
3.
If the instruction BSQR is used, the square root is rounded down to the fourth decimal place.
4.
If the instruction DBSQR is used, the square root is rounded down to the eighth decimal place.
5.
If the operation result stored in D is 0, SM600 is ON.
Example 1:
After the square root of the value in D0 is calculated, the integer part is stored in Y0, and the
fractional part is stored in Y1.
16#1234
Example 2:
After the square root of the value in D0 is calculated, the integer part is stored in Y0, and the
fractional part is stored in Y1.
6 - 3 4 8
Operand
P
S, D
S
T
C
HC
D
Pulse instruction 16-bit instruction (5 steps) 32-bit instruction (5 steps)
AH500
S : Source device
D : Device in which the result is stored
1
2 BSQ R
MOV
D0
1 2
3
4
Binary -coded
decimal value
Square root of the binary-coded
decimal number
L
SM SR
E
PR
AH500
Word/Double word
Word/Double word
Y0
Integer part
0
0
3
5
Binary -coded
decimal value
Y1
F ractional part
1 2
8
3
Binary -coded
decimal value
Function
K
16# "$"
DF
AH500

Advertisement

Table of Contents
loading

Table of Contents