MMEMory

Last Updated: August 29, 2007

These commands provide access to the test set's memory and to the storage devices.

For more information on the conventions used in the programming examples click here.

MMEMory:CATalog?

Queries the contents of the current directory. Returns a binary Block containing the contents of the directory as ASCII text, separated by CR/LF. The first digit states the number of digits following. The digits following give the total number of characters in the list of filenames.

Test Set Requirements: E6601A WCTS Program Version A.02 and above

Example:

' Queries the contents of the current directory.

TestSet.WriteString("MMEMory:CATalog?")

MMEMory:CDIRectory <directory_name>
MMEMory:CDIRectory?

Sets/queries the default directory for a mass memory file system.

The <directory_name> parameter is a string. The contents of the <directory_name> parameter are dependent on the file system being accessed.

Test Set Requirements: E6601A WCTS Program Version A.02 and above

Example:

' Changes the current directory to Mydata

TestSet.WriteString("MMEMory:CDIRectory "Mydata"")

MMEMory:COPY <source_file>,<destination_file>[,<source_file>][,<destination_file>]

Copies an existing file to a new file.

Two forms of parameters are allowed. The first form has two parameters. In this form, the first parameter specifies the source file, and the second parameter specifies the destination file.

The second form has four parameters. In this form, the first and third parameter specify the file_names. The second and fourth parameters specify the <msus>. The first pair of parameters specifies the source file. The second pair specifies the destination file. An error is generated if the source file does not exist. An error may be generated if the destination file already exists.

Test Set Requirements: E6601A WCTS Program Version A.02 and above

Example:

' Copy myfile1.txt to myfile2.txt.

TestSet.WriteString("MMEMory:COPY "myfile1.txt","myfile2.txt"")

MMEMory:DATA <file_name>,<data>
MMEMory:DATA? <file_name>

Loads <data> into the file <file_name>. <data> is in 488.2 block format. The <file_name> is string data.

The query returns the <data> associated with <file_name> in 488.2 block format.

Test Set Requirements: E6601A WCTS Program Version A.02 and above

Example:

' Return the datablock associated with myfile1.txt.

TestSet.WriteString("MMEMory:DATA? "myfile1.txt"")

MMEMory:DELete <file_name>[,<msus>]

Removes a file from the specified mass storage device. The <file_name> parameter specifies the file_name to be removed. When the test set has multiple attached mass storage devices, you select the mass storage device you want using the mass storage unit specifier <msus>, for example "C:".

Test Set Requirements: E6601A WCTS Program Version A.02 and above

Example:

' Remove myfile1.txt from the default mass storage device.

TestSet.WriteString("MMEMory:DELete "myfile1.txt")

MMEMory:MDIRectory

Creates a directory.

Setting Range: string in " " representing a directory

Test Set Requirements: E6601A WCTS Program Version A.02 and above

Example:

' Creates a directory named "results".

TestSet.WriteString("MMEMory:MDIRectory "RESULTS"")

MMEMory:MOVE <source_file>,<destination_file> | <source_file>, source_msus, <destination_file>, <destination_msus>

Moves an existing file to another file name.

Two forms of the parameter are allowed. The first form has two parameters. In this form the first parameter, <source_file>, specifies the file to be renamed, and the second parameter, <destination_file>, specifies the new name of the file.

The move operation is performed on the default mass storage device.

The second form has four parameters. The first two parameters, <source_file> and <source_msus>, specify the file name and storage device of the source file and the second two parameters, <destination_file> and <destination_msus>, specify the new file name and new storage device for the source file.

Test Set Requirements: E6601A WCTS Program Version A.02 and above

Example:

' Move myfile1.txt to myfile3.txt

TestSet.WriteString("MMEMory:MOVE "myfile1.txt","myfile3.txt"")

MMEMory:RDIRectory <directory_name>

Removes an existing directory specified by <directory_name> from the mass memory file system. The <directory_name> is string data.

Test Set Requirements: E6601A WCTS Program Version A.02 and above

Example:

' Remove the Mydata directory from the mass memory file system.

TestSet.WriteString("Mydata")