Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB Communication problem with HP 3497A DACU

Hello,

I'm working on test measurement application.
My test system uses GPIB-USB-B controller (National Instruments) to communicate between a Mensor, a DACU and my computer (Windows XP).
Software is written in Visual Basic .Net with Visual Studio 2005 environment.
I use Gpib-32.dll , and all the functions are in VBIB32 module.
A communication problem appears after ten successive  tests (sometimes after 11 or 12 tests). So I need to close the software and launch another time the executable file to be able to communicate again with the DACU. So when the crash occurs iberr = 0 and ibcntl = -535560191.
So why if I run a couple of tests (< 10) everything is smoothly, and not after 10 successive tests?
Other question what is the difference between ildev and ibdev?
The source code to connect the DACU is:

Sub Connect(ByVal Chan As Short, ByVal theType As String, ByVal Address As Integer, ByVal NumberReading As Short)

        Dim EQP_ID As Short = 0


        Address = Address - 700 ' fit gpib 32 protocol
        'EQP_ID = ildev(BDINDEX, Address, NO_SECONDARY_ADDR, TIMEOUT, EOTMODE, EOSMODE) 'Get equipment ID
        ibdev(BDINDEX, Address, NO_SECONDARY_ADDR, TIMEOUT, EOTMODE, EOSMODE, EQP_ID)
       
        '*****************************************************************
        '* Sets the channel to be read by DVM or DACU
        '*****************************************************************
        Select Case UCase(theType)
            Case "HP 3497A"
    
                Call ibwrt(EQP_ID, "VR5 VT3 VD5 VA1 VF1 VN" & VB6.Format(NumberReading, "0") & " VS0 VC0 SO1 SD1")
                Call ibwrt(EQP_ID, "AI" & Str(Chan))

            Case "SCANNER"
    
        End Select
       
    End Sub



Thank you in advance,
Best regards,

Sebastien

0 Kudos
Message 1 of 2
(3,259 Views)
Hello,

I finally solve my problem.

So I get the EQP_ID during the initialization and use this ID (global variable) when I read the data from DACU.
In this way I don't ask 26 times by test the DACU ID.

Sebastien
0 Kudos
Message 2 of 2
(3,243 Views)