Memory SCPI

M9370A / M9371A / M9372A / M9374A / M9375A

Memory Commands


The memory commands control saving and loading instrument states and measurement trace data to the hard drive. To read and write trace data in GPIB format, see CALC:DATA.

MMEMory:

CATalog?

CDIRectory

COPY

DATE?

DELete

LOAD

MDIRectory

MOVE

RDIRectory

STORe

     | CITI

            | DATA

            | FORMat

       | DATA

       | ENR

       | TRACe

            | CONTents

                 | CITIfile

            | FORMat

                 | CITIfile

                 | SNP

TIME?

TRANsfer

Click on a keyword to view the command details.

Blue commands are superseded.

See Also

Specifying Path Names

The MMEM commands use the following rules to specify path names:

  • The default folder for Windows 7 is "c:\users\public\documents\Network analyzer"  Learn more.

  • You can change the active directory using MMEMory:CDIRectory.

  • Specify only the file name if using the active directory.

  • You can also use an absolute path name to specify the folder and file.


MMEMory:CATalog[:<char>]? [<folder>]

(Read-only) Returns a comma-separated string of file names that are in the specified folder. If there are no files of the specified type, "NO CATALOG" is returned.  Learn about File Types

Parameters

 

<char>

The type of files to list. Choose from:

  • STATe - Instrument states (.sta)

  • CORRection - Calibration Data (.cal)

  • CSARchive - Instrument state and calibration data (.csa)

  • CSTate - Instrument state and link to Calibration data (.cst)

If unspecified then ALL file types (even unknown types) are listed.

<folder>

String - Any existing folder name. See Specifying Path Names

Examples

MMEM:CAT? 'lists all files from the current folder
mmemory:catalog:correction? c:\users\public\documents\Network analyzer\Documents' 'lists .cal files from the specified folder

Default

Not applicable


MMEMory:CDIRectory <folder>

(Read-Write) Changes the folder name.

Parameters

 

<folder>

Any drive and folder name that already exists.

If the same level as the default path, then no punctuation is required.

MMEM:CDIR Service

If the new folder is at a different level than the default, use a slash (/) before the folder name and enclose in quotes.

mmemory:cdirectory '/automation' 'changes default directory up one level.

You can use an absolute path to specify the new folder.

mmemory:cdirectory 'c:/automation/service'

Query Syntax

MMEMory:CDIRectory? 'Returns the current folder name

Return Type

String

Default

See Specifying Path Names


MMEMory:COPY <file1>,<file2>

(Write-only) Copies file1 to file2. Extensions must be specified.

Parameters

 

<file1>

String - Name of the file to be copied. See Specifying Path Names

<file2>

String - Name of the file to be created from file1.

Examples

MMEM:COPY 'MyFile.cst','YourFile.cst'

Query Syntax

Not applicable

Default

Not applicable


MMEMory:DATE? <fileName>

(Read-only) Returns the (year, month, day) that the specified file was last saved.

To query the last date and time a cal set was modified, use CSET DATE? and CSET:TIME?

See Also

MMEM:TIME?

Parameters

 

<fileName>

String - File name. See Specifying Path Names

Example

MMEM:DATE? "myFile.txt"

'Returns

+2013,+4,+12

mmemory:date? "c:\users\public\documents\Network analyzer\UserCalSets\Calset_18.pcs"

'Returns

+2013,+4,+12

Return Type

Comma-separated integers

Default

Not applicable


MMEMory:DELete <file>

(Write-only) Deletes file. Extensions must be specified.

Parameters

 

<file>

String - Name of the file to be deleted. See Specifying Path Names

Examples

MMEM:DEL 'MyFile.cst'

Query Syntax

Not applicable

Default

Not applicable


MMEMory:LOAD[:<char>] <file>

(Write-only) Loads the specified file. Learn about File Types

Parameters

 

<char>

The type of file to load. Choose from:

  • STATe - Instrument states (.sta)

  • CORRection - Calibration Data (.cal)

  • CSARchive - Instrument state and calibration data (.csa)

  • CSTate - Instrument state and link to Calibration data (.cst)

  • ENR - Excess Noise Source data (Noise Figure App only)

  • When <char> is ENR, then include CAL, -  See example below.

  • *.sNp files CAN be recalled to the PNA although no <char> is used. See example below.

