User`s manual
http://www.adtechcn.com 71
'This function is used to set the work mode of pulse
'Parameters: axis-axis number; value-pulse’s work mode: 0: pulse+pulse mode; 1:
pulse+direction mode
'Return value=0: correct; return value=1: error
'Default pulse’s work mode: pulse+direction mode
'This program employs the positive logic pulse and positive logic for direction output signals,
which are the default values
'******************************************************************************
Public Function Setup_PulseMode(ByVal axis As Integer, ByVal value As Integer) As Integer
Setup_PulseMode = adt8840a_set_pulse_mode(devnum, 0, axis, value, 0, 0)
End Function
'*****************************set limit signal mode******************************
'This function is used to set the mode of limit-inputting nLMT from positive/negative direction
'Parameters: axis-axis number
' Value1: 0—positive limit enabled; 1—positive limit disabled
' Value2: 0—negative limit enabled; 1—negative limit disabled
' Logic: 0—low level enabled; 1—high level enabled
'Default values: positive limit enabled, negative limit enabled, low level enabled
'Return value=0: correct; return value=1: error
'***************************************************************************
Public Function Setup_LimitMode(ByVal axis As Integer, ByVal value1 As Integer, ByVal value2
As Integer, ByVal logic As Integer) As Integer
Setup_LimitMode = adt8840a_set_limit_mode(devnum, 0, axis, value1, value2, logic)
End Function
'********************set mode of stop0 signal *********************
'This function is used to set the mode of stop0 signal
'Parameters: axis-axis number
' Value: 0—disabled; 1—enabled
' Logic: 0—low level enabled; 1—high level enabled
'Default values: disabled
'Return value=0: correct; return value=1: error
'************************************************************
Public Function Setup_Stop0Mode(ByVal axis As Integer, ByVal value As Integer, ByVal logic As
Integer) As Integer
Setup_Stop0Mode = adt8840a_set_stop0_mode(devnum, 0, axis, value, logic)
End Function