运行程序后, 提示错误 为 byref函数类型不符合。 提示停留在 ibrd 命令 那行, 请哪位高手指教下啊, ibrd中使用数组存贮, 可以吗? 可以的话怎么修改程序啊。
程序如下:
Dim reply As String
Dim dummy(5000) As Byte
Dim tek370aid As Integer
tek370aid = Init370
Call ibrd(tek370aid, dummy, 5000)
'/// init370 函数定义如下///////
Function Init370()
Dim iDeviceNumber As Integer
'get device address from worksheet
iDeviceNumber = Worksheets("Sheet1").Range("device_address").value
'get unit descriptors
Call ibfind("GPIB0", udGPIB0)
Call ibsic(udGPIB0)
Call ibdev(0, iDeviceNumber, 0, 11, 1, 0, udDevice)
Call ibask(udGPIB0, IbaPAD, 0)
Call ibask(udDevice, IbaBNA, 0)
Call ibask(udGPIB0, IbaPAD, 0)
'get system control by sending interface clear
'set remote enable as required by some devices
'Call ibsre(udGPIB0, 1) 'set or clear the remote enable line
Call ibconfig(0, IbcAUTOPOLL, 1)
Call ibconfig(0, IbcEOSrd, 0)
SendIFC (0)
Call ibeot(udDevice, 1)
Call ibtmo(udDevice, T3s)
Init370 = udDevice
End Function