5.11. MMEMory

The MMEMory commands are used to create, write, read or delete files on the BB3’s SD card. It can also query SD card information. In addition it is used for storing and recalling values used by [SOURce[<n>]]:LIST subsystem. File and directory (folder) names cannot contain the following characters:\ / : * ? " < > |

 

SCPI command

Description

MMEMory

 

:CATalog [<directory>]

Returns a list of items in the specified directory (folder)

:LENgth [<directory>]

Returns the number of items in the specified directory

:CDIRectory {<directory>}

Changes the current directory

:CLOSe

Closes the file specified in NAME

:COPY {<source>}, {<destination>}

Copies <source> to <destination>

:DATE? {<filename>}

Returns date that the specified file was last saved

:DELete {<filename>}

Deletes an existing file

:DOWNload

 

:ABORt

Aborts current download session

:DATA {<block>}

Downloads data from the host computer or script

:FNAMe {<filename>}

Creates or opens the specified filename for download data

:SIZE {<filesize>}

Sets information about file size used for progress bar

:FEED

Sets data handle used to feed data into the file

:INFOrmation?

Returns used and free space

:LOAD

 

:LIST<n> {<filename>}

Loads stored LIST to the specified channel

:PROFile {<filename>}

Loads stored user profile

:LOCK {<password>}

Sets write protection

:MDIRectory {<directory>}

Makes a new directory

:MOVE {<source>}, {<destination>}

Moves or renames <source> to <destination>

:NAME {<filename>}

Sets the file name ro be opened or closed

:OPEN

Opens the file specified in NAME

:RDIRectory {<directory>}

Removes the specified directory

:STORe

 

:LIST<n> {<filename>}

Saves specified channel LIST

:PROFile {<filename>}

Saves specified user profile

:TIME? {<filename>}

Returns time that the specified file was last saved

:UNLock {<password>}

Clears write protection

:UPLoad? {<filename>}

Uploads data to the host computer or script

 

5.11.1. MMEMory:CATalog

Syntax

MMEMory:CATalog? [<directory>]

Description

Returns the list of files and directories (folders) names, types and sizes in the current or specified directory. Number of items (files/directories) corresponds to the value returned by the MMEMory:CATalog:LENgth? command.

 

To read out the information in the root directory (folder), specify "\" (backslash) or "/". If <directory> is not set, this function is applied to the current directory. If directory=<path>, this function is applied to <current directory>\<path>.

 

Error occurs if the specified directory does not exist.

Parameters

Name

Type

Range

Default

<directory>

Quoted string

Directory name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Return

Returns all files in the directory as list of comma delimited quoted strings of <filename>, <filetype> and <filesize>. The following file types are supported:

  • BIN – binary data
  • CSV – textual data (comma separated)
  • FOLD – directory (folder)
  • LIST – LIST program data
  • LOG – trace (display) or logged data (file extension .log)
  • PROF – user profile data (file extension .profile)
  • STAT – instrument (setting) state or user profiles (file extension .conf)

Usage example

MMEM:CAT?

"USER,FOLD,0","SCPI.PDF,BIN,1274844","SCH5B13A.PDF,BIN,296589",
"Documents,FOLD,0","Lists,FOLD,0","Videos,FOLD,0",
"profile0.profile,PROF,264"

 

MMEM:CAT? "USER"

"LST_2_3.CSV,BIN,88","FERY2.PDF,BIN,2443"

Errors

-250,"Mass storage error"

-251,"Missing mass storage"

-252,"Missing media"

-256,"File name not found"

Related Commands

MMEMory:CATalog:LENgth?

MMEMory:INFOrmation?

MMEMory:DATE?

MMEMory:TIME?

5.11.2. MMEMory:CATalog:LENgth

Syntax

MMEMory:CATalog:LENgth? [<directory>]

Description

This command returns the number of items in the current or specified directory (folder). The result corresponds to the number of files returned by the MMEMory:CATalog? command.

Parameters

Name

Type

Range

Default

<directory>

Quoted string

Directory name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Return

The query command returns number (NR1) of items (files and directories).

Usage example

MMEM:CAT:LEN? "USER"

2

Errors

-256,"File name not found"

Related Commands

MMEMory:CATalog?

5.11.3. MMEMory:CDIRectory

Syntax

MMEMory:CDIRectory {<directory>}

MMEMory:CDIRectory?

Description

Changes the current directory to the specified directory (folder). This directory must exist otherwise an error will be generated.

 

At *RST, this value is set to the root path.

Parameters

Name

Type

Range

Default

<directory>

Quoted string

Directory name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Return

This query returns the full path of the current directory.

Usage example

MMEM:CDIR "TEST/Test folder2"

MMEM:CDIR?

"TEST/Test folder2"

Errors

-256,"File name not found"

