global.bas
来自「16 relay output channels and 16 isolated」· BAS 代码 · 共 45 行
BAS
45 行
Attribute VB_Name = "Global"
Option Explicit
Global Const giMaxEntries = 255
Type utDeviceParameter 'device parameter
lDeviceNum As Long 'device number
lScanChannel As Long
lConvNum As Long
lPacerRate As Long
lStartPoint As Long
lStopPoint As Long
lGainCode As Long
iTrigger As Integer '1 for external, 0 for internal trigger
iCyclicMode As Integer '1 for Cyclic, 0 for NonCyclic mode
iDataType As Integer '1 for Voltage, 0 for raw data
bEvenEnable As Integer '1 for Enable, 0 for disable Event
End Type
Global gDevPar As utDeviceParameter
Global devicelist(0 To giMaxEntries) As PT_DEVLIST
Global DeviceHandle As Long
Global gFAITransfer As PT_FAITransfer
Global ErrCde As Long
Global gDMABuffer As Long 'address of DMA bufer
Global gTmpBuf() As Integer 'for raw data
Global gTmpVolBuf() As Single 'for voltage data
Global bThreadLoop As Boolean 'true for thread to run
Global bThreadFlag As Boolean
Public Function ChkErr(ByVal lErrCde As Long) As Long
Dim Response As Integer
Dim szErrMsg As String * 40
If lErrCde <> 0 Then
DRV_GetErrorMessage lErrCde, szErrMsg
Response = MsgBox(szErrMsg, vbOKOnly Or vbInformation, "Error!!")
ChkErr = 1
Else
ChkErr = 0
End If
End Function
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?