If <char> is unspecified, the extension must be included in the filename.

If an extension is specified in <file> that does not agree with <char> then no action is taken.

<file>

String - Name of the file to be loaded. See Specifying Path Names

Examples

MMEM:LOAD 'MyFile.cst'
mmemory:load:state 'MyInstState'

MMEM:LOAD:ENR CAL, C:/data/calset/346C_16500.enr"

MMEM:LOAD "MyFile.s2p"

Query Syntax

Not applicable

Default

Not applicable


MMEMory:MDIRectory <folder>

(Write-only) Makes a folder.

Parameters

 

<folder>

String - Name of the folder to make. See Specifying Path Names

Examples

MMEM:MDIR 'MyFolder'

mmemory:mdirectory 'c:/NewFolder'

Query Syntax

Not applicable

Default

Not applicable


MMEMory:MOVE <file1>,<file2>

(Write-only) Renames <file1> to <file2>. File extensions must be specified.

Parameters

 

<file1>

String - Name of the file to be renamed. See Specifying Path Names

<file2>

String - Name of the new file.

Examples

MMEM:MOVE 'MyFile.cst','YourFile.cst'

Query Syntax

Not applicable

Default

Not applicable


MMEMory:RDIRectory <folder>

(Write-only) Removes the specified folder.

Parameters

 

<folder>

String - Name of the folder to remove. See Specifying Path Names

Examples

MMEM:RDIR 'MyFolder'

Query Syntax

Not applicable

Default

Not applicable


MMEMory:STORe[:<char>] <file>

(Write-only) Stores the specified file (.sta, .cal, .cst, .csa, .snp, s2px).

Learn about saving SNP files on the PNA.

Learn about saving S2Px files on the PNA.

To save other data files, use MMEM:STOR:DATA.

To save ENR files, use MMEMory:STORe:ENR

Parameters

 

<char>

Optional argument. The type of file to store. Choose from:

  • STATe - Instrument states (.sta)

  • CORRection - Calibration Data (.cal)

  • CSARchive - Instrument state and calibration data (.csa)

  • CSTate - Instrument state and link to Calibration data (.cst)

No <char> is specified for s1p, s2p, s2px and so forth.

Include either <char> or the file extension. If both <char> and the extension are specified, they must agree or an error is returned and no action is taken. See examples below.

Learn about File Types

<file>

String - Name of any valid file that does not already exist. See Specifying Path Names

Examples

MMEM:STOR:STAT 'myState'

mmemory:store 'c:/bin/myState.sta'

MMEM:STOR 'MyData.S2P'

Query Syntax

Not applicable

Default

Not applicable


MMEMory:STORe:CITifile:DATA <filename> - Superseded

This command is replaced with MMEMory:STORe:DATA.

(Write only)  Saves UNFORMATTED trace data to .cti file. Learn more.

Parameters

 

<filename>

Any path that already exists with filename.

If the same level as the default, then no path is required.

MMEM:STOR:CIT:DATA 'MYFile.cti'

Of you can specify an absolute path and filename:

mmemory:store:citifile:data "c:\users\public\documents\Network analyzer\myFile.cti'

Query Syntax

Not Applicable

Default

See Specifying Path Names


MMEMory:STORe:CITifile:FORMat <filename> - Superseded

This command is replaced with MMEMory:STORe:DATA.

(Write only)  Saves FORMATTED trace data to .cti file. Learn more.

Parameters

 

<filename>

Any path that already exists with filename.

If the same level as "c:\users\public\network analyzer\documents", then no path is required

MMEM:STOR:CIT:FORM 'MYFile.cti'

Of you can specify an absolute path and filename:

mmemory:store:citifile:format "c:\users\public\documents\Network analyzer\myFile.cti'

Query Syntax

Not Applicable

Default

See Specifying Path Names


MMEMory:STORe:DATA <filename>,<type>,<scope>,<format>,<selector>

(Write-only) Stores trace data to the following file types: *.prn, *.cti, *.csv, *.mdf   

To save snp files, use Calc:Data:SNP:PORTs:SAVE