Related Commands

*RST

MMEMory:CATalog?

MMEMory:MDIRectory

MMEMory:RDIRectory

5.11.4. MMEMory:CLOSe

Syntax

MMEMory:CLOSe

Description

Not implemented yet

 

Use this command to close the selected file specified in NAME. An attempt to CLOSe a file that was not open generate an error.

 

This command is included only for compatibility with the SCPI standard and may not be used.

Usage example

MMEM:CLOS

Errors

-256,"File name not found"

Related Commands

*RST

MMEMory:NAME

MMEMory:OPEN

5.11.5. MMEMory:COPY

Syntax

MMEMory:COPY {<source>}, {<destination>}

Description

Makes a copy of an existing file in the current directory. The file names must include any file extension.

If <destination> is a file name, the copy file is created in the current directory. When <destination> is a <path> (e.g. “test lists/test022”) the source file is duplicated in <current directory>/<path>.

Parameters

Name

Type

Range

Default

<source>

Quoted string

Source file name, 1 to 255 characters

<destination>

Quoted string

Copy file name or directory name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Usage example

MMEM:COPY "test.bin", "new2/test_new.bin"

Errors

-253,"Corrupt media"

-254,"Media full"

-256,"File name not found"

-258,"Media protected"

Related Commands

MMEMory:CATalog?

MMEMory:CDIRectory

MMEMory:LOCK

MMEMory:MDIRectory

MMEMory:MOVE

5.11.6. MMEMory:DATE

Syntax

MMEMory:DATE? {<filename>}

Description

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

Parameters

Name

Type

Range

Default

<filename>

Quoted string

File name or directory name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Return

Comma-separated numbers (NR1) of year, month, day formated as yyyy, mm, dd

Usage example

MMEM:DATE? "test.002"

2017, 10, 1

Errors

-256,"File name not found"

Related Commands

MMEMory:TIME

5.11.7. MMEMory:DELete

Syntax

MMEMory:DELete {<filename>}

Description

Use this command to delete a file in the current directory. If SD card is locked using the MMEMory:LOCK command, an error -258 will be generated.

Parameters

Name

Type

Range

Default

<filename>

Quoted string

File name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Usage example

MMEM:DEL "test.002"

Errors

-256,"File name not found"

-258,"Media protected"

Related Commands

MMEMory:CATalog?

MMEMory:CDIRectory

MMEMory:RDIRectory

MMEMory:LOCK

5.11.8. MMEMory:DOWNload:ABORt

Syntax

MMEMory:DOWNload:ABORt

Description

Use this command to abort currenlty running file transfer from the host initiated with the MMEMory:DOWNload:DATA command. If not active file transfer exists, the command will be ignored without generating any error.

Usage example

MMEM:ABOR

Related Commands

MMEMory:DOWNload:DATA

5.11.9. MMEMory:DOWNload:DATA

Syntax

MMEMory:DOWNload:DATA {<block>}

Description

Downloads data from the host computer or a script running on the instrument to a file on the SD card. This is a multiple steps process:

  • The filename must have been previously specified by MMEMory:DOWNload:FNAMe.
  • Optionally: Specify the filesize to be transferred with MMEMory:DOWNload:SIZE
  • The data can be transferred in single or more blocks. Receiving of first block will erase all previously stored, and each consecutive block will be appended to the end
  • Download is finished when MMEMory:DOWNload:FNAMe with empty name was sent

Use MMEMory:INFOrmation? command first to check available space.

Parameters

Name

Type

Range

Default

<block>

Data block

Usage example

Downloads text Hello world and store into the file "test file" in the current directory. Digit 2 denotes two digits of data length (11).

MMEM:DOWN:FNAM "test file"

MMEM:DOWN:SIZE 11

MMEM:DOWN:DATA #211Hello world

MMEM:DOWN:FNAM ""

Errors

-253,"Corrupt media"

-254,"Media full"

-258,"Media protected"

Related Commands

MMEMory:DOWNload:FNAMe

MMEMory:INFOrmation?

MMEMory:LOCK

5.11.10. MMEMory:DOWNload:FNAMe

Syntax

MMEMory:DOWNload:FNAMe {<filename>}

Description

Creates or opens the specified filename prior to writing data to that file with MMEMory:DOWNload:DATA. If a file was already opened, it will be closed first and the new file will be opened. After writing the data with this command must be sent again with either an empty name to close the file or with a new filename to close the current open file and open the new filename.

 

See the example in the MMEMory:DOWNload:DATA command.

 

Parameters

Name

Type

Range

Default

<filename>

Quoted string

File name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Usage example

MMEMory:DOWNload:FNAMe "new_list.bin"

MMEMory:DOWNload:FNAMe ""

 

Errors

-258,"Media protected"

Related Commands

