User`s manual

http://www.adtechcn.com 69
Public Function StopRun(ByVal axis As Integer, ByVal mode As Integer) As Integer
If mode = 0 Then
Result = adt8840a_sudden_stop(devnum, axis)
Else
Result = adt8840a_dec_stop(devnum, axis)
End If
End Function
'*******************function for position setting********************
'This function is used to set the logic position and actual position
' Parameters: axis-axis number; pos-position value
' Mode 0: set logic position; 1: set actual position
'Return value=0: correct; return value=1: error
'*************************************************************
Public Function Setup_Pos(ByVal axis As Integer, ByVal pos As Long, ByVal mode As Integer)
As Integer
If mode = 0 Then
Result = adt8840a_set_command_pos(devnum, 0, axis, pos)
Else
Result = adt8840a_set_actual_pos(devnum, 0, axis, pos)
End If
End Function
'*******************get current information on motion********************
'This function is used to get the current information on logic position, actual
position and running speed
' Parameters: axis-axis number; logps-ligic position
' Actpos-actual position; speed-running speed
'Return value=0: correct; return value=1: error
'*******************************************************************
Public Function Get_CurrentInf(ByVal axis As Integer, LogPos As Long, actpos As Long, speed
As Long) As Integer
Result = adt8840a_get_command_pos(devnum, axis, LogPos)
adt8840a_get_actual_pos devnum, axis, actpos
adt8840a_get_speed devnum, axis, speed
Get_CurrentInf = Result
End Function