AnsweredAssumed Answered

A Question of Collecting Trace Data From PNA in Visual C

Question asked by lgfcs on Aug 25, 2007
Latest reply on Aug 27, 2007 by lgfcs
Hello All,

I am trying to get trace data from PNA using C# (Agilent visa32+SCPI)

My question is how to get complex data (including both real and imaginary part)? I made below codes and only receives real part.

command += "\n";
viError = visa32.viPrintf(session, command);

io.Write("CALCulate:PARameter:SELect 'Meas1'");
io.Write("calculate:format smith");
io.Write("format:data REAL,32");
io.Write("CALCulate:DATA? SDATA");
float[] data=new float[nop];);//int nop = number of points
/*---The following line saves trace data to a float array--*/
//if section =1; I get real part
//if section =0; I get ana array of all zeros
//How to set section=?
//How to get both real and imaginary part?
viError = visa32.viScanf(section, "%#zb",ref nop, data);

Appreciate for any ideas!