To save state and calibration files, use MMEM:STORe

This command replaces the following:

NOTE: Not all choices are valid with other arguments. See Valid parameter combinations below.

Parameters

 

<filename>

(String) Name and extension of the file to which data will be saved. If the extension does not agree with the file type, an error is NOT returned but the data may NOT be what you expect.

See rules for specifying a filename.

<type>

(String) File type to save. Choose from:

"PRN Trace Data" - *.prn data. Learn more.

"Citifile Data Data" - unformatted *.cti data. Learn more.

"Citifile Formatted Data" - formatted *.cti data.

"CSV Formatted Data" - formatted *.csv data. Learn more.

"MDIF Data" - *.mdf data. Learn more.

"GCA Sweep Data" - Gain compression data. Learn more.

"IMD Sweep Data" - Swept IMD data. Learn more.

<scope>

(String) How much data to save. Choose from:

"Trace" - only the specified measurement number is saved.

"Displayed" - all displayed measurements are saved.

"Channel" - all measurements that are in the channel in which the selected measurement reside are saved.

"Auto"

For all Standard Meas Class (S-parameter) channels:

  • When correction is OFF, the specified trace is saved.

  • When correction is ON, all corrected parameters associated with the calibrated ports in the Cal Set are saved.

For all other channels:

  • When correction is OFF or ON, the specified trace is saved.

<format>

The format in which data is saved. Choose from:

"Displayed" - the format is the same as that in which it is displayed on the PNA screen.

"RI" - Real / Imaginary

"MA" - Magnitude / Angle

"DB" - LogMag / Degrees

<selector>

(Integer) Choose from:

-1  Use when <scope> = "Displayed" (does NOT require a selected trace).

<measurement number>  Use for all other <scope> selections.  Use Calc:Par:MNUM? to read the measurement number of the selected trace.

The following are valid parameter combinations for ALL measurement classes:

Parameters

<type>
(String)

<scope>
(String)

<format>
(String)

<selector>
(Numeric)

"PRN Trace Data"

"Trace"

"Displayed"

Measurement number

 Example: MMEMory:STORe:DATA "myData.prn","PRN Trace Data","Trace","Displayed",2

"Citifile Data Data"

"Trace" or "Auto" or "Channel"

"RI"

Measurement number

"Displayed"

"RI"

-1

Example: MMEMory:STORe:DATA "myData.cti","Citifile Data Data","AUTO","RI",3

"Citifile Formatted Data"

"Trace" or "Auto"

"RI" or "MA" or "DB"

Measurement number

"Channel"

"RI" or "MA" or "DB" or "Displayed"

Measurement number

"Displayed"

"RI" or "MA" or "DB" or "Displayed"

-1

Example: MMEMory:STORe:DATA "myData.cti","Citifile Formatted Data","AUTO","MA",3

"CSV Formatted Data"

"Trace" or "Auto" or "Channel"

"RI" or "MA" or "DB" or "Displayed"

Measurement number

"Displayed"

"RI" or "MA" or "DB"

-1

Example: MMEMory:STORe:DATA "myData.csv","CSV Formatted Data","displayed","RI",-1

"MDIF Data"

"Trace" or "Auto"

"RI" or "Displayed"  or "Channel"

Measurement number

"Displayed"

"RI" or "Displayed"

-1

Example: MMEMory:STORe:DATA "myData.mdf","MDIF Data","displayed","displayed",-1

 

The following parameter combinations save *.csv files in specific formats for GCA and Swept IMD classes:

Parameters

<type>
(String)

<scope>
(String)

<format>
(String)

<selector>
(Numeric)

"GCA Sweep Data"

"Auto"

"DB"

GCA channel number

Example: MMEMory:STORe:DATA "myData","gca sweep data","displayed","displayed",-1

"IMD Sweep Data"

"Auto"

"DB"

Swept IMD channel number

Example: MMEMory:STORe:DATA "myData.mdf","MDIF Data","displayed","displayed",-1

Query Syntax

Not applicable

Default

Not applicable


MMEMory:STORe:ENR CAL, <file>

(Write-only) Stores an ENR (Excess Noise Source) data. (Noise Figure App only)

