Discussion:
ibrdi in Gpib.dll
(too old to reply)
Elvis Liu
2008-07-29 10:40:12 UTC
Permalink
Hi,


I am very sorry to bother you. Here I get some problem about gpib control. When I used gpib.dll to control the equipment, I get some problem.

When I try to communicate with equipment ?TDS2014? using ? ibrdi ? in vb.net , however I can not get any data from the equipment.

Appreciate your reply and your help deeply.



Here is the code as following:



Declare Function ibrd32 Lib "Gpib-32.dll" Alias "ibrd" (ByVal ud As Integer, <MarshalAsAttribute(UnmanagedType.VBByRefStr)> ByRef sstr As String, ByVal cnt As Integer) As Integer

 

Sub ibrdi(ByVal ud As Short, ByRef ibuf() As Short, ByVal cnt As Integer)

              ' Check to see if GPIB Global variables are registered

              If (GPIBglobalsRegistered = 0) Then

                     Call RegisterGPIBGlobals()

              End If



              ' Call the 32-bit DLL.

              Call ibrd32(ud, ibuf(0), cnt)

              Call copy_ibvars()

End Sub

Dim WfmData(5000) As Short

ibwrt(Equ_TKRNX_DSO, "Dat init;:Wfmp:Byt_Nr 2;BN_F RP;Byt_Or MSB")

strTmp = "Dat:Sou Ch1;:Curv?"

ibeos(Equ_TKRNX_DSO, &H0)

ibwrt(Equ_TKRNX_DSO, strTmp)

ibrdi(Equ_TKRNX_DSO, WfmData, 5000)

however, I get nothing for array ?WfmData?.  Thanks.



 

 
muks
2008-08-13 12:40:24 UTC
Permalink
Will <a href="http://digital.ni.com/public.nsf/allkb/2715A9C04D63737B86256B060064E5C3" target="_blank">this</a> help
Loading...