Data Representation

The data representation depends on several parameters, such as the acquisition mode and other related settings. The various representations are described in detail hereafter.

OSCILLOSCOPE Mode

In this mode of operation the data output rate can be reduced by setting the desired averaging interval in microseconds (see the TS command). The output transfer rate can thus be set from 1 to 100 000 sps.

In order to optimize the communication bandwidth and to reduce the computational time required to elaborate the received data, an acquisition is represented in binary format. Binary representation improves the data transmission rate, as it avoids the overhead due to the ASCII format conversion and reduces the amount of sent data.

Every acquisition at the selected output data rate is represented with three numbers, of fixed length of 64 bits (8 bytes) in total:

Field

Width

Format

Sequence number

24-bit int

Unsigned binary

Status code

8-bit

See Status Code

Current measurement

32-bit

IEEE 754 single-precision floating point

0x01 0203   0x00   0x0A0B 0C0D
 ^sequence   ^status  ^current

Important

The sequence number and the current measurement are sent least significant byte first. In the example above, the datagram socket would actually read the data from the receiving buffer in the following order:

0x03 0x02 0x01 0x00 0x0D 0x0C 0x0B 0x0A

The first 24-bit number (3 bytes) is the sequence number, starting from #1 (0x00 0001), which is reset at every acquisition (the acquisition is started and terminated by the ACQ command). This number is represented in unsigned binary format, so for example 0x00 001F represents acquisition #31.

The fourth byte is the status code of the CT-BOX (see below).

The last 32 bits (4 bytes) indicate the measured current in Ampere [A], represented as a single-precision floating point number (IEEE 754); for example the hexadecimal value 0x4120 0000 represents +10 A.

Note

This is the only possible representation in OSC mode. The output data rate is settable using the TS command. In this mode of operation the data can only be sent to the communication stream: data saving to the SD card is not allowed, due to the high acquisition speed.

Status Code

The status-code byte transmitted with every acquisition (in all OSC, DLOG and DMM modes) has the following bit meanings (#8 is the MSB):

Status Code Bit #

Bit Name

Description

#1

Error

CT-BOX is not acquiring correctly

#2

DCCT Fault

The DCCT has experienced a fault

#3

Buffer Overrun

The CT-BOX cannot send data to the host computer

#4

SD-Card Full

The SD-Card is full and no data can be saved

#5

SD Error

General SD-Card error

#6

ADC Temp OK

The temperature of the CT-BOX is OK

#7

Alarm

The current is outside the limits (see ALARM)

#8

Alarm Direction

If this bit is high the current is over the limit, if low it is under the limit

Note

This per-acquisition status code is not the internal Status Register read with STATUS:?; the latter is a 32-bit register described in Status Register.

DATA-LOGGER Mode

This mode of operation is suitable for longer data acquisitions with a lower output data rate. The acquisitions are represented in ASCII with three numbers separated by a space character \s, and every acquisition is terminated with the carriage return / line feed sequence \r\n:

12245\s00\s-12.4567877\r\n
  • 12245 is the acquisition sequence number, in ASCII decimal format;

  • 00 is the status code, in ASCII hexadecimal format (see Status Code);

  • -12.4567877 is the measured current, in ASCII decimal format, in Ampere [A].

Due to the lower output data rate, it is possible to acquire not only the measured current but also additional temperature information (optional fields). For this reason, the data representation also depends on the number of additional temperature fields (none, one or two), selectable with the ACQT command. The values are again separated by a space \s and every acquisition is terminated with \r\n.

The following example shows an acquisition with two temperature fields enabled:

12245\s00\s-12.4567877\s45.7\s27.8\r\n
  • the first field is the acquisition sequence number, in ASCII integer decimal representation; this value is reset at every acquisition start;

  • the second field is the 8-bit status of the CT-BOX, as described above;

  • the third, fourth and fifth fields are the measurements, in ASCII fractional decimal representation: the current in Ampere [A] and the optional temperature(s) in degrees Celsius [°C].

Note

The acquisitions in DLOG mode have a variable character length. For additional information regarding the optional temperature fields, see the ACQT command.

DIGITAL-MULTIMETER Mode

DMM mode allows the CT-BOX to operate as a digital multimeter. The acquisitions are represented in ASCII with three numbers separated by a space character \s, and every acquisition is terminated with the carriage return / line feed sequence \r\n:

12245\s00\s-12.4567877\r\n
  • 12245 is the acquisition sequence number, in ASCII decimal format;

  • 00 is the status code, in ASCII hexadecimal format (see Status Code);

  • -12.4567877 is the measured current, in ASCII decimal format, in Ampere [A].

Note

This is the only possible representation in DMM mode. The output data rate is settable using the DMM command. In this mode of operation data saving to the SD card is allowed, but no temperature data is acquired.