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

📄 vbib-32.bas

📁 广泛用于示波器上的gpig工业标准接口的计算机编成库
💻 BAS
📖 第 1 页 / 共 4 页
字号:
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)

'  Call the 32-bit DLL.
    rc& = ibdiag32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)

    ildiag% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ildma(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibdma32(ByVal tmpUD&, ByVal tmpv&)

    ildma% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ileos(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibeos32(ByVal tmpUD&, ByVal tmpv&)

    ileos% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ileot(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibeot32(ByVal tmpUD&, ByVal tmpv&)

    ileot% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ilevent(ud%, eevent%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
 
'  Call the 32-bit DLL.
    rc& = ibevent32(ByVal tmpUD&, tmpv&)
    
    ilevent% = ConvertLongToInt(rc&)
    eevent% = ConvertLongToInt(tmpv&)

    Call copy_ibvars
End Function

Function ilfind(udname$) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Call the 32-bit DLL.
    rc& = ibfind32(ByVal udname$)
    
    ilfind% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function ilgts(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If
    
' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibgts32(ByVal tmpUD&, ByVal tmpv&)

    ilgts% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function ilist(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibist32(ByVal tmpUD&, ByVal tmpv&)

    ilist% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function illines(ud%, lines%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)

'  Call the 32-bit DLL.
    rc& = iblines32(ByVal tmpUD&, tmplines&)

    illines% = ConvertLongToInt(rc&)
    lines% = ConvertLongToInt(tmplines&)
    
    Call copy_ibvars
End Function

Function illn(ud%, pad%, sad%, ln%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmppad& = CLng(pad%)
    tmpsad& = CLng(sad%)

'  Call the 32-bit DLL.
    rc& = ibln32(ByVal tmpUD&, ByVal tmppad&, ByVal tmpsad&, tmpln&)

    illn% = ConvertLongToInt(rc&)
    ln% = ConvertLongToInt(tmpln&)

    Call copy_ibvars
End Function

Function illoc(ud%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)

'  Call the 32-bit DLL.
    rc& = ibloc32(ByVal tmpUD&)

    illoc% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function ilonl(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameters into Longs.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

' Call the 32-bit DLL.
    rc& = ibonl32(ByVal tmpUD&, ByVal tmpv&)

    ilonl% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function ilpad(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibpad32(ByVal tmpUD&, ByVal tmpv&)

    ilpad% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function ilpct(ud%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)

'  Call the 32-bit DLL.
    rc& = ibpct32(ByVal tmpUD&)

    ilpct% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function ilpoke(bdid%, opt%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(bdid%)
    tmpopt& = CLng(opt%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibpoke32(ByVal tmpUD&, ByVal tmpopt&, ByVal tmpv&)

    ilpoke% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ilppc(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibppc32(ByVal tmpUD&, ByVal tmpv&)

' Convert Long into Integer.
    ilppc% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function ilrd(ud%, buf$, cnt&) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If
    
' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)
    
' Call the 32-bit DLL.
    rc& = ibrd32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)

    ilrd% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function ilrda(ud%, buf$, cnt&) As Integer
' If buf$ has not been pre-dimensioned, do it here
' and make the buf$ string as big as the cnt&.
  If (Len(buf$) = 0) Then
    buf = Space$(cnt&)
  End If

' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If
    
' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)
    
' Convert Unicode string into ANSI string. This
' prevents Visual Basic from remapping the buffer.
    bytebuf = StrConv(buf$, vbFromUnicode)

' Call the 32-bit DLL. Pass it the ANSI string.
    rc& = ibrda32(ByVal tmpUD&, bytebuf(0), ByVal cnt&)
    
    ilrda% = ConvertLongToInt(rc&)

    Call copy_ibvars
    
'    buf$ = StrConv(bytebuf, vbUnicode)
    
End Function

Function ilrdf(ud%, filename$) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)

' Call the 32-bit DLL.
    rc& = ibrdf32(ByVal tmpUD&, ByVal filename$)

    ilrdf% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

'Function ilrdi(ud%, ibuf%(), cnt&) As Integer
Function ilrdi(ud%, lbuf&(), cnt&) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)

' Call the 32-bit DLL.
'    rc& = ibrd32(ByVal tmpUD&, ibuf%(0), ByVal cnt&)
    rc& = ibrd32(ByVal tmpUD&, lbuf&(1), ByVal cnt&)

    ilrdi% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ilrdia(ud%, ibuf%(), cnt&) As Integer
 
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)

' Call the 32-bit DLL.
    rc& = ibrda32(ByVal tmpUD&, ibuf%(0), ByVal cnt&)

    ilrdia% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ilrdkey(ud%, buf$, cnt&) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)

' Call the 32-bit DLL.
    rc& = ibrdkey32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)

    ilrdkey% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function ilrpp(ud%, ppr%) As Integer
    Static tmp_str As String * 2
    
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If
    
' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)

' Call the 32-bit DLL.
    rc& = ibrpp32(tmpUD&, ByVal tmp_str$)

    ilrpp% = ConvertLongToInt(rc&)
    ppr% = Asc(tmp_str$)
    
    Call copy_ibvars
End Function

Function ilrsc(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibrsc32(ByVal tmpUD&, ByVal tmpv&)

    ilrsc% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function ilrsp(ud%, spr%) As Integer
    Static tmp_str As String * 2
    
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If
    
' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)
    
' Call the 32-bit DLL
    rc& = ibrsp32(ByVal tmpUD&, ByVal tmp_str$)
    
    ilrsp% = ConvertLongToInt(rc&)
    spr% = Asc(tmp_str$)
    
    Call copy_ibvars
End Function

Function ilrsv(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibrsv32(ByVal tmpUD&, ByVal tmpv&)

    ilrsv% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ilsad(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibsad32(ByVal tmpUD&, ByVal tmpv&)

    ilsad% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ilsic(ud%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)

'  Call the 32-bit DLL.
    rc& = ibsic32(ByVal tmpUD&)

    ilsic% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ilsre(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibsre32(ByVal tmpUD&, ByVal tmpv&)

    ilsre% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function ilstop(ud%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)

'  Call the 32-bit DLL.
    rc& = ibstop32(ByVal tmpUD&)

    ilstop% = ConvertLongToInt(rc&)

    Call copy_ibvars
End Function

Function iltmo(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If

' Convert Integer parameter to Long.
    tmpUD& = CLng(ud%)
    tmpv& = CLng(v%)

'  Call the 32-bit DLL.
    rc& = ibtmo32(ByVal tmpUD&, ByVal tmpv&)

    iltmo% = ConvertLongToInt(rc&)
    
    Call copy_ibvars
End Function

Function iltrg(ud%) As Integer
' Check to see if GPIB Global variables are registered
    If (GPIBglobalsRegistered = 0) Then
      Call RegisterGPIBGlobals
    End If
    
' Convert Integer parameter into Long.
    tmpUD& = CLng(ud%)
    
' Call 32-bit DLL.
    rc& = ibtrg32(ByVal tmpUD&)
    
    iltrg% = ConvertLongToInt(rc&)

⌨️ 快捷键说明

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