User`s manual
http://www.adtechcn.com 70
'*******************function for getting to know the motion status********************
'This function is used to get to know the drive status and interpolation status of each axis
' Parameters: axis-axis number; value-status (0-drive end; non-0: drive under way)
' Mode 0-get to know the drive status of single axis; non-0: get to know the drive
status of interpolation
'Return value=0: correct; return value=1: error
'*******************************************************
Public Function Get_MoveStatus(ByVal axis As Integer, value As Long, ByVal mode As Integer)
As Integer
If mode = 0 Then
GetMove_Status = adt8840a_get_status(devnum, axis, value)
Else
GetMove_Status = adt8840a_get_inp_status(devnum, value)
End If
End Function
'***********************read input point*******************************
'This function is used to read the single input point
'Parameters: number-input point (0 ~ 49)
'Return value: 0: low level; 1: high level; -1: error
'****************************************************************
Public Function Read_Input(ByVal number As Integer, value As Integer) As Integer
Read_Input = adt8840a_read_bit(devnum, number, value)
End Function
'*************** function for outputting single-point signal ***************
'This function is used to output single point single
'Parameters: number-output point (0~21)
'Value: 0: low level; 1: high level
'Return value=0: correct; return value=1: error
'****************************************************************
Public Function Write_Output(ByVal number As Integer, ByVal value As Integer) As Integer
Write_Output = adt8840a_write_bit(devnum, 0, number, value)
End Function
'*****************************set pulse output mode *******************************