Remote Spectrum Monitor User Guide : SCPI System Commands : :MMEMory Subsystem
 
:MMEMory Subsystem
The Mass MEMory subsystem contains functions that provide access to the instrument’s setup and data storage.
:MMEMory:CATalog:DIRectory? <string>,<string>
Title
Memory Catalog Directory
Description
Returns the non-recursive contents of the memory specified by the MSUS and DIRECTORY parameters. Both parameters are case sensitive. Parameter 1: Directory. Use "/" as a directory separator. Note that this parameter should NOT be an empty string. To access the root directory, pass in "/" as the first parameter. Parameter 2: MSUS (Use :MMEMory:CATalog:MSUSs query command to retrieve the list of available storage devices). The response is formated as follows: <total space used on MSUS>,<total space available on MSUS>,{<file entry1>},..{<file entryN>} where <file entry> is: <file or directory name>,<file type>,<file size>
Parameters
<string> Directory. Use "/" as a directory separator
<string> MSUS (Use :MMEMory:CATalog:MSUSs command to retrieve the list of available storage devices).
:MMEMory:CATalog:MSUSs?
Name
Memory Catalog Msuss
Description
Returns a list of all available mass storage devices present, formated as follows: <Device Name 1>,<Device Name 2>,...<Device Name N>
Parameters
none
:MMEMory:CDIRectory <string>
:MMEMory:CDIRectory?
Name
Default Mass Storage Directory
Description
This command selects the default directory on the default mass storage device (see :MMEMory:MSIS) for use with MMEMory commands. The parameter is case sensitive. Use "/" as a directory separator. The set command will fail and an error is reported if the requested directory does not exist. Note that the query command returns the name of the default directory that was previously set and the device does not check whether the directory is still present.
Parameters
<string>
:MMEMory:COPY <string>,<string>,<string>,<string>
Title
Copy File
Description
This command copies the specified source file into a new file located at the specified destination location. Four Parametersare required for this command: 1. Source File Location: The file path to the file to be copied. 2. Source MSUS: The mass storage device the file is located in (i.e. Internal). 3. Destination File Location: The destination file path that the file should be copied to. 4. Destination MSUS: The mass storage device that the destination file should be written to (i.e. Internal). Please note that if a file already exists at the destination location or if the source file does not exist, the command will fail to execute and add an execution error into the SCPI error queue. This command will only copy files. If a directory path is passed in as a parameter, the command will fail to execute.
Parameters
<string>,<string>,<string>,<string>
:MMEMory:CREate:DIRectory <string>,<string>
Title
Create Directory
Description
Creates a directory at the specified mass storage device. The two Parametersfor this command are directory name and mass storage device. Both Parametersare case sensitive.
Use "/" as a directory separator. The available mass storage devices can be retrieved by using the command:
:MMEMory:CATalog:MSUSs
If the intermediate directories in the path don’t exist, the command will automatically create them. The command will fail if the mass storage device is not present.
Parameters
<string>,<string>
:MMEMory:DATA <string>,<string>,<block data>
:MMEMory:DATA? <string>,<string>
Title
File Transfer
Description
This command imports/exports a file to/from the instrument. Data is transferred to/from the instrument as an IEEE definite length arbitrary block response, which has the form <header><block>.
This set command takes three parameters. 1. File Path: The path of the file to be written 2. Msus: The mass storage device to write the file to 3. Block Data: The datato be written to the instrument in block data format
If any directories in the file path do not exist, the isntrument will automatically create the required directories. Please note that the maximum file transfer size to the instrument is 25 MB.
The ASCII header specifies the number of data bytes of the file. It looks like #AX, where A is the number of digits in X and X is the number of bytes in the <block>. The first character is the literal ascii hash ’#’ 043. The second character (A) is a single ascii digit ’1’ to ’9’ describing the number of bytes in the length section (X). This number is called nlength. The next nlength bytes make up an ascii string of digits ’1’ to ’9’ describing the length of the <block> data.
For example, if the first 6 bytes are #49999, then the nlength is 4. The 4 bytes of length are 9999. After that follows the <block>, which would be 9999 bytes in size.
The query command takes two parameters. 1. File Path: The path to the file to be retrieved. 2. Msus: The mass storage device to retrieve the file from.
The file is returned in block data format with an ASCII header The query command will return a #10 if the file cannot be found.
Parameters
<string>,<string>,<block data>
Query Parameters
<string>,<string>
 
:MMEMory:DELete:DIRectory <string>,<string>
Title
Delete Directory
Description
Deletes the specified directory and all its content at the specified mass storage device. The two paramters for this command are directory name and mass storage device. Both Parametersare case sensitive.

