⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 global.bas

📁 16 relay output channels and 16 isolated digital input channels LED indicators to show activated
💻 BAS
字号:
Attribute VB_Name = "Module2"
Option Explicit
Const MaxEntries = 255
Global DeviceHandle As Long
Global ptDevGetFeatures As PT_DeviceGetFeatures
Global lpDevFeatures As DEVFEATURES
Global devicelist(0 To MaxEntries) As PT_DEVLIST
Global SubDevicelist(0 To MaxEntries) As PT_DEVLIST
Global ErrCde As Long
Global szErrMsg As String * 80
Global lpAIConfig As PT_AIConfig
Global ptAIGetConfig As PT_AIGetConfig
Global lpDEVCONFIG_AI As DEVCONFIG_AI
Global AiCtrMode As Integer
Global wGainCode(0 To 15) As Integer
Global iGainIndex(0 To 15) As Integer
Global Response As Integer

Global hbuf() As Single
Global userbuf() As Single                'for voltage data
Global userRawbuf() As Integer            'for raw data

Global ptFAIIntStart  As PT_FAIIntStart     ' FAIIntStart table
Global ptFAITransfer    As PT_FAITransfer     ' FAITransfer table

Global ptEnableEvent As PT_EnableEvent          ' Enable event
Global szbuffer As String * 80

 'used for fixed memory for the installed devices
Global bRun  As Boolean                 ' flag for running
Global gwGain(16) As Integer

Global dwDeviceNum As Long

 Global gdwPacerRate As Long              ' pacer rate
Global gulConvNum  As Long               ' conversion number
Global gwStartChl As Integer          'scan channels
Global gwDataType As Integer                  ' display type : FLOAT(1)
Global gwEvtFlag As Integer                      'event enable(0)
Global gwFifoEnable As Integer                   ' Fifo
Global gwFifoSize As Integer           'Fifo Size

Global gwGainList As Integer               'gain list flag
Global gwGainCode As Integer                'gaincode
Global gwExtTrig   As Integer                'external or internal trigger

Global gwCyclicMode   As Integer      ' cyclic or non-cyclic mode
Global gwBufferMode  As Integer         'buffer: single or double
Global gwIntrCount As Integer
Global gwCyclicCount As Integer      'umber of cyclic count

Global gwActiveBuf As Integer           ' return by FAICheck
Global gwOverrun   As Integer        'return by FAICheck, FAITransfer
Global gwStopped     As Integer    ' return by FAICheck
Global gulRetrieved   As Long    'return by FAICheck
Global gwHalfReady As Integer     'return by FAICheck

Public Function ChkErr(ByVal lErrCde As Long) As Long
    If (lErrCde <> 0) Then
        DRV_GetErrorMessage lErrCde, szErrMsg
        Response = MsgBox(szErrMsg, vbOKOnly, "Error!!")
        ChkErr = 1
    Else
        ChkErr = 0
    End If
End Function


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -