AnsweredAssumed Answered

Getting data from HP16500B

Question asked by scroteau on Nov 18, 2008
Hi, I am trying to get data out of the HP16500b without success. I can control the analyzer and view setting but cannot transfer data. Here is my code with what I have tried and the results

            GPIBOut("SEL 5")
             GPIBOut(":DBL UNP")            'want data unpacked
            'hpVNA.SetBufferSize(Ivi.Visa.Interop.BufferMask.IO_IN_BUF, 4 * 1024 * 1024)

            GPIBOut(":SYST:DATA?")            ' Ask for trace dump
            '********* Test cases
            TRACE.Add(hpVNA.ReadIEEEBlock(Ivi.Visa.Interop.IEEEASCIIType.ASCIIType_UI1))

            ' 16500B Query Inerupted on next command -  'VI_ERROR_TMO: A timeout occurred
            'TRACE.Add(hpVNA.ReadIEEEBlock(Ivi.Visa.Interop.IEEEBinaryType.BinaryType_UI1))
            'TRACE.Add(hpVNA.ReadIEEEBlock(Ivi.Visa.Interop.IEEEASCIIType.ASCIIType_Any))
            'TRACE.Add(hpVNA.ReadIEEEBlock(Ivi.Visa.Interop.IEEEASCIIType.ASCIIType_BSTR))
            'TRACE.Add(hpVNA.ReadIEEEBlock(Ivi.Visa.Interop.IEEEASCIIType.ASCIIType_UI1))

            ' No Error on 16500B
            'TRACE.Add(hpVNA.ReadString)  ' "#801780090DATA      "     
            'myStr = hpVNA.ReadString   ' "#801780090DATA      "
            'TRACE.Add(hpVNA.ReadList(Ivi.Visa.Interop.IEEEASCIIType.ASCIIType_Any))

            ' No Error on 16500B - Couldn't interpret I/O data as single number.
            'TRACE.Add(hpVNA.ReadNumber(Ivi.Visa.Interop.IEEEBinaryType.BinaryType_UI1))
            'TRACE.Add(hpVNA.ReadNumber(Ivi.Visa.Interop.IEEEBinaryType.BinaryType_I4))

            'No Error on 16500b - Unexpected I/O termination or couldn't convert list item # 1 to long/integer/byte format
            'TRACE.Add(hpVNA.ReadList(Ivi.Visa.Interop.IEEEBinaryType.BinaryType_UI1))

            ' Query Interupted on 16500B - Couldn't interpret I/O data as single number.
            'TRACE.Add(hpVNA.ReadNumber(Ivi.Visa.Interop.IEEEBinaryType.BinaryType_I2))


I can get the first header if I am looking for a string back, but if I am looking for data I get nothing? Any help would be appreciated.  

Outcomes