Delta Electronics AH500 Manual page 194

Motion control module
Hide thumbs Also See for AH500:
Table of Contents

Advertisement

API
Instruction code
116
D
RAD
Device
X
Y
M
S
D
E xp la nat io n
E xa mple
A dditio nal
re mark
5 - 7 9
Operand
P
S, D
S
K
16#
F
Pulse instruction 16-bit instruction 32-bit instruction (6 steps)
S: Source (degree); D: Conversion result (radian)
The equation below is used to convert a degree into a radian.
Radian=Degree×(π/180)
If the absolute value of a conversion result is greater than the maximum
floating-point value available, a carry flag will be ON.
If the absolute value of a conversion reuslt is less than the minimum
floating-point value available, a borrow flag will be ON.
If a converseion 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.
SM1065 is the borrow flag in an Ox motion subroutine, and SM969 is the
borrow flag in O100.
SM1066 is the carry flag in an Ox motion subroutine, and SM970 is the
carry flag in O100.
When X0.0 is ON, the degree in (D1, D0) is converted into a radian, and
the conversion result is stored in (D11, D10). The radian in (D11, D10) is
a floating-point number.
X0.0
D 1
S
D 11
D
Please refer to section 5.3 for more information about performing
operations on floating-point numbers.
Ch ap te r 5 Ap plie d Instruc tions
Converting a degree to
a radian
KnM KnS
D
W
DRAD
D0
D10
Degree
D 0
Binary floating- point number
Radian (Degree
X
D 10
Binary floating- point number
Function
T
C
V
Z
/
180)

Advertisement

Table of Contents
loading

Table of Contents