📄 module1.bas
字号:
ByVal cardNO As Long, _
ByVal groupNO As Long, _
ByVal chNO As Long, _
ByVal nState As Long) As Long
Public Declare Function ZT8361_DOAll Lib "pci8361.dll" ( _
ByVal cardNO As Long, _
ByVal groupNO As Long, _
ByVal nStateAll As Long) As Long
'PS调理板控制部分
'Public Declare Function ZT8361_PSDIBit Lib "pci8361.dll" (ByVal cardNO As Long, _
' ByVal chNO As Long) As Long
'Public Declare Function ZT8361_PSDIAll Lib "pci8361.dll" (ByVal cardNO As Long) As Long
'Public Declare Function ZT8361_PSDOBit Lib "pci8361.dll" (ByVal cardNO As Long, _
' ByVal chNO As Long, _
' ByVal nState As Long) As Long
'Public Declare Function ZT8361_PSDOAll Lib "pci8361.dll" (ByVal cardNO As Long, ByVal nStateAll As Long) As Long
'计数器部分
Public Declare Function ZT8361_CTStart Lib "pci8361.dll" (ByVal cardNO As Long, _
ByVal chNO As Long, _
ByVal CTMode As Long, _
ByVal CTinitVal As Long) As Long
Public Declare Function ZT8361_CTRead Lib "pci8361.dll" (ByVal cardNO As Long, _
ByVal chNO As Long, _
ByVal lockBeforeRead As Long) As Long
Public Declare Function ZT8361_CTStop Lib "pci8361.dll" (ByVal cardNO As Long, _
ByVal chNO As Long, _
ByVal CTMode As Long) As Long
Public Declare Function ZT8361_InitIRQ Lib "pci8361.dll" (ByVal cardNO As Long, _
ByVal irqSource As Long) As Long
Public Declare Function ZT8361_SetAIresultTrans Lib "pci8361.dll" ( _
ByVal cardNO As Long, _
ByRef pNeedTrans As Long, _
ByRef pMeasureDown As Single, _
ByRef pMeasureUp As Single, _
ByRef pEngiDown As Single, _
ByRef pEngiUp As Single, _
ByRef pReviseK As Single, _
ByRef pReviseB As Single) As Long
Public Declare Function ZT8361_GetAIresultTrans Lib "pci8361.dll" ( _
ByVal cardNO As Long, _
ByRef pNeedTrans As Long, _
ByRef pMeasureDown As Single, _
ByRef pMeasureUp As Single, _
ByRef pEngiDown As Single, _
ByRef pEngiUp As Single, _
ByRef pReviseK As Single, _
ByRef pReviseB As Single) As Long
Public Declare Function ZT8361_Rom_ReadFloat Lib "pci8361.dll" ( _
ByVal cardNO As Long, _
ByVal romAddr As Long, _
ByRef pInVal As Single) As Long
Public Declare Function ZT8361_Rom_WriteFloat Lib "pci8361.dll" ( _
ByVal cardNO As Long, _
ByVal romAddr As Long, _
ByVal outVal As Single) As Long
Public Declare Function ZT8361_RomReadBytes Lib "pci8361.dll" ( _
ByVal cardNO As Long, _
ByVal romAddr As Long, _
ByRef pBuf As Any, _
ByVal wantReadBytesCnt As Long) As Long
Public Declare Function ZT8361_RomWriteBytes Lib "pci8361.dll" ( _
ByVal cardNO As Long, _
ByVal romAddr As Long, _
ByRef pBuf As Any, _
ByVal wantWriteBytesCnt As Long) As Long
Public Declare Function ZT8361_WaitWriteFinish Lib "pci8361.dll" ( _
ByVal cardNO As Long, _
ByVal us As Long) As Long
Public Declare Function ZT8361_Rom_WriteB Lib "pci8361.dll" ( _
ByVal cardNO As Long, _
ByVal romAddr As Long, _
ByVal outByte As Long) As Long
Public Declare Function ZT8361_Rom_ReadB Lib "pci8361.dll" ( _
ByVal cardNO As Long, _
ByVal romAddr As Long) As Long
'高级计数器函数
Public Declare Function ZT8361_Adv_CTinit Lib "pci8361.dll" (ByVal cardNO As Long, _
ByVal chNO As Long, _
ByVal CTUse As Long, _
ByVal CTMode As Long, _
ByVal CTinitVal As Long, _
ByVal inClock As Long, _
ByVal outClock As Long, _
ByVal belongtoIrqChMask As Long, _
ByVal UpdatePerNirq As Long) As Long
Public Declare Function ZT8361_Adv_CTstart Lib "pci8361.dll" (ByVal cardNO As Long, _
ByVal allChMask As Long, _
ByVal chNO As Long) As Long
Public Declare Function ZT8361_Adv_CTread Lib "pci8361.dll" (ByVal cardNO As Long, _
ByRef pChNO As Long, _
ByRef pResultArr As Double, _
ByVal chCount As Long, _
ByVal readMode As Long) As Long
'建议用枚举类型指定AD量程或DA输出范围,可增加程序的可读性
Public Enum AI
'AI方式
Range_initCode = 0 '原码方式
Range_0__5000mV = 1
Range_0__10000mV = 2
'Range_1000__5000mV = 3
'Range_N2500__P2500mV = 4
Range_N5000__P5000mV = 5
Range_N10000__P10000mV = 6
Range_0__4000mV = 7
Range_N3330__P3330mV = 8
Range_0__10000uA = 9
Range_0__20000uA = 10
Range_4000__20000uA = 11
End Enum
Public Enum AO
'AO方式
Range_initCode = 0 '原码方式
Range_0__5000mV = 1
'Range_0__10000mV = 2
'Range_1000__5000mV = 3
'Range_N2500__P2500mV = 4
'Range_N5000__P5000mV = 5
Range_N10000__P10000mV = 6
'Range_0__2500mV = 7
'Range_0__10000uA = 8
'Range_4000__20000uA = 9
End Enum
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -