Shared Memory API

There are number of useful SCPI commands available under the SYST:DATA:MEMory node to help the user gather data from the VNA instrument.

Specifically, these commands enable:

The first part of using these commands is to initialize the memory buffer and to indicate which measurements should be monitored. This first part is accomplished using these commands:

SYST:DATA:MEM:INIT

For each measurement x to be added:

SYST:DATA:MEM:MEAS[x]:FORM <formatType>

SYST:DATA:MEM:MEAS[x]:REPeat <repeatCount> // this is optional and only necessary if client code wants to batch results without retrieving on each sweep

SYST:DATA:MEM:MEAS[x]:ADD

SYST:DATA:MEM:COMMit <optional memory name>

At this point, after each sweep, the VNA will push the data into the buffers.

Shared Memory: The buffers can be accessed over shared memory using the optional memory name. See the shared memory example.

Saving the buffer to a file: To save the buffer to a file, use the SYST:DATA:MEM:COMMit <filename>. To access the file outside of the VNA firmware, close the VNA handle to the file with SYST:DATA:MEM:CLOSe:FILE <filename>.

Accessing the data with SCPI: To access the data via SCPI, use the SYST:DATA:MEM:READ:MEAS[x]? query.

For each measurement x:

SYST:DATA:MEM:READ:MEAS[x]? FDATA

Accessing an entire SParameter calibration buffer – “CAL” buffer

It can be convenient to record all the corrected S-Parameters on a standard channel. To configure this measurement, use SYST:DATA:MEM:MEAS[x]:FORM CAL

For example:

SYST:DATA:MEM:INIT

SYST:DATA:MEM:MEAS1:FORM CAL

SYST:DATA:MEM:MEAS1:ADD

SYST:DATA:MEM:COMMit <optional memory name>

Then, to retrieve the data, either use the shared memory buffer name.

Or the data can be retrieved using SCPI:

SYST:DATA:MEM:MEAS1:CAL? 'S11',DB

SYST:DATA:MEM:MEAS1:CAL? 'S21',DB

SYST:DATA:MEM:MEAS1:CAL? 'S12',DB

SYST:DATA:MEM:MEAS1:CAL? 'S22',DB