天大自动化计控试验一

发布时间:2017-05-06 05:21:03   来源:文档文库   
字号:

试验一

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》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档

文档为doc格式