求助各位大虾,用vb编写上位界面,除了编写以下程序外,还需要做什么?
第一步:申明dll
Declare Function OpenPmacDevice Lib "pmac.dll" (ByVal pmac As Long) As Long
Declare Function ClosePmacDevice Lib "pmac.dll" (ByVal pmac As Long) As Long
Declare Function PmacGetResponseA Lib "pmac.dll" (ByVal pmac As Long, ByVal response$, ByVal dummy As Integer, ByVal com_string$) As Long
第二步:连接Pmac
m_bDriverOpen = 0
'connect device
'The PMAC device number is 0 for the first PMAC in your system, 1 for
'the second and so on.
m_dwDevice = 0
m_bDriverOpen = OpenPmacDevice(m_dwDevice)
……
第三步:y轴正转
Dim response As String * 2
Call PmacGetResponseA(0, response, 2, "#2j+")
第四步:断开链接
Call ClosePmacDevice(0)