MMEMory:DOWNload:DATA

5.11.11. MMEMory:DOWNload:SIZE

Syntax

MMEMory:DOWNload:SIZE {<filesize>}

Description

This command define filesize used by progress bar displayed on the local console during the file transfer. If filesize is not provided, progress bar will not be displayed.

Parameters

Name

Type

Range

Default

<filesize>

NR1

0 to 2.147.483.648 (2 GiB) as limited by SD Card FAT

0

Usage example

MMEMory:DOWNload:SIZE 124000

Related Commands

MMEMory:DOWNload:DATA

MMEMory:DOWNload:FNAMe

5.11.12. MMEMory:FEED

Syntax

MMEMory:FEED

MMEMory:FEED?

Description

Not implemented yet

 

Use this command to set data handle used to feed data into the file specified by MMEMory:NAME command. The data handle is fixed to HCOPy. This command is included only for compatibility with the SCPI standard, and may not be used.

Return

The command returns data handle name (that is fixed to HCOPy).

Usage example

MMEM:FEED?

HCOP

Related Commands

HCOPy:DESTination

5.11.13. MMEMory:INFOrmation

Syntax

MMEMory:INFOrmation?

Description

Use this command to find out total amount of storage currently used and storage available on the SD card. The sum of that two amounts represents SD card capacity in bytes.

Return

The command returns used space and free space as two comma separated integers.

Usage example

MMEM:INFO?

3932160,7732461568

Related Commands

MMEMory:DOWNload:DATA

5.11.14. MMEMory:LOAD:LIST

Syntax

MMEMory:LOAD:LIST<n> {<filename>}

Description

Load stored LIST program from SD card location defined by <filename> to the channel defined with <n>.

Parameters

Name

Type

Range

Default

<filename>

Quoted string

File name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Usage example

MMEM:LOAD:LIST1 "DC_DC conv testing.list"

MMEM:LOAD:LIST2 "DC_DC conv testing.list"

TRIG:SOUR BUS

INIT

*TRG

Errors

-200,"Execution error"

-256,"File name not found"

Related Commands

MMEMory:STORe:LIST[<n>]

[SOURce[<n>]]:LIST:COUNt

[SOURce[<n>]]:LIST:CURRent[:LEVel]

[SOURce[<n>]]:LIST:DWELl

[SOURce[<n>]]:LIST:VOLTage[:LEVel]

5.11.15. MMEMory:LOAD:PROFile

Syntax

MMEMory:LOAD:PROFile {<filename>}

Description

This command loads data from user profile file to the user profile 0.

Parameters

Name

Type

Range

Default

<filename>

Quoted string

File name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Usage example

MMEM:LOAD:PROF "old settings.profile"

Errors

-256,"File name not found"

Related Commands

*RCL

*SAV

MEMory:STATe:RECall:AUTO

MMEMory:STORe:PROFile

5.11.16. MMEMory:LOCK

Syntax

MMEMory:LOCK {<password>}

MMEMory:LOCK?

Description

Use this command to enable write protection of SD card. All writing, deleting or modifying attempts on files or directories will generate an error if SD card is locked.

Parameters

Name

Type

Range

Default

<password>

Quoted string

System password (4 to 16 characters)

Return

This query returns 0 if SD card is unlocked, or 1 if SD card is locked.

Usage example

MMEM:LOCK "test123"

MMEM:LOCK?

1

Errors

122,"Invalid sys password"

Related Commands

MMEMory:UNLock

SYSTem:PASSword:NEW

5.11.17. MMEMory:MDIRectory

Syntax

MMEMory:MDIRectory {<directory>}

Description

This command creates a new directory. If directory=<path>, this command creates a <current directory>/<path> directory.

Parameters

Name

Type

Range

Default

<directory>

Quoted string

Directory name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Usage example

MMEM:MDIR "test folder"

Errors

-258,"Media protected"

Related Commands

MMEMory:CDIRectory

MMEMory:RDIRectory

5.11.18. MMEMory:MOVE

Syntax

MMEMory:MOVE {<source>}, {<destination>}

Description

This command moves or renames an existing file. If destination is a file name, the source file is renamed to the new file name in the current directory. When destination=<path>, the source file is moved to <current directory>/<path>.

 

Error occurs if the source file does not exist or the destination file already exists.

Parameters

Name

Type

Range

Default

<source>

Quoted string

Source file name, 1 to 255 characters

<destination>

Quoted string

New file name or directory name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Usage example

Rename file:

MMEM:MOVE "old name","new name"

Move file from current directory to “/Test” directory:

MMEM:MOVE "new name","/Test/new name"

Move and rename file:

MMEM:MOVE "/Test/new name","/Documents/new doc"

Errors

-256,"File name not found"

-258,"Media protected"

Related Commands

MMEMory:CDIRectory

