ID : 170
CurExJ
Function
To return the current angle of specified axis.
Syntax
CurExJ(axis number)
Guaranteed entry
- Axis number
- Designate an axis number by Integer Type data within the range of 1 to 8.
Return value
Return the current angle of specified axis by single precision real number type data. Return 0 when designating unavailable axis number.
Description
The angle detected by the encoder of specified extended-joint is returned by axis number. When the specified extended-joint has already been operating, return the value at executing this statement.
During Machine Lock, return not an angle value detected by encoder, but command position.
Related Terms
-
Attention
-
Example
'!TITLE "Acquiring Current Designated Axis Angle"
' Acquire current angle of an axis and display it on message output window
Sub Sample_CurExJ
Dim aaa As Integer
' Assign the current angle of axis 1 to aaa
aaa = CurExJ( 1 )
' Display the current angle of axis 1 on the message output window
PrintDbg aaa
End Sub
ID : 170