SAVE Command

Applies to: DLOG-DMM modes. Can be set and read in any mode; takes effect only in DLOG and DMM modes.

The SAVE command enables or disables saving the measured data to the external SD card. Data is saved only in DLOG and DMM modes: SAVE can also be set in OSC mode, but no data is saved there, because the acquired data quantity is too large to be transferred onto the SD card.

Saving to the SD memory card is enabled as soon as the command SAVE:ON is received; a disable command SAVE:OFF has to be sent in order to stop the data saving function.

Command Format:

R/W

Command

Response

Description

W

SAVE:ON

ACK / NAK:x

Enable saving to the SD card

W

SAVE:OFF

ACK / NAK:x

Disable saving to the SD card

R

SAVE:?

ON / OFF

Read the saving configuration

Warning

The SD card must be mounted before starting the acquisition with the SAVE function enabled; see the SD:MOUNT command.

Note

If an error happens during the data saving (for example the SD card is full, or an SD card write error occurs), SAVE is automatically stopped, the relative error condition is signalled in the Error register and the Error condition bit is set in the Status register. This error does not affect the acquisition. To resume the saving, the acquisition has to be stopped and the fault solved; at this point SAVE can be enabled again.

File Format

Every ACQ:ON with SAVE:ON creates a new text file (see File Naming). The file starts with a header, which records the settings of the acquisition, followed by the DATA: line and then one line per acquisition. Lines end with \r\n.

The header contains the following lines, in this order:

Line

Mode

Content

NAME: <name>

both

CT-BOX name (see CTBOX:NAME)

DATE: <yy>.<mm>.<dd>

both

Date of the ACQ:ON, year first (see DATE)

TIME: <hh>:<mm>:<ss>

both

Time of the ACQ:ON (see TIME)

FREQ: <f> Hz

DLOG

Output data rate, one decimal (see FREQ)

DMM: <AC/DC/ACDC>

DMM

Measurement type (see DMM)

DMM:FREQ: <f> Hz

DMM

Grid / signal frequency, two decimals (see DMM)

DMM:NOP: <n>

DMM

Number of periods (see DMM)

PTURNS: <n>

both

Number of primary turns (see PTURNS)

ACQT: <e><h>

DLOG

Temperature fields: <e> is 1 if the external sensor is acquired, <h> is 1 if the DCCT is (see ACQT)

Note

The digits of the ACQT: header line are in the opposite order to the first two digits of the ACQT command: the header reports the external sensor first.

The acquisition lines have the same format as the DLOG and DMM printout (see Data Representation): sequence number, status code, current and, in DLOG mode, the optional temperatures.

To speed up the writes to the SD card, the DATA: line and each acquisition line are padded with spaces to a multiple of 4 bytes, before the final \r\n. Remove the trailing spaces before parsing a line.

Example: a DLOG file with both temperature fields enabled (␣ marks a padding space):

NAME: CT-BOX
DATE: 26.08.25
TIME: 23:12:14
FREQ: 10.0 Hz
PTURNS: 1
ACQT: 11
DATA:␣␣␣
1 23 0.0000397 -9999.0 -9999.0␣␣␣␣
2 23 -0.0000431 -9999.0 -9999.0␣␣␣
3 23 -0.0000704 -9999.0 -9999.0␣␣␣

Example(s):

SAVE:ON
ACK

SAVE:?
ON