MMEMory:COPY

5.11.19. MMEMory:MDIRectory

Syntax

MMEMory:MDIRectory {<directory>}

Description

This command creates a new directory. If directory=<path>, this command creates a <current directory>/<path> directory.

Parameters

Name

Type

Range

Default

<directory>

Quoted string

Directory name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Usage example

MMEM:MDIR "test folder"

Errors

-258,"Media protected"

Related Commands

MMEMory:CDIRectory

MMEMory:RDIRectory

5.11.20. MMEMory:NAME

Syntax

MMEMory:NAME {<filename>}

MMEMory:NAME?

Description

Not implemented yet

 

This command specifies the name of the file used by MMEMory:OPEN and MMEMory:CLOSe commands.

Parameters

Name

Type

Range

Default

<filename>

Quoted string

File name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Return

This query returns the name of the file that can be used by MMEMory:OPEN and MMEMory:CLOSe commands.

Usage example

MMEM:NAME "screenimg.png"

MMEM:NAME?

Screenimg.png

Errors

-257,"File name error"

Related Commands

MMEMory:CLOSe

MMEMory:OPEN

5.11.21. MMEMory:OPEN

Syntax

MMEMory:OPEN

Description

Not implemented yet

 

Use this command to open the file specified in NAME.

 

This command is included only for compatibility with the SCPI standard and may not be used

Usage example

MMEM:OPEN

Errors

-256,"File name not found"

Related Commands

*RST

MMEMory:CLOSe

MMEMory:NAME

5.11.22. MMEMory:STORe:LIST

Syntax

MMEMory:STORe:LIST<n> {<filename>}

Description

Store LIST program of channel defined with <n> to SD card location defined by <filename>. Stored file type will be TRAC. Default file extension is .list

Parameters

Name

Type

Range

Default

<filename>

Quoted string

File name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Usage example

MMEM:STOR:LIST1 "DC_DC conv testing.list"

Errors

-258,"Media protected"

Related Commands

MMEMory:LOAD:STATe

[SOURce[<n>]]:LIST:COUNt

[SOURce[<n>]]:LIST:CURRent[:LEVel]

[SOURce[<n>]]:LIST:DWELl

[SOURce[<n>]]:LIST:VOLTage[:LEVel]

5.11.23. MMEMory:STORe:PROFile

Syntax

MMEMory:STORe:PROFile {<filename>}

Description

This command stores the BB3 state (i.e. user profile 0) to SD card location defined by <filename>. Stored file type will be STAT. Default file extension is .conf

Parameters

Name

Type

Range

Default

<filename>

Quoted string

File name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Usage example

MMEM:STOR:PROF "Both channels 5V_3A.profile"

Errors

-258,"Media protected"

Related Commands

*RCL

*SAV

MEMory:STATe:RECall:AUTO

MMEMory:LOAD:PROFile

5.11.24. MMEMory:TIME

Syntax

MMEMory:TIME? {<filename>}

Description

Returns the (hours, minute, seconds) that the specified file was last saved.

Parameters

Name

Type

Range

Default

<filename>

Quoted string

File name or directory name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Return

Comma-separated numbers (NR1) of hours, minute, seconds formatted as hh, mm, ss

Usage example

MMEM:TIME? "test.002"

22, 10, 14

Errors

-256,"File name not found"

Related Commands

MMEMory:DATE

5.11.25. MMEMory:UNLock

Syntax

MMEMory:UNLock {<password>}

Description

Disable write protection of SD card activated by the MMEMory:LOCK command.

Parameters

Name

Type

Range

Default

<password>

Quoted string

System password (4 to 16 characters)

Usage example

MMEM:LOCK?

1

MMEM:UNL "test123"

MMEM:LOCK?

0

Errors

122,"Invalid sys password"

Related Commands

MMEMory:LOCK

SYSTem:PASSword:NEW

5.11.26. MMEMory:UPLoad

Syntax

MMEMory:UPLoad? {<filename>}

Description

This command uploads the contents of a file on the SD card from the instrument to the host computer or a script running on the instrument.

The format for <file> is "[<path>]<file_name>", where <path> must be an absolute folder path. If <path> is omitted, the folder specified by the MMEMory:CDIRectory command is used. Absolute paths begin with a "\" or "/" and start at the root folder of SD card.

Parameters

Name

Type

Range

Default

<filename>

Quoted string

File name or directory name, either / (slash) or \ (backslash) can be used as the path separator. 1 to 255 characters

Return

The query returns the file contents are returned as an IEEE 488.2 definite-length block.

Usage example

MMEM:UPL? "test file"

#211Hello world

Errors

-257,"File name error"

Related Commands

MMEMory:DOWNload:DATA

 

Join Waitlist We will notify you when the product is available. Please leave your valid email address below.