User`s manual
http://www.adtechcn.com 67
'******************************************************************************
***
Public Function Setup_Speed(ByVal axis As Integer, ByVal startv As Long, ByVal speed As Long,
ByVal add As Long) As Integer
If (startv - speed >= 0) Then
Result = adt8840a_set_startv(devnum, 0, axis, startv)
adt8840a_set_speed devnum, 0, axis, startv
Else
Result = adt8840a_set_startv(devnum, 0, axis, startv)
adt8840a_set_speed devnum, 0, axis, speed
adt8840a_set_acc devnum, 0, axis, add
End If
End Function
'*********************single-axis function*******************
'This function is used for driving the single axis
'Parameters: axis- axis number; pulse- number of output pulse
' Return value=0: correct; return value=1: error
'*******************************************************
Public Function Axis_Pmove(ByVal axis As Integer, ByVal pulse As Long) As Integer
Result = adt8840a_pmove(devnum, 0, axis, pulse)
Axis_Pmove = Rresult
End Function
'****************************function for continuous drive***************************
'This function is used to drive a single continuous-motion axis
'Parameters: axis-axis number; value-output direction
'Value-0: positive direction; 1: negative direction
'Return value=0: correct; return value=1: error
'*******************************************************************
Public Function Axis_Cmove(ByVal axis As Integer, ByVal value As Long) As Integer
Result = adt8840a_continue_move(devnum, 0, axis, value)
Axis_Cmove = Result
End Function
'*******************function for interpolation of any two axes********************
'This function is used to drive any two axes for interpolation