AnsweredAssumed Answered

How to read trace data from ENA5071 Net Anlyzr

Question asked by sdeyoreo on Feb 5, 2014
I need to get the trace data from an ENA 5071, but I can't get to use the instrument for a week or so.
I'm using VB2010 and NI Visa. I can read and write to it ok, so all that works.
I think it comes back as one long string of real1l, imaginary1, real2, imaginary2,... Am I right in thinking that each one is comma separated so I can use the Split() function? Or is each pair comma separated?
Will something like this work:?

    --- N.A is  previously set up for S21;LOGM -----

               '   get AMPLITUDE list
                   
                    Cmd2 = "FORM4;"
                    WriteHP8753(Cmd2)

                    Cmd2 = ":FORM:DATA ASC"
                    WriteENA(Cmd2)

                    Cmd2 = ":CALC1:DATA:FDAT?"
                    WriteENA(Cmd2)
                    ReadENA()

                ' make AMPLITUDE array
                    TraceArray = Split(NAText, ",")

                ' every other TraceArray array element is 0, so get every other one:
                    ReDim AmpReadingArray((UBound(TraceArray) / 2) + 1)
                    For cnt = 0 To UBound(TraceArray) Step 2
                        AmpReadingArray(cnt / 2) = Val(TraceArray(cnt))
                    Next

Thanks.  

Outcomes