To set and read ENR data, use SENS:CORR:ENR:CAL:TABLE:DATA.

Parameters

 

<file>

String - Name of any valid file that is not already in existence. See Specifying Path Names

Examples

MMEM:STOR:ENR CAL, "C:/data/calset/346C_16500.enr"

Query Syntax

Not applicable

Default

Not applicable


MMEMory:STORe:TRACe:FORMat:CITifile <char> - Superseded

This command is replaced with MMEMory:STORe:DATA.

(Read-Write)  Specifies the format of subsequent citifile save statements.

Parameters

 

<char>

Format in which the citifile will be saved with subsequent MMEMory:STORe:CIT:FORMat statements. Choose from:

MA - Linear Magnitude / degrees

DB - Log Magnitude / degrees

RI - Real / Imaginary

AUTO - Format in which the trace is already displayed.  If other than Log Mag, Linear Magnitude, or Real/Imag, then the format will be in Real/Imag.

DISP - Displayed format.

Examples

MMEM:STOR:TRAC:FORM:CIT MA

Query Syntax

MMEMory:STORe:TRACe:FORMat:CITifile?

Return Type

Character

Default

Auto


MMEMory:STORe:TRACe:CONTents:CITifile <char> - Superseded

This command is replaced with MMEMory:STORe:DATA.

(Read-Write)  Specifies the contents of subsequent citifile save statements. (See Data Define Saves)

Parameters

 

<char>

Choose from:

SING - Single trace

DISP - All displayed traces

AUTO - All displayed traces

Examples

MMEM:STOR:TRAC:CONT:CIT SING

Query Syntax

MMEMory:STORe:TRACe:CONTents?

Return Type

Character

Default

Auto


MMEMory:STORe:TRACe:FORMat:SNP <char>

(Read-Write)  Specifies the format of subsequent .s1p, .s2p, .s3p; s4p save statements. Learn more.

To save SNP data, use CALC:DATA:SNP:PORTs:SAVE

Parameters

 

<char>

Choose from:

MA - Linear Magnitude / degrees

DB - Log Magnitude / degrees

RI - Real / Imaginary

AUTO - data is output in currently selected trace format. If other than LogMag, LinMag, or Real/Imag, then output is in Real/Imag.

Examples

MMEM:STOR:TRAC:FORM:SNP MA

Query Syntax

MMEMory:STORe:TRACe:FORMat:SNP?

Return Type

Character

Default

Auto'


MMEMory:TIME? <fileName>

(Read-only) Returns the (hour, minute, second) that the specified file was last saved.  The time is returned in local time as setup in the PNA operating system.  

To query the last date and time a cal set was modified, use CSET DATE? and CSET:TIME?

See Also

MMEM:DATE?

Parameters

 

<fileName>

String - File name. See Specifying Path Names

Example

MMEM:TIME? "myFile.txt"

'returns

+12,+34,+12

mmemory:time? "c:\users\public\documents\Network analyzer\UserCalSets\Calset_18.pcs"

'returns

+12,+34,+12

Return Type

Comma-separated integers

Default

Not applicable


MMEMory:TRANsfer <fileName>,<dataBlock>

(Read-Write) Transfers data between the PNA and an external controller. Other MMEM commands transfer data between the PNA application and the PNA hard drive.  If <fileName> already exists, it will be overwritten. The file must be no larger than 20MB.

To read trace data from the PNA in block format, use CALC:DATA.

Parameters

 

<fileName>

String - File name. See Specifying Path Names

<dataBlock>

Block Data - The contents of the file.

The data block is a block of binary data. Use the following syntax:

#<num digits><byte count><data bytes><NL><END>

where:

<num_digits> specifies how many digits are contained in <byte_count>

<byte_count> specifies how many data bytes will follow in <data bytes>

 

Example:

#210ABCDE+WXYZ<nl><end>

Where:

# - always sent before definite block data

2 - specifies that the byte count is two digits (2)

10 - specifies the number of data bytes that will follow, not counting <NL><END>

ABCDE+WXYZ - 10 digits of data

<NL><END> - always sent at the end of block data

Example

See example program

Query Syntax

MMEMory:TRANsfer? <fileName>

Reads block data from the specified file location.

Default

Not applicable