Use "/" as a directory separator. To delete the root folder in a specified mass storage device, enter "/" for directory name parameter. The available mass storage devices can be retrieved by using the command:
:MMEMory:CATalog:MSUSs
The command will fail if the directory doesn’t exist or the mass storage device is not present.
Parameters
<string>,<string>
:MMEMory:DELete:FILe <string>,<string>
Title
Delete File
Description
Deletes the specified file at the specified mass storage device. The two Parametersfor this command are file name with relative path and mass storage device. Both Parametersare case sensitive.
Use "/" as a directory separator. The available mass storage devices can be retrieved by the command:
:MMEMory:CATalog:MSUSs
The command will fail if the file doesn’t exist or the mass storage device is not present.
Parameters
<string>,<string>
:MMEMory:LOAD:STATe <numeric_value>,<string>,<string>
Title
Load State
Description
This command recalls the specified setup. The file location is resolved using the MSUS and file path parameters. These Parametersare case sensitive. Parameters1. Numeric Value: currently unused.Send a 0. 2. File path: The file path (including file name) relative to the MSUS root directory. File extension is optional. 3. MSUS: Device to recall the file from.See MMEMory:MSUSs? for information on obtaining the list of available devices. The model of the device that the setup was created in must match the model of the device to recall in; otherwise, the recall will be rejected. The options of the device that the setup was created in must be enabled in the device to recall in; otherwise, the recall will be rejected.
Parameters
<numeric_value>,<string>,<string>
:MMEMory:LOAD:TRACe <string>,<string>,<string>
Title
Load Trace
Description
This command recalls the specified measurement. The file location is resolved using the MSUS and file path parameters. These Parametersare case sensitive. Parameters1. Label: Used to specify which trace to recall. Currently, the label only supports recalling all traces. Send an empty string or "ALL" to load all traces. 2. File path: The file path (including file name) relative to the MSUS root directory. File extension is optional. 3. MSUS: Device to recall the file from.See MMEMory:MSUSs? for information on obtaining the list of available devices. The model of the device that the measurement was saved in must match the model of the device to recall in; otherwise, the recall will be rejected. The options of the device that the measurement was saved in must be enabled in the device to recall in; otherwise, the recall will be rejected.
Parameters
<string>,<string>,<string>
:MMEMory:LOAD:TRACe:EXIT <char>
Title
Exit Recall State
Description
This command exits recall state if the instrument currently has a measurement file recalled. An enumerable parameter is accepted to determine whether to revert back to the setup prior to recalling a measurement (LOADprevious) or to keep the setup from the measurement file (KEEPcurrent).
Parameters
<char>
 
:MMEMory:LOAD:TRACe:STATus?
Title
Get Recall State Status
Description
This command retrieves the status of whether or not the instrument is in a state where a measurement file has been recalled. A return value of 0 means that the instrument is not in a state where a measurement file has been recalled. A return value of 1 means that the instrument has recalled a measurement file and is in a state where SCPI commands are restricted. To exit this state, use the :MMEMory:LOAD:TRACe:EXIT SCPI command.
Parameters
none
:MMEMory:MSIS <string>
:MMEMory:MSIS?
Title
Default Mass Storage Device
Description
This command selects the default device for use with MMEMory commands. The mass storage device parameter is case sensitive and must match a device returned from the :MMEMory:CATalog:MSUSs? command
:MMEMory:CATalog:MSUSs?
Parameters
<string>
:MMEMory:STORe:STATe <numeric_value>,<string>,<string>
Title
Store State
Description
This command saves the current setup to the specified file location. The file location is resolved using the MSUS and file path parameters. These Parametersare case sensitive.If a file with the resolved name already exists, it will be overwritten. Parameters1. Numeric Value: currently unused.Send a 0. 2. File path: The file path (including file name) relative to the MSUS root directory. File extension should not be specified. 3. MSUS: Device to save the file on.See MMEMory:MSUSs? for information on obtaining the list of available devices.
A common cause of the command failure is not having enough space available on MSUS to save the setup. Use :MMEMory:CATalog:DIRectory query command to retrieve the total space available on MSUS.
Parameters
<numeric_value>,<string>,<string>
:MMEMory:STORe:TRACe <string>,<string>,<string>
Title
Memory Store Trace
Description
This command saves the current trace to the specified file location. The file location is resolved using the MSUS and file path parameters. These Parameters are case sensitive.
Label- currently unused. Send an empty string
File path- The file path (including file name) relative to the MSUS root directory. File extension should not be specified.
MSUS- Device to save the file on. See MMEMory:MSUSs? for information on obtaining the list of available devices.
Parameters
<string>,<string>,<string>