试验一
1. 模版程序
2.框架程序
代码Sub MyDeviceOpen()
ErrCde=DRV_DeviceOpen(0,DeviceHandle)
Call PCI_1711ErrorTest
End Sub
Sub MyOperation(intInput As Integer,intOutput As Integer)
lpDioReadPort.Port=intInput
lpDioReadPort.value=DRV_GetAddress(DiValue)
ErrCde=DRV_DioReadPortByte(DeviceHandle,lpDioReadPort)
Call PCI_1711ErrorTest
Call UpdateLed(DiValue)
lpDioWritePort.Port=intOutput
lpDioWritePort.Mask=255
lpDioWritePort.state=DiValue
ErrCde=DRV_DioWritePortByte(DeviceHandle,lpDioWritePort)
Call PCI_1711ErrorTest
Sub MyDeviceClose()
ErrCde=DRV_DeviceClose(DeviceHandle)
Call PCI_1711ErrorTest
End Sub
本文来源:https://www.2haoxitong.net/k/doc/4920070a16fc700abb68fc26.html
文档为doc格式