📄 vbib-32.bas
字号:
' Convert Integer parameter into Long.
tmpUD& = CLng(ud%)
' Call the 32-bit DLL.
rc& = ibpct32(ByVal tmpUD&)
Call copy_ibvars
End Sub
Sub ibpoke(bdid%, opt%, v%)
' 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&)
Call copy_ibvars
End Sub
Sub ibppc(ud%, v%)
' 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&)
Call copy_ibvars
End Sub
Sub ibrd(ud%, buf$)
' 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%)
cnt& = CLng(Len(buf$))
' Call the 32-bit DLL.
rc& = ibrd32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)
Call copy_ibvars
End Sub
Sub ibrda(ud%, buf$)
' 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%)
cnt& = CLng(Len(buf$))
' Call the 32-bit DLL.
rc& = ibrd32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)
' When Visual Basic remapping buffer problem solved, use this:
' rc& = ibrda32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)
Call copy_ibvars
End Sub
Sub ibrdf(ud%, filename$)
' 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$)
Call copy_ibvars
End Sub
Sub ibrdi(ud%, ibuf%(), cnt&)
' 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&)
Call copy_ibvars
End Sub
Sub ibrdia(ud%, ibuf%(), cnt&)
' 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&)
' When Visual Basic remapping buffer problem is solved, then use:
' rc& = ibrda32(ByVal tmpUD&, ibuf%(0), ByVal cnt&)
Call copy_ibvars
End Sub
Sub ibrdkey(ud%, buf$)
' 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%)
cnt& = CLng(Len(buf$))
' Call the 32-bit DLL.
rc& = ibrdkey32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)
Call copy_ibvars
End Sub
Sub ibrpp(ud%, ppr%)
' Check to see if GPIB Global variables are registered
If (GPIBglobalsRegistered = 0) Then
Call RegisterGPIBGlobals
End If
Static tmp_str As String * 2
' Convert Integer parameter into Long.
tmpUD& = CLng(ud%)
' Call the 32-bit DLL.
rc& = ibrpp32(tmpUD&, ByVal tmp_str$)
ppr% = Asc(tmp_str$)
Call copy_ibvars
End Sub
Sub ibrsc(ud%, v%)
' 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&)
Call copy_ibvars
End Sub
Sub ibrsp(ud%, rsp%)
' Check to see if GPIB Global variables are registered
If (GPIBglobalsRegistered = 0) Then
Call RegisterGPIBGlobals
End If
Static tmp_str As String * 2
' Convert Integer parameter into Long.
tmpUD& = CLng(ud%)
' Call the 32-bit DLL
rc& = ibrsp32(ByVal tmpUD&, ByVal tmp_str$)
rsp% = Asc(tmp_str$)
Call copy_ibvars
End Sub
Sub ibrsv(ud%, v%)
' 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&)
Call copy_ibvars
End Sub
Sub ibsad(ud%, v%)
' 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&)
Call copy_ibvars
End Sub
Sub ibsic(ud%)
' 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&)
Call copy_ibvars
End Sub
Sub ibsre(ud%, v%)
' 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&)
Call copy_ibvars
End Sub
Sub ibstop(ud%)
' 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&)
Call copy_ibvars
End Sub
Sub ibtmo(ud%, v%)
' 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&)
Call copy_ibvars
End Sub
Sub ibtrg(ud%)
' 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&)
Call copy_ibvars
End Sub
Sub ibwait(ud%, mask%)
' 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%)
tmpmask& = CLng(mask%)
' Call the 32-bit DLL.
rc& = ibwait32(ByVal tmpUD&, ByVal tmpmask&)
Call copy_ibvars
End Sub
Sub ibwrt(ud%, buf$)
' 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%)
cnt& = CLng(Len(buf$))
' Call the 32-bit DLL.
rc& = ibwrt32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)
Call copy_ibvars
End Sub
Sub ibwrta(ud%, buf$)
' 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%)
cnt& = CLng(Len(buf$))
' Call the 32-bit DLL.
rc& = ibwrt32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)
' When Visual Basic remapping buffer problem is solved, use this:
' rc& = ibwrta32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)
Call copy_ibvars
End Sub
Sub ibwrtf(ud%, filename$)
' 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& = ibwrtf32(ByVal tmpUD&, ByVal filename$)
Call copy_ibvars
End Sub
Sub ibwrti(ud%, ibuf%(), cnt&)
' 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%)
' Call the 32-bit DLL.
rc& = ibwrt32(ByVal tmpUD&, ibuf%(0), ByVal cnt&)
Call copy_ibvars
End Sub
Sub ibwrtia(ud%, ibuf%(), cnt&)
' 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%)
' Call the 32-bit DLL.
rc& = ibwrt32(ByVal tmpUD&, ibuf%(0), ByVal cnt&)
' When Visual Basic remapping buffer problem is solved, use this:
' rc& = ibwrta32(ByVal tmpUD&, ibuf%(0), ByVal cnt&)
Call copy_ibvars
End Sub
Sub ibwrtkey(ud%, buf$)
' 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& = ibwrtkey32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)
Call copy_ibvars
End Sub
Function ilask(ud%, opt%, rval%) As Integer
' Check to see if GPIB Global variables are registered
If (GPIBglobalsRegistered = 0) Then
Call RegisterGPIBGlobals
End If
' Convert Integer parameters to Longs.
tmpUD& = CLng(ud%)
tmpopt& = CLng(opt%)
' Call the 32-bit DLL.
rc& = ibask32(ByVal tmpUD&, ByVal tmpopt&, tmprval&)
ilask% = ConvertLongToInt(rc&)
rval% = ConvertLongToInt(tmprval&)
Call copy_ibvars
End Function
Function ilbna(ud%, udname$) 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& = ibbna32(ByVal tmpUD&, ByVal udname$)
ilbna% = ConvertLongToInt(rc&)
Call copy_ibvars
End Function
Function ilcac(ud%, v%) As Integer
' Check to see if GPIB Global variables are registered
If (GPIBglobalsRegistered = 0) Then
Call RegisterGPIBGlobals
End If
' Convert Integer parameters to Longs.
tmpUD& = CLng(ud%)
tmpv& = CLng(v%)
' Call the 32-bit DLL.
rc& = ibcac32(ByVal tmpUD&, ByVal tmpv&)
ilcac% = ConvertLongToInt(rc&)
Call copy_ibvars
End Function
Function ilclr(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& = ibclr32(ByVal tmpUD&)
' Convert Long into Integer.
ilclr% = ConvertLongToInt(rc&)
Call copy_ibvars
End Function
Function ilcmd(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 to Long.
tmpUD& = CLng(ud%)
' Call the 32-bit DLL.
rc& = ibcmd32(ByVal tmpUD&, ByVal buf$, ByVal cnt&)
ilcmd% = ConvertLongToInt(rc&)
Call copy_ibvars
End Function
Function ilcmda(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 to 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& = ibcmda32(ByVal tmpUD&, bytebuf(0), ByVal cnt&)
ilcmda% = ConvertLongToInt(rc&)
Call copy_ibvars
End Function
Function ilconfig(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& = ibconfig32(ByVal tmpUD&, ByVal tmpopt&, ByVal tmpv&)
ilconfig% = ConvertLongToInt(rc&)
Call copy_ibvars
End Function
Function ildev(bdid%, pad%, sad%, tmo%, eot%, eos%) As Integer
' Check to see if GPIB Global variables are registered
If (GPIBglobalsRegistered = 0) Then
Call RegisterGPIBGlobals
End If
' Convert Integer parameters into Longs.
tmpID& = CLng(bdid%)
tmppad& = CLng(pad%)
tmpsad& = CLng(sad%)
tmptmo& = CLng(tmo%)
tmpeot& = CLng(eot%)
tmpeos& = CLng(eos%)
' Call the 32-bit DLL.
tmpUD& = ibdev32(ByVal tmpID&, ByVal tmppad&, ByVal tmpsad&, ByVal tmptmo&, ByVal tmpeot&, ByVal tmpeos&)
ildev% = ConvertLongToInt(tmpUD&)
Call copy_ibvars
End Function
Function ildiag(ud%, buf$, cnt&) As Integer
' Check to see if GPIB Global variables are registered
If (GPIBglobalsRegistered = 0) Then
Call RegisterGPIBGlobals
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -