TRG Command

Applies to: ALL modes. The IN and OUT submodes apply only in DLOG and OSC modes, GATE only in DMM mode.

The CT-BOX has two external trigger signals (trigger in and trigger out), which can be used to synchronize the acquisition of different CT-BOX units, or to relate the acquisition to an external event (triggered acquisition). Trigger in signal has two modes: rising edge and GATE. Trigger out signal has just one mode: rising edge.

The TRG command is available in all modes, but each trigger submode can only be used in specific modes of operation:

Submode

OSC

DLOG

DMM

TRG:IN

✓

✓

–

TRG:OUT

✓

✓

–

TRG:GATE

–

–

✓

TRG:OFF

✓

✓

✓

If a submode is selected in a mode of operation where it is not available, the unit replies with NAK:27 (Trigger mode is not valid; see List of the Error Codes).

Changing the mode of operation with MODE affects the trigger setting as follows:

New mode

Trigger setting

MODE:DMM

All triggers are disabled (TRG:OFF)

MODE:DLOG

TRG:GATE is disabled (TRG:OFF); TRG:IN / TRG:OUT are kept

MODE:OSC

TRG:GATE is disabled (TRG:OFF); TRG:IN / TRG:OUT are kept

After a mode change, check the trigger setting with TRG:? and set it again if needed (e.g. TRG:GATE after MODE:DMM).

The trigger submode cannot be changed while the CT-BOX is acquiring data; the unit replies with NAK:6. Stop the acquisition with ACQ:OFF first.

To exit the triggered acquisition mode, use TRG:OFF.

Command Format:

R/W

Command

Response

Description

W

TRG:IN

ACK / NAK:x

Set the trigger as input in rising edge mode

W

TRG:OUT

ACK / NAK:x

Set the trigger as output

W

TRG:OFF

ACK / NAK:x

Disable the trigger function

W

TRG:GATE

ACK / NAK:x

Set the trigger as input in GATE mode

R

TRG:?

IN / OUT / GATE / OFF

Read the trigger status

Trigger Input (DLOG and OSC modes)

To relate the acquisition to an external event it is necessary to enable the trigger input with TRG:IN. This trigger mode can only be used in DLOG and OSC operation modes and its behaviour depends on the mode of operation:

DLOG mode: the CT-BOX waits for a rising edge of the trigger input signal to start the acquisition. The device does not start acquiring immediately after ACQ:ON, but waits for a trigger pulse. When the device receives a rising edge on the trigger input signal, it starts the data acquisition over the selected period and then returns the averaged acquisition of that period. Once the acquisition is finished, the unit waits for a successive rising edge on the trigger input to start the next acquisition. A rising edge that arrives while an acquisition is still running has no effect.

TRG:IN
ACK

ACQ:ON
ACK

<trigger edge>
1 00 -10.1234567

<trigger edge>
2 00 -10.1234587

OSC mode: the device starts acquiring immediately after the ACQ:ON command, and the rising edge of the trigger input resets the sequence number to 1.

TRG:IN
ACK

ACQ:ON
ACK
0x000001 0x00 0x41200000
0x000002 0x00 0x41200000
.........
0x0007F8 0x00 0x41500000

<trigger edge>
0x000001 0x00 0x41400000
0x000002 0x00 0x41300000
.........

Trigger GATE (DMM mode only)

TRG:GATE synchronizes acquisition with an external gate signal. This mode is only available in DMM operation mode.

  • While the gate is high, the CT-BOX acquires samples.

  • On the falling edge, it computes the Average / RMS and sends one result frame while the gate is low.

Acquisition always starts on a rising edge of the gate. If the gate is already high when ACQ:ON is sent, the CT-BOX ignores the current gate pulse and waits for the next rising edge.

The gate high time (TON) must match the configured acquisition window:

TON = DMM:NOP / DMM:FREQ   (tolerance ±2%)

where DMM:NOP is the number of periods and DMM:FREQ the grid / signal frequency. The gate period may vary freely, as long as TON stays within tolerance and TOFF respects the minimum below.

If TON is outside tolerance, the result is still sent, but the measured value contains a large error. The CT-BOX gives no warning, so the user must make sure the gate timing is correct.

Parameter

Value

TON

DMM:NOP / DMM:FREQ ±2%

TON min

1 / DMM:FREQ (i.e. NOP = 1)

Gate-high timeout

95 s (safety cap, see below)

TOFF min

1 ms (processing + transmission)

TOFF max

unlimited

Note

The gate-high timeout is a safety cap: if the gate stays high for 95 s, the acquisition is stopped and the CT-BOX waits for the next rising edge of the gate signal.

In the following example, user sets DMM:FREQ = 50 Hz and DMM:NOP = 10, so TON must be 200 ms ±2%

DMM:FREQ:50
ACK

DMM:NOP:10
ACK

TRG:GATE
ACK

ACQ:ON
ACK

<gate high – acquiring for 200 ms>
<gate low>
1 00 0.0012345

<gate high – acquiring for 200 ms>
<gate low>
2 00 0.0001321
.........

Trigger Output (DLOG-OSC modes)

The CT-BOX can also generate a trigger signal (TRG:OUT). This trigger signal can be used by other CT-BOX units as their trigger input signal, thus synchronizing the acquisition of every CT-BOX. This trigger mode can only be used in DLOG and OSC operation modes (it is not available in DMM mode) and its behaviour depends on the mode of operation:

Mode

Trigger out signal

DLOG

Short pulse, repeated at the set output data frequency (see FREQ)

OSC

Square wave, fixed at 10 Hz with duty cycle 50%

TRG:OUT
ACK