[Python] SCPI command to set an instrument automatically hold onto a certain number of traces...

Discussão em 'Python' iniciado por Stack, Abril 15, 2025.

  1. Stack

    Stack Membro Participativo

    In my application, Python interacts with an E8361A Agilent Vector Network Analyzer (VNA) to acquire hundreds of thousands of data "blocks". Each "block" consists of 8 S21 traces with each trace being defined in a separate VNA channel.

    Each trace is linked with a measurement name according to,

    write("CALC" + str(cnum) + ":pAR:DEF:EXT 'S21_" + str(cnum) + "', S21")
    write("DISP:WIND:TRAC" + str(cnum) + ":FEED 'S21_" + str(cnum) + "'")


    Each of the 8 traces is swept one time, and then its corresponding S21 data is acquired. The following code snippet shows the general algorithm I follow to acquire, say 100k, of data block with each block containing 8 traces,

    for dut_state_indx in range(1,100001):
    {... Activate DUT state dut_state_indx}
    for cnum in range(1 , 9):
    {... Activate Antenna cnum}
    write("SENS" + str(cnum) + ":SWEEP:MODE SING")
    query("*OPC?")
    Sdata = query("CALC" + str(cnum) + ":DATA? SDATA")
    {... append Sdata as a row to "S21_" + str(cnum) + ".csv"}


    This has been working for me; however, the DAQ process could be made more efficient. One way to achieve that is to set the VNA to automatically memorize the trace data for 8 channels (or concatanate the 8 traces into one data block) and then acquire the data block.

    In that scenario, 8 single sweeps would still need to be initiated and completed but only one data inquiry is required rather than 8. Is there any SCPI commands to achieve this setting by a one-time implementation rather than constantly interacting with the VNA for hundreds of thousands of times?

    The VNA firmware version is A.07.50.67.

    Continue reading...

Compartilhe esta Página