大学精品课件:VB接口方法举例.doc
- 【下载声明】
1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
3. 本页资料《大学精品课件:VB接口方法举例.doc》由用户(金钥匙文档)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 大学 精品 课件 VB 接口 方法 举例
- 资源描述:
-
1、11.211.2 VBVB 接口方法举例接口方法举例 参照提供的 VB 程序源码,在Product_PCI6011 Samples SourceVB6011 用户编程时,在程序中包含接口说明文件 PCI6011.BAS。在其中定义了 VB 调用 的接口,说明如下: AD 控制接口数据结构说明 Public Type AD6011_WINCTRL_STRUCT m_ADType As Integer m_StartType As Integer m_StartChn As Integer m_EndChn As Integer m_IETFlag As Integer m_Timer0Val A
2、s Integer m_Timer1Val As Integer m_Timer2Val As Integer m_ClkSrc As Integer m_BufferBlock As Integer m_TransFlag As Byte m_hWnd As Long End Type API 接口函数说明 Public Declare Function Pci6011_IsOpen Lib “PCI6011dll.dll“ _ (ByVal mDev As Long) As Boolean Public Declare Function Pci6011_Open Lib “PCI6011d
3、ll.dll“ _ (ByVal mDev As Long) As Boolean Public Declare Function Pci6011_Close Lib “PCI6011dll.dll“ _ (ByVal mDev As Long) As Boolean Public Declare Function Pci6011_GetVersion Lib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByVal sVersion As String) As Boolean Public Declare Function Pci6011_WriteIO L
4、ib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByVal mVal As Integer) As Boolean Public Declare Function Pci6011_ReadIO Lib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByRef mVal As Integer) As Boolean Public Declare Function Pci6011_InitTimer2 Lib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByVal mType As Inte
5、ger, ByVal mVal As Integer, _ ByVal mIntFlag As Boolean, ByVal mWnd As Long) As Boolean Public Declare Function Pci6011_StartTimer2 Lib “PCI6011dll.dll“ _ (ByVal mDev As Long) As Boolean Public Declare Function Pci6011_ReadTimer2 Lib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByRef mVal As Integer) As
6、Boolean Public Declare Function Pci6011_StopTimer2 Lib “PCI6011dll.dll“ _ (ByVal mDev As Long) As Boolean Public Declare Function Pci6011_SoftADSetChn Lib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByVal mChn As Long) As Boolean Public Declare Function Pci6011_SoftADStart Lib “PCI6011dll.dll“ _ (ByVal
7、mDev As Long) As Boolean Public Declare Function Pci6011_SoftADRead Lib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByRef mVal As Integer) As Boolean Public Declare Function Pci6011_SoftADGetVal Lib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByVal mChn As Long, ByRef mVal As Integer) As Boolean public Decl
8、are Function Pci6011_ADCtrlEx Lib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByRef pCtrlStru As AD6011_CTRL_STRUCT)As Boolean public Declare Function Pci6011_ADCtrl Lib “PCI6011dll.dll“ _ (ByVal mDev As Long,ByRef pCtrlStru As AD6011_WINCTRL_STRUCT)As Boolean Public Declare Function Pci6011_ReadADBuffe
9、r Lib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByRef mVal As Integer, ByVal mDataLength As Long) As Long Public Declare Function Pci6011_StopAD Lib “PCI6011dll.dll“ _ (ByVal mDev As Long) As Boolean Public Declare Function Pci6011_StartAD Lib “PCI6011dll.dll“ _ (ByVal mDev As Long) As Boolean Public
10、Declare Function Pci6011_DAout Lib “PCI6011dll.dll“ _ (ByVal mDev As Long, ByVal mChn As Integer, ByVal mVal As Integer) As Boolean 使用 VB 编程时,中断事件通过提供的 PCI6011OCX 控件,来实现。一个控件对应一个中断 源,设置接收控件窗口来确定事件的发生,举例如下: 初始化设备 0 的定时器中断,m_Ocx1 为控制控件对象 Pci6011_InitTimer2(0,2,2000,1, m_Ocx1.mhWnd) 初始化设备 0 的采集中断,m_Ocx
展开阅读全文