In development. It changes without notice.
The meter's SCPI command set
The instrument speaks SCPI-1999 over its CH343 serial line: 6,000,000 baud, 8N1, no flow control, one program message per line. This page is the protocol: the grammar, every command, every response, the error numbers, the stream records, the deviations from SCPI-1999, and how each command of the console protocol that came before it maps to the new one. The firmware that implements it is firmware/
Contents
- Quick reference
- The line
- Grammar
- Responses
- Errors and status
- Command reference
- Captures and the stream
- Deviations from SCPI-1999
- Old console command to SCPI
Quick reference
What a QA session sends, in the order it sends it. Every message a host sends ends in ;:SYST:ERR:ALL?, which is left out of the table: it answers 0,"No error", or the reason of each refusal ("The error queue"), and it is the only answer a message of commands alone gives. Each header is in its short form; Command reference has it whole, with its flags. What to do when an answer is not the one here is in the troubleshooting page.
| To | Send | Comes back |
|---|---|---|
| check the line | \n, then *ESR? | 0; with bit 7 (128) set, the instrument rebooted since it was last asked (The line) |
| start with an empty queue | *CLS | nothing |
| know the instrument | *IDN?, SYST:INF? | its serial and version; chip=ina228, the image= and its elf=, q= |
| know that it is well | SYST:HEAL?, *TST? | reset=, uptime_us=, the counts that must be 0; 0 |
| know what calibration it holds | CAL:DATA? | the shunt and the null of each range, the tag and the date (CALibration) |
| know the pins it drives | SYST:PINS? | each role's GPIO, where the map came from, the board table's digest (The pin map) |
| know the circuit | ROUT:STAT? | path=shunt, the one a capture measures on (ROUTe) |
| choose a profile | SENS:PROF SLE, SENS:PROF:REP? | nothing; its period and its conversions |
| choose a range | SENS:CURR:RANG:IND 0, SENS:CURR:RANG:REP? | nothing; its ceiling and the null's q= there |
| take the null | ROUT:NULL ON, ROUT:RES? | nothing; path=bypass, check= |
| CAL:ZERO 60 | nothing: the window is open, and the 60 s are the host's to wait | |
| ABOR, CAL:ZERO:RES? | nothing; offset_pv=, stored=1 | |
| ROUT:NULL OFF, ROUT:RES? | nothing; path=shunt | |
| take one figure | MEAS:CURR?, MEAS:VOLT?, MEAS:POW? | amperes, volts, watts, the mean of SAMP:COUN? samples |
| choose what is streamed | SENS:FUNC:ON "CURR","VOLT" | nothing; SENS:FUNC:ON:DEF goes back to the profile's own |
| keep the statistics alone | SENS:CAPT STAT | nothing; SENS:CAPT DATA streams or fills the ring again |
| allow BURST | SYST:COMM:I2C:FREQ 1000000 | nothing; *RST puts the pin map's boot clock back, 400 kHz by default |
| start a capture | INIT, FETC:HEAD? | nothing; what the samples are converted with (The capture header) |
| look while it runs | SYST:STAT? | samples=, dropped=, read_err=, the last reading |
| mark a moment | TRAC:MARK "wake" | nothing but the mark's record in the stream |
| end it | ABOR, FETC:STAT? | nothing; the figures of the whole window, and its q= |
| read a ring out | TRAC:POIN?, TRAC:DATA? RAW | how many samples it holds; the block, held to its CRC-32 (The ring dump) |
| cut the DUT's battery for a moment | ROUT:LEAD:CYCL 2000,FORC | nothing; the instrument recloses it |
| leave it at rest | *RST, ROUT:STAT?, SYST:STAT? | nothing; path=shunt; running=0 sink=idle |
A worked session
The bench, 2026-11-24, firmware 0.17.0, a T-Deck asleep on its battery as the DUT: the check, a null, a STATE capture with a mark, the end state. > is what the host sent and < what it read, one line each; ... inside an answer and a ... line stand for what is left out, and the host waited 61 s between CAL:ZERO and its ABOR. check=unverified is what a DUT under 2 mA gives. A report that ends in ... is one to which a later version appended keys (0.18.0: the pin map's and the averaging override's). The messages run on the simulator too, whose answers have these keys (host/
The line
- Open the port with the lines as the OS leaves them, then release RTS, then DTR: the carrier's two transistors pull EN low for one line state only, DTR released while RTS is still asserted (docs/
carrier-board.md §7). Setting both lines before the open does not keep that order: pyserial 3.5 applies DTR first and RTS second inside open(), which passes through the reset. A client that reboots the instrument on open finds *ESR? reporting 128 (power on). - Check the line before the first message. Send a bare \n (it ends any partial line and is no message), drain what the line holds, then ask *ESR? with short timeouts until it answers: a booting instrument discards everything it receives, and its boot runs a PSRAM test first. Bit 7 of the answer says the instrument rebooted since the register was last read; *ESR? clears it, so ask it once, before *CLS. Drain again after the answer, so that a late reply to an earlier attempt is not read as the next response. The reference client does this in Meter.wait_
ready(), and its command line before any message. - Every program message ends in \n (\r is accepted too). At most 255 bytes; a longer one is discarded to its newline and queues -363. A message holds printable ASCII and tabs only: a byte below 0x20 (other than a tab) or above 0x7E discards the whole message to its newline and queues -101, which names the byte in hex and never echoes it (0.6.0 and later).
- While a command holds the console (a dump, an acquisition, a relay settle), what the host sends waits in a 1,024-byte receive ring and the UART's 128-byte receive FIFO behind it, 1,152 bytes, and in the console's own 1,024-byte inbox during an acquisition. Input the ring and the FIFO could not hold is lost: the console queues -363 (receive overrun) and discards the message the loss fell in (0.6.0 and later), one error for that message however many times the FIFO overflowed before it ended (0.17.0 and later; until then a dump, which looks for a loss at every row, queued one for each overflow it found).
- Nothing is printed at boot. A reboot shows as the power-on bit of *ESR?, and any bring-up failure as an error in the queue.
Grammar
A program message is one or more units separated by ;. A unit is a header, optional whitespace, and parameters separated by ,.
- Mnemonics are case-insensitive and take the long form or the short form (the upper-case part in this page): SENSe:PROFile is SENS:PROF, sense:profile or SENSE:PROF.
- Optional nodes are in square brackets: MEASure[:SCALar]:CURRent[:DC]? answers to MEAS:CURR? and to MEAS:SCAL:CURR:DC?.
- Numeric suffixes: ROUTe:RELay3 addresses relay 3. A missing suffix is 1.
- Paths: a header that starts with : starts from the root. One that does not, after a ;, continues from the path of the previous unit (SCPI-1999 vol. 1 §6.2.4): SENS:CURR:RANG:IND 1;REP? is SENS:CURR:RANG:IND 1;:SENS:CURR:RANG:REP?, and SENS:CURR:RANG 1;INDex? is SENS:CURR:RANG 1;:SENS:CURR:INDex?, which is no command (-113): the path is the header less its last node. Common commands (*IDN?) never change the path. A client that is not sure writes the leading : on every unit after the first.
- Parameters:
- numbers in NR1, NR2 or NR3 (60, 0.1, 1.0E-1), decoded exactly into the integer unit the firmware works in, never through a float; integers also as #H40, #Q100, #B1000000;
- booleans ON, OFF, 1, 0;
- character data, long or short form: TRACe, TRAC;
- strings in "..." or '...', a doubled quote standing for one inside.
- Every unit of a message runs, in order, even after one is refused: the refused unit queues an error and changes nothing, and the next unit still runs. That is what lets a client end every message with SYSTem:ERRor:ALL? and always read its verdict.
Responses
- A command (no ?) produces no response. The one output a command makes is a stream record: TRACe:MARK and a LIVE relay move write a mark record (below), which is not a response unit.
- A query produces exactly one response unit. The units of one message are written as one line, joined by ; and terminated by \n.
- Numeric responses are NR1 or NR2 in the SI base unit: amperes, volts, watts, joules, coulombs, ohms, seconds, degrees Celsius. They are written from the device's own integers with no float and no locale, trailing zeros trimmed: MEAS:CURR? answers 0.088066019.
- Report responses (SYSTem:STATus?, FETCh:STATistics?, FETCh:HEADer?, CALibration:DATA? and the other ...? queries this page calls reports) are a list of key=value tokens separated by single spaces, in which no value ever contains a space, a ; or a ". Their values keep the integer units the device computes in, named in the key: _na nanoamps, _pv picovolts, _uohm micro-ohms, _mc milli-degrees Celsius, _us microseconds. A value that does not exist yet is -. Hosts parse them with \b(\w+)=(\S+).
- A block response (TRACe:DATA?) is an IEEE 488.2 definite-length arbitrary block: #, one digit giving the length of the byte count, the byte count, then exactly that many bytes. The bytes are text rows, each ending in \n. The message's \n follows the block, after any further units.
- Stream records (samples, marks) are lines of their own and are never written inside a response. A client tells them apart by their first characters (see the stream).
Errors and status
The error queue
SYSTem:ERRor[:NEXT]? returns the oldest error, SYSTem:ERRor:ALL? all of them oldest first, comma-separated, and SYSTem:ERRor:COUNt? how many are queued. An empty queue answers 0,"No error". Each error is <code>,"<standard text>;<detail>": the detail is the firmware's reason and, where there is one, the command that releases it.
The queue holds 10. On overflow the newest entry is replaced by -350,"Queue overflow".
| Code | Text | When |
|---|---|---|
| 0 | No error | |
| -101 | Invalid character | a byte that is not printable ASCII or a tab; the message is discarded |
| -102 | Syntax error | an empty parameter (1,,2) |
| -104 | Data type error | a number where a word was expected, or the reverse |
| -108 | Parameter not allowed | more parameters than the command takes (the detail says how many it does: SENS:PROF takes at most 1 parameter); nothing is changed. From 0.17.0 for every command; before, only a command that takes none, CALibration:DATE and a unit of more than 8 refused one, and the rest ignored what they did not take |
| -109 | Missing parameter | a parameter the command cannot do without; nothing is changed |
| -113 | Undefined header | no such command, or a query form a command does not have |
| -114 | Header suffix out of range | ROUTe:RELay1, ROUTe:RELay5 |
| -120 | Numeric data error | a malformed number |
| -150 | String data error | an unterminated or overlong string |
| -221 | Settings conflict | a capture is running; a ring profile given channels; a sampler refusal |
| -222 | Data out of range | a value outside its window |
| -224 | Illegal parameter value | a word that is not one of the choices |
| -230 | Data corrupt or stale | nothing to fetch yet; an acquisition cut short |
| -240 | Hardware error | an I2C transaction failed; from 0.18.0 also SYSTem:PINS:DEFault whose record the flash did not take (the default map is live and was not saved (a reboot loads the stored one)) |
| -241 | Hardware missing | the INA228 did not come up (the detail names why); an order for a relay the rig does not wire (0.13.0) |
| -350 | Queue overflow | |
| -363 | Input buffer overrun | a program message longer than 255 bytes; input lost while the console was busy |
| 100 | Relays unavailable | the relay inputs could not be configured at boot |
| 101 | Shunt bypassed | a capture, a measurement or a null on a circuit the shunt does not carry whole |
| 102 | Null not stored | a relay null beyond 50 uV: K1 may not have opened; the stored null stands |
| 103 | Bypass check failed | ROUTe:NULLpath ON saw K2 take no current, or, from 0.18.0, saw the shunt lose all of the DUT's current at K2's step (a lead that opened, not a bypass that closed); the path is released |
| 104 | Lead check failed | ROUTe:NULLpath ON saw the shunt still conduct after K1 opened, or, from 0.18.0, before it moved anything with K1 already open; the path is released |
| 105 | Marks full | 16 marks per capture (TRACe:MARK and LIVE moves; from 0.16.0 two more slots are kept for the hold's own marks, which this never refuses) |
| 106 | Calibration not saved | the calibration record was not written to the flash (a write that failed or did not read back, or a shunt outside 0.05..0.2 Ω, which is never stored): the value is live until reboot. The detail reads calibration write failed (live until reboot) from FW-16 (nvs write failed before) |
| 107 | Sampler not running | the sampling engine failed to start; the sampler task did not acknowledge a stop within 500 ms (ABORt, an acquisition): the window is closed with no result, and a new one is refused with 107 until the task acknowledges; asynchronous from 0.14.0: a running capture took no sample for 2 s ("the sampler took no sample for <n> ms"), once a capture, with QUEStionable TIME set |
| 108 | Null took no samples | |
| 109 | Order disconnects the DUT | K1 open and K2 open, without FORCe |
| 110 | Order bypasses the shunt | under a running capture, without FORCe |
| 111 | Not running | ABORt or TRACe:MARK with no window open |
| 112 | Null window running | a relay order or a reconfiguration while CALibration:ZERO runs, or (flag C) before a null window that ended by itself is closed |
| 113 | Null path released | asynchronous (0.12.0): the hold released a null path left standing (path=bypass) 120 s after the order that left it or its last window closed; the DUT is back on its shunt (ROUTe:NULLpath ON to take it again). From 0.16.0 also under a capture, which no longer suspends the hold: the detail then says under a capture, marked hold: and each move is a mark record ("Stream records") |
| 114 | Lead reclosed | asynchronous (0.13.0): the hold reclosed a lead left open (path=none) 120 s after the order that left it or its last window closed; the DUT has its battery again. From 0.16.0 also under a capture, marked as for 113 |
| 115 | Bypass opened | asynchronous (0.16.0): the hold opened a bypass left closed across a closed lead (path=both) 120 s after the order that left it or its last window closed; the shunt carries the DUT's whole current again (ROUTe:BYPass ON to close it again). Under a capture, marked as for 113 |
| 116 | Relays released by reset | asynchronous (0.16.0), queued at boot: the reset before it (a panic, a watchdog, esp_restart(), a brown-out: any reset that keeps RTC memory) found coils energized and released them all at once, as every boot does. The detail names the reset, the coils and the path they made (a reset (task_wdt) released k1,k2 (path=bypass)): from path=bypass the DUT may have lost its battery for a release time, from path=none it had none. A power-on reports nothing. SYSTem:HEALth? keeps it as reset_ |
| 117 | Pin map reverted | (0.18.0) at boot, asynchronous: the INA228 did not answer on a stored pin map's bus. The detail names that bus and what took its place: the stored bus (sda=18 scl=21 addr=auto) did not answer: the default bus is back (the record is kept) (SYSTem:PINS? reads src=fallback), or ... did not answer and a role holds the default bus pins: no INA228 (src=stored, chip=none; it stands in the place of the -241 the boot would queue). SYSTem:PINS:DEFault is the way back from either. From SYSTem:PINS:APPLy, the one error of a map that was put back: the INA228 did not answer on sda=18 scl=5 addr=auto: the last good map is back, no ALERT edge on GPIO10: the last good map is back, the relays at rest took the dut's current off the shunt (vs_ |
Status registers
| Register | Bits |
|---|---|
| Status Byte (*STB?, *SRE) | 2 error queue not empty, 3 questionable summary, 5 event summary (ESR and ESE), 6 master summary, 7 operation summary |
| Standard Event (*ESR?, *ESE) | 0 operation complete, 2 query error, 3 device-dependent error (-3xx and every positive code), 4 execution error (-2xx), 5 command error (-1xx), 7 power on |
| Operation (STATus:OPERation) | 0 calibrating (a null window is open), 4 measuring (a capture is running) |
| Questionable (STATus:QUEStionable) | 1 current (MATHOF or a shunt limit flag set), 2 time (0.12.0: the open or last capture's pace fell back to the timer, a read failed, or pace_unmet; from 0.14.0 also a running capture that took no sample for 2 s), 8 calibration (the live quality is not cal), 9 data lost (0.12.0: samples of the open or last capture did not reach the host, dropped=), 10 hold (0.16.0: the hold put the relays back to rest under the open or last capture while it sampled, hold_ |
:CONDition? reads a register as it stands now; [:EVENt]? reads the bits that changed through the transition filters since it was last read, and clears them; :ENABle selects which event bits reach the Status Byte. :PTRansition <mask> and :NTRansition <mask> (0.12.0, 0..32767, both registers) choose which edges of a condition bit set its event bit: a rise through PTR (default every bit), a fall through NTR (default none); before 0.12.0 every rise and no fall did. STATus:PRESet clears both enable masks and sets both filters to their defaults; *CLS clears the queue, the ESR and both event registers.
Command reference
Flags: D needs the INA228 (refused with -241 otherwise); R refused while a capture or a null window runs (-221, or 112 for a null window); C also refused while a window that ended by itself (a filled ring, a null window's full count) is not yet closed by ABORt, because the window's closing reads rest on what these commands change: the range, the profile, the CHARGE accumulator, the latched DIAG_ALRT flags (0.6.0 and later; before, SENSe:CHARge:RESet on a filled ring was accepted and zeroed the accumulator between the window's two boundary reads).
How the Command column is written:
- A header is written as the firmware's command table holds it (kCommands in firmware/
src/ console.cpp), with the parameters it takes; one written without parameters takes none. <n> in a header is its numeric suffix. - / joins a setting and its query. The flags are the setting's; the query has none.
- · joins headers that share the row, its flags included.
- A header that starts with : continues the one before it from that one's last required node: after CONFigure[:SCALar]:VOLTage[:DC], :POWer[:DC] is CONFigure[:SCALar]:POWer[:DC].
- <function> in a header is CURRent[:DC], VOLTage[:DC], POWer[:DC], ENERgy or TEMPerature.
tests/
IEEE 488.2 common commands
| Command | Flags | Does |
|---|---|---|
| *IDN? | KLEIDOS,KLEIDOS-METER,<serial>,<firmware version>. The serial (0.4.0 and later) is KM- and ten hex digits, a digest of the factory eFuse MAC (firmware/ | |
| *RST | closes any window without storing it, profile TRACE, range index 0, the I2C clock at the pin map's scl_hz (400 kHz by default; before 0.18.0 always 400 kHz), stream format TEXT, function CURR, default channels, SAMPle:COUNt 100, SENSe:CAPTure DATA, the current threshold OFF and its hysteresis 0 (0.10.0), TRIGger:SOURce IMMediate, TRIGger:LEVel 0, TRIGger:SLOPe POSitive, TRIGger:PRETrigger 0, SENSe:CAPTure:LIMit OFF, threshold marks off (0.11.0), relays to rest (make-before-break: K1 recloses before K2 opens; the spares are not wired from 0.13.0, and a pending ROUTe:LEAD:CYCLe is cancelled). Calibration is untouched, and so are the pin map and its staging (0.18.0: the map is the wiring, not a setting) | |
| *CLS | clears the error queue, the ESR and both event registers | |
| *ESE <n> / *ESE? | event enable, 0..255 | |
| *ESR? | reads and clears the Standard Event register | |
| *SRE <n> / *SRE? | service request enable, 0..255 | |
| *STB? | the Status Byte | |
| *OPC / *OPC? | *OPC sets bit 0 of the ESR when the operation it waits for completes: a window that ends by itself (a ring filling, a triggered ring's post-trigger samples, a capture SENSe:CAPTure:LIMit bounds, a null window) when one is running, from 0.11.0, and at once otherwise; *CLS and *RST forget a pending one. *OPC? answers 1 at once (below, "Deviations") | |
| *WAI | accepted, and immediate: a blocking wait could not be interrupted by ABORt over this line | |
| *TST? | R C | a self-test, 0 when every part passes; otherwise the sum of 1 for the INA228 (it did not come up), 2 for the sampling engine, 4 for the relay inputs, and from 0.12.0 8 for the INA228's identity (MANUFACTURER_ |
SYSTem
| Command | Flags | Does |
|---|---|---|
| SYSTem:ERRor[:NEXT]? | the oldest error | |
| SYSTem:ERRor:ALL? | every error, oldest first | |
| SYSTem:ERRor:COUNt? | how many are queued | |
| SYSTem:VERSion? | 1999.0 | |
| SYSTem:INFormation? | report: model fw chip addr mfg die rev shunt_uohm cal_tag q relays bypass_part serial image elf pins_src pins_table. bypass_part is which part the image drives as the bypass (docs/ | |
| SYSTem:HEALth? | report (0.12.0): reset uptime_us elf fw stack_console stack_sampler allocs_ | |
| SYSTem:STATus? | report: running sink profile period_us pace pace_fallback range samples dropped read_err i_na vbus_uv die_mc die_age_us flags scl_hz q trig. Reads no register, so it is safe under any capture | |
| SYSTem:COMMunicate:I2C:FREQuency <hz> | D R | the INA228 bus, 50000..1000000. BURST needs 1000000 |
| SYSTem:COMMunicate:I2C:FREQuency? | ||
| SYSTem:LED? | report: the carrier's LED, held dark (blanked pixels held and the bring-up report) | |
| SYSTem:PINS? | report (0.18.0): the live pin map, sda scl alert addr scl_hz pull_sda pull_scl pull_alert relay1 relay1_active relay2 relay2_active src verified table (The pin map) | |
| SYSTem:PINS:PENDing? | report: the staged map, the same twelve keys, then valid problem at: valid=1 problem=- at=- for a map that keeps every rule, else valid=0, the first rule it breaks and the key it breaks it at | |
| SYSTem:PINS:STAGe SDA\|SCL\|ALERt\|RELay1\|RELay2,<gpio>\|NONE[,HIGH\|LOW\|UP\|OFF] | stages one role on a GPIO (0..63) or on none; the option is a relay's active level (HIGH, LOW) or a bus or alert pin's internal pull (UP, OFF), and a role given none keeps its own. REL1 and REL2 are the relays' short forms. Changes nothing on the board | |
| SYSTem:PINS:ADDRess AUTO\|<address> | stages the INA228's address: AUTO (a scan of the strap space at boot) or a number, 1..255 (#H41 or 65), which validate() then holds to #H40..#H4F | |
| SYSTem:PINS:CLOCk <hz> | stages the bus clock at boot, any 32-bit number, which validate() then holds to 50000..1000000 | |
| SYSTem:PINS:CLEar | the staged map becomes the live one again | |
| SYSTem:PINS:APPLy | R C | makes the staged map the live one, proves the INA228 on it and saves it, or puts the last good map back with one 117 (below); -221 with a relay off its rest or a staged map that breaks a rule |
| SYSTem:PINS:DEFault | R C | stages and applies the default map, with APPLy's checks; it needs no INA228 and is kept whatever its proof finds |
| SYSTem:PINS:RESult? | report: the last apply since the boot, result reason mfg die tst saved; result is none (none has run), ok, reverted or refused, and reason what failed (below) |
SYSTem:STATus?'s vbus_uv is the bus voltage on the source side of the shunt; the stream's v_mv is the voltage the DUT sees, the same less the burden voltage (docs/
The pin map
From 0.18.0 the instrument reports which GPIO each of its five roles takes, the INA228's SDA, SCL and ALERT, Relay 1 (the DUT's battery lead, GPIO7, active low) and Relay 2 (the shunt bypass, GPIO15, active high), and lets a host stage another map and have it judged. SYSTem:PINS? answers the live map: each role's GPIO, addr (auto, or the pinned address as 0x40..0x4F), scl_hz (the bus clock at boot), the three pulls (up, off), each relay's active level (high, low), src (default, stored or fallback: where the map came from), verified (1 once the relays' wiring has passed a check on this map) and table (0x and the CRC-32 of the board's pin table, firmware/
Staging changes nothing on the board: SYSTem:PINS:STAGe, :ADDRess and :CLOCk each change one field of the staged map, which starts as the live one and becomes it again after SYSTem:PINS:CLEar; each refused unit queues one error and stages nothing. SYSTem:PINS:PENDing? reports the staged map and pinmap::
SYSTem:PINS:APPLy makes the staged map the live one in one checked change. It is refused, and nothing moves, under a window that runs or is not closed (its flags), while a relay is energized or a null path held (-221, a null path is held (path=bypass): ROUTe:NULLpath OFF first, or the relays are not at rest (path=both): put them back first with any other path but shunt), and for a staged map validate() refuses (-221, the staged map breaks a rule: reserved at sda (SYSTem:PINS:PENDing?)). Otherwise, in order: the relays move, each new pin latched at its released level before it is driven and a pin a relay leaves parked toward the level that released it (the pull-up for an active-low relay, the pull-down for an active-high one, until the next boot); ALERT is rebound; the pins no role holds any longer are parked and the bus is opened on its new pins at the map's clock, and the INA228 brought up on it, which resets it: the range in force is put back, and the CHARGE accumulator starts a new window. The map is proved by that bring-up (an address answers, its ID registers, its reset values, its trim memory) and by *TST?'s parts 1, 2, 4, 8, 16, 32 (the ALERT wire) and 64 (the relay pads). A map that passes is saved, the record read back, and is the live one: src=stored, or default for the default map itself, which a reboot then says too. Any failure puts the last good map back the same way, with the bus clock that was running, proves it, and queues exactly one 117; nothing is saved, the staged map stays as it was refused, and SYSTem:PINS:RESult? reads result=reverted. An apply takes 50 to 60 ms on the rig, a revert included (2026-11-25).
SYSTem:PINS:RESult? reports the last apply: reason is -, or no_chip (nothing answers on the map's bus), chip (what answers is not a sound INA228), alert (no edge reaches the ALERT pin), pads (a relay pad is not driven or does not read its level), engine (the sampling engine is not running), save (the flash did not take the record), rest (relays that moved took the DUT's current off the shunt at rest, below), core (the sampler's core refused its half of the move, so the bus did not move), and for a refusal relays or invalid; mfg and die are the ID registers as the bring-up read them, - when nothing answered; tst the self-test's bits on the map that was tried, 0 for a pass, - for a refusal; saved 1 when the map is the newest record. A refusal by the flags changes none of it.
SYSTem:PINS:DEFault stages and applies the default map. It is the way back from the console alone, which no map can take away (no role may take GPIO43 or GPIO44, the console's UART), so it is kept whatever its proof finds: with no INA228 anywhere it answers result=ok reason=no_
A relay pin has no proof but its pad, which reads the level it is driven to whatever it is wired to. So after an apply that moved a relay, ROUTe:STATe? says check=- and SYSTem:PINS? verified=0, the rig's own pins included, until a ROUTe:NULLpath ON ends with check=ok, which needs a DUT that draws 2 mA or more; one that fails its check (103, 104) puts verified back to 0. A boot reads verified=1 for the default map's relays and 0 for any others.
A wrong active level acts at rest. A relay staged with the level that energizes its part (Relay 1 HIGH on the rig's active-low part, Relay 2 LOW on its active-high one) is driven to that level as its released one: Relay 1 then opens the DUT's battery lead and Relay 2 closes the shunt bypass at rest, with path=shunt reported, and a saved map does it again on every boot. So an apply that moves a relay reads the shunt before the move and again after it, 50 ms after the proof, and when the DUT drew 2 mA or more and the shunt kept no more than three quarters of its share (the bypass's part of it, or all of it) the map is put back with one 117 (reason=rest, the two readings in vs_pv=); the DUT is without its battery, or its shunt, for the moment the map was tried. Under the 2 mA floor nothing tells a wrong level from a right one: the apply is kept with verified=0, the DUT stays unfed (or bypassed) at rest and across reboots, and SYSTem:PINS:DEFault is the way back. SYSTem:PINS:DEFault itself is kept whatever this check finds, as it is kept whatever its proof finds.
Under the 2 mA floor ROUTe:NULLpath ON does not judge its steps either and opens K1 whether K2 closed or not, so a Relay 2 staged on a pin it is not wired to leaves the DUT without its battery for as long as the path stands (until ROUTe:NULLpath OFF, or the hold's 120 s); with such a DUT, only a Relay 2 on its own wire may take a null path (the bench's pin map case therefore asks for none on a moved Relay 2 under the floor). From 2 mA its first step must leave the shunt between a sixteenth and three quarters of its share: relays swapped onto each other's wires with matching levels rest released and pass the apply, and the null path's first step then opens the lead instead of closing the bypass, which leaves the shunt nothing and is refused with 103 (the shunt lost all of the dut's current), the path released make-before-break.
At boot the instrument reads the stored map before it drives a pin, releases the relays where it puts them, and brings the INA228 up on its bus. src=default is the default map (no stored record, or one this image does not take), stored the record's, and fallback the record's with the default bus in its own bus's place: a stored bus the INA228 does not answer on falls back to SDA on GPIO4, SCL on GPIO5, both pulls, the address scanned and 400 kHz, when no other role of the map holds those pins, with one error 117 and the record left as it was. When one does, nothing falls back: src=stored, chip=none, the same error in other words, and the console up. ALERT and the relays never fall back by themselves, since nothing tells a wrong pin from an absent part; a part that answers and is not a sound INA228 is reported as the boot always has (-241).
STATus
| Command | Flags | Does |
|---|---|---|
| STATus:OPERation[:EVENt]? · STATus:QUEStionable[:EVENt]? | reads and clears the register's event bits (above, "Status registers") | |
| STATus:OPERation:CONDition? · STATus:QUEStionable:CONDition? | the register as it stands now | |
| STATus:OPERation:ENABle <mask> / STATus:OPERation:ENABle? | the event bits that reach the Status Byte's operation summary, 0..32767 | |
| STATus:QUEStionable:ENABle <mask> / STATus:QUEStionable:ENABle? | the event bits that reach its questionable summary, 0..32767 | |
| STATus:OPERation:PTRansition <mask> / STATus:OPERation:PTRansition? | the condition bits whose rise sets the event bit, 0..32767 (0.12.0) | |
| STATus:OPERation:NTRansition <mask> / STATus:OPERation:NTRansition? | the condition bits whose fall sets it, 0..32767 (0.12.0) | |
| STATus:QUEStionable:PTRansition <mask> / STATus:QUEStionable:PTRansition? | as the OPERation register's, 0..32767 (0.12.0) | |
| STATus:QUEStionable:NTRansition <mask> / STATus:QUEStionable:NTRansition? | as the OPERation register's, 0..32767 (0.12.0) | |
| STATus:PRESet | clears both enable masks and sets both registers' filters to their defaults |
SENSe, SAMPle, FORMat, TRIGger
| Command | Flags | Does |
|---|---|---|
| SENSe:PROFile TRACe\|STATe\|SLEep\|BURSt | D R C | selects the sampling profile (below); resets the channel choice to the profile's default |
| SENSe:PROFile? | TRACE, STATE, SLEEP or BURST | |
| SENSe:PROFile:REPort? | report: profile adc_config period_us vshct_us avg avg_state vbusct_us; from 0.18.0 avg_state is the averaging override (off: the profile's own ADC_CONFIG, as above; on: SENSe:AVERage below), and vbusct_us the bus conversion time, 0 for a profile whose mode does not convert the bus | |
| SENSe:CURRent:RANGe[:UPPer] <amps>\|MIN\|MAX\|DEF | D R C | the smallest range that holds the value: up to 0.4096 A is index 1, up to 1.6384 A index 0. MIN is index 1, MAX and DEF index 0 |
| SENSe:CURRent:RANGe[:UPPer]? | the range's full scale in amperes at the nominal shunt | |
| SENSe:CURRent:RANGe:INDex 0\|1 | D R C | the INA228's ADCRANGE directly: 0 is ±163.84 mV, 1 is ±40.96 mV |
| SENSe:CURRent:RANGe:INDex? | ||
| SENSe:CURRent:RANGe:REPort? | report: range current_ | |
| SENSe:CURRent:SHUNt <ohms> | R | the measured shunt resistance of both ranges, 0.05..0.2 Ω, stored in flash (the calibration record log, from FW-16; NVS before); drops any value a range had of its own and marks the shunt measured. A working copy of the registry's calibration (calibration/ |
| SENSe:CURRent:SHUNt? | the common value, in ohms | |
| SENSe:CURRent:SHUNt:RANGe<n> <ohms> | R | range n's own shunt value (n is 0 or 1 and must be written: -114 otherwise), 0.05..0.2 Ω, stored in flash; marks the shunt measured. A capture on that range converts with it, and its header's shunt_uohm says so |
| SENSe:CURRent:SHUNt:RANGe<n>? | the value range n converts with: its own, or the common one | |
| SENSe:CURRent:APERture <seconds> / SENSe:CURRent:APERture? | D R C | the live profile's shunt conversion time, seconds: the setting (0.18.0) is the averaging override's, one of the INA228's eight (0.00005, 0.000084, 0.00015, 0.00028, 0.00054, 0.001052, 0.002074, 0.00412) to the microsecond, -224 otherwise; the query answers the time the profile converts with |
| SENSe:VOLTage:APERture? | the bus conversion time | |
| SENSe:TEMPerature:APERture? | the die-temperature conversion time | |
| SENSe:AVERage:COUNt <n> / SENSe:AVERage:COUNt? | D R C | the INA228's hardware averaging: the setting (0.18.0) is the averaging override's count, 1, 4, 16, 64, 128, 256, 512 or 1024, -224 otherwise; the query answers the count the profile converts with |
| SENSe:AVERage[:STATe] ON\|OFF / SENSe:AVERage[:STATe]? | D R C | the averaging override of the live profile (0.18.0), a measurement setting, off by default, on every boot and after *RST: off is the profile's own ADC_CONFIG; on, its count and shunt conversion time are the two settings above and the period follows. The query answers 1 or 0; SENSe:PROFile:REPort?'s and the capture header's avg_state say the same ("The averaging override" below) |
| SENSe:FUNCtion:ON "CURR"[,"VOLT"][,"POW"][,"TEMP"] | R | the channels INITiate streams (strings or bare words) |
| SENSe:FUNCtion:ON? | the channels it will stream, e.g. "CURR","VOLT"; "" for a ring profile | |
| SENSe:FUNCtion:ON:DEFault | R | back to the profile's default channels |
| SENSe:CHARge? | D R C | report: the hardware charge accumulator, raw nc_nom dur_us of shunt_uohm osc_tol_ppm |
| SENSe:CHARge:RESet | D R C | clears the accumulators and starts a new window |
| SENSe:CAPTure DATA\|STATistics / SENSe:CAPTure? | R | what INITiate keeps (0.10.0): DATA (the default) streams or fills the ring as the profile does; STATistics keeps the statistics only, on any profile for any duration: no stream line, no ring sample, no line budget, and FETCh:STATistics? at ABORt. The query answers DATA or STAT |
| SENSe:CURRent:THReshold <amps>\|OFF / SENSe:CURRent:THReshold? | R | a current level the next captures count against (0.10.0), -1.6384..1.6384 A, or OFF (the default); the query answers the level in amperes or OFF |
| SENSe:CURRent:THReshold:HYSTeresis <amps> / :HYSTeresis? | R | how far below the level the count falls back, 0..1.6384 A, default 0 (0.10.0). The count rises when a sample reaches the level and falls when one is below the level less the hysteresis |
| SAMPle:TIMer? | the profile's sample period, seconds | |
| SAMPle:COUNt <n> / SAMPle:COUNt? | R | samples one MEASure/READ/CALibration:SHUNt acquisition takes, 1..1000000, default 100. The acquisition itself is refused (-222) when the count times the profile's period exceeds 600 s (0.6.0 and later) |
| FORMat[:DATA] TEXT\|CSV / FORMat[:DATA]? | R | the stream record format |
| TRIGger:SOURce IMMediate\|LEVel / TRIGger:SOURce? | R | what starts a ring capture's record (0.11.0; IMMediate was the only source before): IMMediate, INITiate itself, the ring filling once from the start; LEVel, the current crossing TRIGger:LEVel, the ring running circular from INITiate until it does (below). A level needs a ring profile (TRACE, BURST) and SENSe:CAPTure DATA: INITiate is refused otherwise (-221). MEASure, READ and CALibration take no trigger. The query answers IMM or LEV |
| TRIGger:LEVel <amps> / TRIGger:LEVel? | R | the level, -1.6384..1.6384 A, default 0 (0.11.0) |
| TRIGger:SLOPe POSitive\|NEGative / TRIGger:SLOPe? | R | upwards or downwards through the level, default POSitive; the query answers POS or NEG (0.11.0). The current must first be on the other side of the level: one already beyond it at INITiate fires nothing until it has come back |
| TRIGger:PRETrigger <samples> / TRIGger:PRETrigger? | R | samples kept from before the crossing, 0 to the ring's size less one (TRACe:POINts:MAXimum?), default 0 (0.11.0). The ring then records its size less these after the crossing, and the capture ends by itself. A crossing among the capture's first <samples> keeps only the samples taken before it: the trigger's place in the dump is then trig_n - first, below <samples> |
| SENSe:CAPTure:LIMit ON\|OFF / SENSe:CAPTure:LIMit? | R | ON: INITiate ends the capture by itself after SAMPle:COUNt samples, on a stream or a statistics-only capture (a ring ends at its own size), and *OPC waits for it (0.11.0). It then reads running=0 until ABORt collects it. Default OFF; the query answers 1 or 0 |
| SENSe:CURRent:THReshold:MARK ON\|OFF / :MARK? | R | ON: a streamed capture writes a mark record each time the current rises through the threshold (thr_rise) and falls below it less its hysteresis (thr_fall), behind the sample it was seen at, at most 1,024 a capture (0.11.0). Default OFF |
Each profile is a measured combination of averaging and conversion times (docs/
| Profile | Job | ADC_CONFIG | Period | Sink |
|---|---|---|---|---|
| BURST | resolve a transient | 0xA000 | 100 µs | ring, shunt only; needs SYSTem:COMMunicate:I2C:FREQuency 1000000 |
| TRACE | shape a burst | 0xA0C0 | 280 µs | ring, shunt only (1,048,576 samples) |
| STATE | measure a state | 0xF140 | 1152 µs | stream, bus + shunt + temperature |
| SLEEP | measure deep sleep | 0xF1C2 | 67.52 ms | stream, AVG 16 |
The averaging override (0.18.0). SENSe:AVERage gives the live profile another averaging count and shunt conversion time, in place of its own two and nothing else: the mode and the bus and die conversion times stay, and the ADC_CONFIG word and the period follow, (bus + shunt + die conversion times the mode converts) × count microseconds a sample. It changes the measurement and is off by default, on every boot and after *RST; nothing of it is stored. Each profile has its own. A count or a time set while it is off is kept and converts nothing until SENSe:AVERage ON; *RST sets both back to the profile's own. SENSe:PROFile:REPort?, SAMPle:TIMer?, the apertures, SENSe:AVERage:COUNt? and a null's or an acquisition's sample count follow it at once; a capture runs on what it was when INITiate started it, and its header, its statistics and its ring's dump say that one whatever is set afterwards.
A setting is refused, -221, and changes nothing, when:
| Refused | Because | The text names |
|---|---|---|
| any of the three on BURST, OFF included | its 50 µs conversion is its definition and its loop already takes every second one | BURSt has no averaging override: its 50 us conversion is its definition |
| an override that is on, with a period no longer than twice the bus time a sample's reads take: 1051 µs on STATE and SLEEP (four registers a sample) and 191 µs on TRACE at 400 kHz, 421 µs and 77 µs at 1 MHz | the pacing has to serve a sample before the next conversion ends | averaging <n> x <t> us gives <p> us a sample, under the <limit> us its reads need at <hz> Hz |
| the same on TRACE, under 100 µs whatever the clock | the shortest period the timer-paced loop has been shown to keep (BURST's) | the same, with 100 |
| an override that is on, with a period over 200,000 µs | a stop (500 ms), the pacing probe's eight periods and the watchdog's check-in are all sized to a sample | averaging <n> x <t> us gives <p> us a sample, over the 200000 us its pacing allows |
| any of the three while a window is open | as any setting that shapes a capture | capture running (ABORt first) |
So the longest samples are 194.56 ms (STATE, SLEEP: 512 × 280 µs) and SLEEP goes to AVG 64 with a conversion of 2,074 µs or less. A combination is judged when the override is on or is turned on, and the period limit again at INITiate, because SYSTem:COMMunicate:I2C:FREQuency changes it: an override accepted at 1 MHz can be refused there at 400 kHz. STATE and SLEEP stay paced by the ALERT pin, one edge an average, and TRACE by the timer at the new period. *TST? probes ALERT with STATE's own word whatever the override. The count leaves the mean alone and the conversion time does not: 50 µs reads 15 µA low under a 40 µA DUT, 84 µs 2 µA, and a null taken at another time does not correct it (docs/
CONFigure, MEASure, READ, FETCh
The SCPI measurement functions. CURRent, VOLTage, POWer and ENERgy are the DUT's (the voltage after the shunt); TEMPerature is the INA228's die; CHARge the hardware accumulator over the last window.
| Command | Flags | Does |
|---|---|---|
| CONFigure[:SCALar]:CURRent[:DC] [<range>] | D R C | the function READ?/FETCh? report, the stream channel it implies, and the range when given |
| CONFigure[:SCALar]:VOLTage[:DC] · :POWer[:DC] · :ENERgy · :TEMPerature | D R | the same for the other functions. Voltage, power and energy need the bus converted: on a profile that does not (TRACE, BURST) they select STATE, from 0.12.0, as SCPI's CONFigure sets the instrument up for its function; a profile that converts it (STATE, SLEEP) is kept |
| CONFigure? | the configured function: "CURR", "VOLT", "POW", "ENER", "TEMP" | |
| MEASure[:SCALar]:CURRent[:DC]? [<range>] | D R | configures, takes SAMPle:COUNt samples on the current profile without streaming them, and answers their mean in amperes |
| MEASure[:SCALar]:VOLTage[:DC]? · :POWer[:DC]? · :ENERgy? · :TEMPerature? | D R | the same: volts, watts, joules over the window, degrees. They configure first, so after a boot or *RST (profile TRACE) MEASure:VOLTage? selects STATE and answers (0.12.0; it queued -230, "the acquisition converted no bus voltage", before) |
| READ? · READ[:SCALar]:<function>? | D R | one acquisition on the present configuration, then the function's figure; it configures nothing, so READ:VOLTage? on a ring profile still queues -230 |
| FETCh? · FETCh[:SCALar]:<function>? · FETCh[:SCALar]:CHARge? | the figure of the last acquisition or capture, without a new one | |
| FETCh:STATistics? | report: the last closed capture, samples dropped read_err pace_fallback pace_err_ppm pace_unmet dur_us mean_na min_na max_na die_mc_end flags charge_ | |
| FETCh:STATistics:BATCh? | report (0.10.0): batches batch_samples means_na, the last closed capture's batch means in nanoamps, comma-separated, oldest first (- with none). A batch starts as one sample and doubles whenever 64 are complete, so a capture of 32 samples or more has 32 to 63 of them, of equal size; a partial last batch is left out. From their spread a host estimates the effective sample size of the mean | |
| FETCh:HEADer? | report: the last started capture's facts, one unit (below) |
The current, the voltage, the power and the temperature are means over every sample the sampler took (from 0.10.0 the voltage, power and temperature too; before, over the samples that reached the console); the energy is the mean power times the capture's own dur_us (0.10.0; before, times the samples the console saw, so a dropped sample shortened it). The voltage, power and energy exist only on a profile that converts the bus (STATE, SLEEP): on a ring profile those queries queue -230. The charge is charge_
A measurement is refused on a circuit the shunt does not carry whole (101). An acquisition is bounded: SAMPle:COUNt times the profile's period may not exceed 600 s (-222, nothing started; a longer record is a capture), and it takes at most twice its nominal window plus a second; one that took fewer samples queues -230 and answers nothing. While it runs the console reads only one thing: a program message whose first unit is ABORt ends it within a sample period, queues -230 (aborted after <n> of <count> samples) and answers nothing; that ABORt unit is consumed, the rest of its message runs after, and every message that arrived meanwhile runs after in its order. The acquisition looks for it in the console's 1,024-byte inbox only: an ABORt sent behind more than that of other messages waits in the receive ring until the acquisition ends by itself. A sampler that does not acknowledge the stop queues 107 (0.6.0 and later).
INITiate, ABORt
| Command | Flags | Does |
|---|---|---|
| INITiate[:IMMediate] | D R | starts a capture on the current profile, streaming SENSe:FUNCtion:ON's channels (or capturing to the ring) |
| INITiate:FORCe | D R | the same on a bypassed shunt (path=both or bypass): every report on it says q=invalid |
| ABORt | D | closes the open window, the one way any window closes. A capture's samples still queued are written before the message's responses; its result is FETCh:STATistics?. A null window computes its null; its result is CALibration:ZERO:RESult?. With no window open it queues 111. When the sampler task does not acknowledge the stop within 500 ms it queues 107 and closes the window with no result (0.6.0 and later). During a MEASure/READ/CALibration:SHUNt acquisition it ends the acquisition instead (above) |
TRACe
| Command | Flags | Does |
|---|---|---|
| TRACe:MARK "<label>" | marks the current sample index of the running capture: 1..15 printable characters, no space, comma, quote, ; or =. The instrument answers with a mark record on the stream: on a streamed capture, from 0.11.0, behind every sample of a lower index (it travels the stream's queue; before, it could overtake samples still queued), and at once on a full queue or a ring capture. 16 per capture, the hold's own two apart (0.16.0) | |
| TRACe:DATA? [SCALed\|RAW][,<from>[,<count>]] | R | the ring as a block: SCALed (default) one METER t= ch=i_ua v= row per sample, RAW sixteen raw 20-bit counts per R row, with the drift anchors A, the marks K and the trigger T (below). <from> is a place among the samples the ring holds, 0 the oldest; every index in the rows is the capture's own sample index, which is the same thing unless a level trigger let the ring run circular (0.11.0) |
| TRACe:POINts? | samples in the ring | |
| TRACe:POINts:MAXimum? | the ring's capacity, 1048576; known from boot (0.7.0 and later: before, 0 until the first ring capture) |
CALibration
| Command | Flags | Does |
|---|---|---|
| CALibration:ZERO <seconds> | D R | opens a null window of 1..600 s on the current range and profile, and returns. Refused on path=both (101), and from 0.15.0 under a pending ROUTe:LEAD:CYCLe (-221): a null window refuses every contact move, so it would refuse the cycle's reclose |
| CALibration:ZERO:RESult? | report: while the window is open, running=1 profile over_s n_expect samples <relay tokens>; after ABORt, running=0 range offset_pv sd_pv over_s die_mc n <relay tokens> stored | |
| CALibration:TAG "<text>" / CALibration:TAG? | R | an opaque calibration tag, at most 23 characters, stored in flash |
| CALibration:DATE <year>,<month>,<day> / CALibration:DATE? | R | the calibration's date, the host's (the instrument has no clock): a calendar date in 2026..2099 (-222 otherwise), stored in flash, echoed, never compared with anything. The query answers 0,0,0 when none is stored |
| CALibration:VBUSside SOURce\|UNKNown / CALibration:VBUSside? | R | where the VBUS sense is wired; SOURce after the continuity check |
| CALibration:DATA? | report: shunt_uohm shunt_ | |
| CALibration:SHUNt:REFerence <ohms> / CALibration:SHUNt:REFerence? | R | the reference resistor of the shunt calibration, 1 to 4000 Ω; 100.0 at boot and after *RST (the VPG foil part); not stored |
| CALibration:SHUNt[:MEASure] | D R | one acquisition of SAMPle:COUNt samples on the current profile (STATe or SLEep: the bus channel must convert) with the reference in place of the DUT and VBUS on its top lead; the live range must hold a null of its own (else -221). Computes the shunt from the two drops (calibration/ |
| CALibration:SHUNt:RESult? | report: range r_nohm r_uohm dev_ppm i_na vsh_nv vref_uv ref_uohm n die_mc check; r_uohm is what SENSe:CURRent:SHUNt would store; check is ok, no_samples, reversed, reference_low, signal_low or out_of_window (±2 % of 0.100 Ω). -230 before the first point |
A null closed with K1 commanded open that reads beyond 50 µV is not stored (102, stored=0): a lead that did not open would subtract the DUT's own current from every later reading. The relay tokens are the circuit the window was opened in.
DIAGnostic
| Command | Flags | Does |
|---|---|---|
| DIAGnostic:ALERt? | D R C | report: DIAG_ALRT, raw memstat mathof energyof chargeof cnvrf |
| DIAGnostic:I2C:SCAN? | R | report: expected found n: every address of 0x40…0x4F that acknowledged a probe. The probes run on the I2C interrupt's core (0.16.4; every transaction does from 0.16.5, docs/ |
| DIAGnostic:REGister? <addr> | D R C | report: one INA228 register, addr bytes raw; a reserved address is refused |
| DIAGnostic:WATChdog? | report (0.14.0): console sampler timeout_s panic stalls: whether each task's watchdog subscription was accepted (1) or not (0), the watchdog's timeout, whether a starved task reboots the instrument (1 on every image from 0.14.0), and the stalls the console has reported since boot (107, above). From FW-11 the watchdog is the firmware's own on the timer ESP-IDF's task watchdog used (docs/ | |
| DIAGnostic:WATChdog:TEST | R C | command (0.14.0): the console stops checking in with the watchdog, and within its timeout the instrument resets (it panicked until FW-11): every relay releases to the measuring circuit and SYSTem:HEALth? then says reset=task_ |
| DIAGnostic:HEAP? | report (0.7.0 and later): armed allocs_ | |
| DIAGnostic:HEAP:CENSus? | a census build's alone (0.17.0; the image built with METER_ | |
| DIAGnostic:HEAP:CENSus:EVENt? <n> | a census build's alone, as above: report n op phase size caps block callers, event n: op is alloc or free, phase pre (before app_main()) or main, size the bytes asked for and caps their capabilities in hex (both 0 for a free), block the block's address, and callers the call sites above the heap hook, innermost first, comma-separated (- with none). -222 when the event is not held (not yet recorded, or overwritten); scripts/ |
ROUTe: the relay module
K1 is the DUT's battery lead, in series with the shunt (energized: open); K2 the bypass across it (energized: closed); K3 and K4 are spare and, on the rig since 2026-11-20, not wired: from 0.13.0 the firmware never drives GPIO16 and GPIO17, and from 0.16.6 it parks both at boot as inputs with the internal pull-down (docs/
| Command | Does |
|---|---|
| ROUTe:LEAD OPEN\|CLOSe[,FORCe][,LIVE] | K1. An explicit order cancels a pending lead cycle |
| ROUTe:LEAD:CYCLe <ms>,FORCe[,LIVE] | K1 opened, held <ms> (1..60000) and reclosed by the instrument, from path=shunt only (-221 otherwise), with ROUTe:LEAD OPEN's interlocks: FORCe is required (the DUT loses its battery for the cycle, 109 without it) and LIVE under a capture, which marks both moves. The reclose runs on the console's loop, late by its own work only (at most a few milliseconds), and under a capture started meanwhile it is marked as a LIVE move rather than refused. ROUTe:RESult? describes the reclose once it has run (0.13.0). While a cycle is pending CALibration:ZERO is refused (0.15.0) |
| ROUTe:BYPass ON\|OFF[,FORCe][,LIVE] | K2 |
| ROUTe:NULLpath ON\|OFF[,LIVE[,FORCe]] | both, make-before-break: ON closes K2 then opens K1, reading the shunt before and after each step and releasing the path when a step was not seen to work (103, 104); OFF recloses K1 then opens K2 |
| ROUTe:RELay<n> ON\|OFF[,LIVE] | the spares, RELay3 and RELay4; RELay1 and RELay2 are refused by name (-114). Neither spare is wired on the rig: from 0.13.0 the order is refused (-241, "k3 is not wired on this rig") and nothing is driven; before, it answered and no relay moved |
| ROUTe:STATe? | report: k1 k2 k3 k4 path check pads operate_ |
| ROUTe:RESult? | report: the circuit and the last completed order, k1 k2 k3 k4 path check moved settle_us live marked vs_pv hold_s q (moved=- after a refused order) |
The interlocks: an order that would move a contact while a capture runs needs LIVE, and is marked in the capture (each move a mark record); one that would take the shunt off a running capture's current, or leave the DUT with no supply (path=none), needs FORCe as well. Nothing moves under a null window (112).
The hold is the instrument's teardown for a host that went away with the relays off the measuring circuit. Every path but shunt is held 120 s (hold_s, the seconds left, - when nothing is held): armed by the order that left it, armed again by any relay order, one that moves nothing included (a host that keeps a path long sends its order again), and re-armed whenever a capture or a null window closes. A null window that is sampling suspends it, and the hold gets its whole time again once the window stops sampling, by itself or by ABORt; nothing else does. When it runs out the instrument puts every coil back to rest, make-before-break (K1 recloses before K2 opens), and queues the release: 113 from path=bypass (0.12.0), 114 from path=none (0.13.0), 115 from path=both (0.16.0). ROUTe:STATe? counts the releases in hold_released. Before 0.16.0 an open capture suspended the hold, so a host that died under a capture left the DUT without its battery, or the bypass closed, until somebody came. From 0.16.0 the release runs under it: each move is a mark record of the capture (hold:k1:closed, hold:k2:open), the error's detail says under a capture, marked hold:, the capture's statistics count it (hold_
A reset releases every coil at once, as every boot does, which leaves the relays on the measuring circuit but can open K2 before K1 recloses. The commanded coils are kept in RTC memory as they are driven, so the boot after a reset that keeps that memory (a panic, a watchdog, esp_restart(), a brown-out) queues 116 with what it released and SYSTem:HEALth? says reset_
The refusals' details. A relay order that is refused changes nothing and queues one error, <code>,"<standard text>;<detail>". The details of the relay orders, and of the commands that the relays make refuse, as firmware/
A use … detail comes with the code of what was wrong with the parameters: -224 for a word the order does not take, -109 for one that is missing. <readings> are the shunt's readings in picovolts, comma-separated, as vs_pv= has them in ROUTe:RESult?, and the <path> a failed check releases to is shunt. Of the four 101 details the first two are INITiate's, the third CALibration:ZERO's and the last an acquisition's (MEASure, READ, CALibration:SHUNt); the pending lead cycle is CALibration:ZERO's too; 102 closes a null window whose offset is beyond 50 µV with K1 commanded open; and 100 is queued at boot, and answers every ROUTe order and query, when the relay pins could not be configured.
Captures and the stream
A capture is INITiate, whatever the host asks meanwhile, and ABORt: the samples and the marks are records between the responses, and the one that answers a message is the first line that is not a record. A worked session shows one, with a verdict on every message.
Stream records
| Format | Record | Line |
|---|---|---|
| TEXT (default) | a sample, one line per channel | METER t=<us> ch=<i_ |
| TEXT | a mark | METER_MARK mark=<label> n=<sample index> t=<us> |
| CSV | a sample, one line | S,<t_ |
| CSV | a mark | K,<sample index>,<t_ |
A threshold mark (SENSe:CURRent:THReshold:MARK ON, 0.11.0) is a mark record labeled thr_rise or thr_fall, with the index and timestamp of the sample the crossing was seen at, written right after that sample.
A hold mark (0.16.0) is a mark record labeled hold:k1:closed or hold:k2:open: a relay the hold moved by itself under a running capture, at the sample index it was driven at, as a LIVE move is marked (a ring capture keeps it as a K row). The hold's release from path=bypass writes both, K1 first; from path=none the first, from path=both the second. Two slots beyond TRACe:MARK's 16 are kept for them, so a capture whose table is full still records the move; the capture's hold_
t is microseconds since the instrument booted (esp_timer), the sample's own timestamp: on an alert-paced capture (pace=alert, 0.9.0 and later) the moment the conversion-ready edge woke the sampler, which is the conversion's end; on a timer-paced one the moment its read finished. Values are in thousandths of their unit as the device computed them: i_ua microamps, v_mv millivolts at the DUT, p_mw milliwatts delivered, die_c degrees. A channel not chosen, or not converted by the profile, is left out (TEXT) or empty (CSV); it is never written as a zero. The TEXT sample line is the one the console protocol before SCPI wrote, so recorded meter.log files and new ones read the same.
The stream fits the line by construction: every channel at once, on the fastest streaming profile (STATE), needs 167 kB/s of the 480 kB/s that 80 % of the 6 Mbps line carries, and the firmware does not build with a profile whose stream would need more, so no channel set is refused for its byte rate (until FW-27, INITiate checked it at run time and answered -221, stream too fast, which no profile could reach). The byte budget is derived from the TEXT line and the CSV row is never longer. A sample the console could not write is counted in dropped=.
The capture header
FETCh:HEADer? is one report unit; its keys, in order: fw chip addr mfg die rev (identity), config adc_config shunt_cal range (the registers written), diag_cfg alatch sovl suvl (the clip detector: with alatch=1 and these limits, a conversion at either end of the field sets SHNTOL/SHNTUL in flags), mode vbusct_us vshct_us vtct_us avg period_us (0 for an input the mode does not convert), pace pace_edges pace_expect osc_tol_ppm (what paces the samples: from 0.9.0 STATE and SLEEP probe the ALE pin for pace_expect=8 conversions, reading DIAG_ALRT after each edge, and run pace=alert when 7 to 9 edges came, pace=timer otherwise; TRACE and BURST are always pace=timer pace_edges=0 pace_expect=0, no probe), shunt_lsb_pv bus_lsb_pv temp_lsb_nc current_
The ring dump
TRACe:DATA? rows, inside the block:
A ring sample's timestamp is implicit: t0_us + index × period_us, corrected by interpolating between the anchors, which carry real timestamps. Every anchor the ring holds below <from> is written first, so a partial dump keeps its drift reference. A raw count times the header's current_
From 0.11.0 the indices are the capture's sample indices. Under a level trigger the ring runs circular, so the oldest sample it holds is index first= (written on the opening row whenever it is not 0), and trig_n= and the T row say where the trigger fired; the implicit timestamps hold across the wrap, because the index is the capture's and not the ring's. An untriggered dump reads as it always did, but for its closing row: METER_
Deviations from SCPI-1999
The command structure, the common commands, the error queue and its numbering, the status model, the numeric and string data and the arbitrary block follow SCPI-1999 and IEEE 488.2. Where the instrument departs from them, on purpose:
- Report responses are key=value tokens separated by spaces, not comma-separated values. Every report carries more facts than a positional list can keep readable or extensible, and a host reads a key without counting commas; a new key never breaks an old client.
- Stream records are written while a capture runs, outside any query (SCPI instruments buffer and are read with FETCh). A deep-sleep capture lasts minutes and a STATE one fills hundreds of kilobytes, so the samples are streamed as they are taken and the host stores them; FETCh still gives the figures of the window.
- ABORt keeps the data: it is the normal end of a capture, and FETCh reads the closed window.
- ABORt with nothing open is an error (111), so a host can tell a window that had already closed from one it just closed.
- Device-specific report queries (SYSTem:INFormation?, SYSTem:STATus?, SENSe:PROFile:REPort?, SENSe:CURRent:RANGe:REPort?, ROUTe:RESult?, CALibration:ZERO:RESult?) carry what the old console printed after each action, since a SCPI command answers nothing.
- INITiate:FORCe overrides an interlock; SCPI has no word for it.
- The averaging and conversion times are the profile's, and from 0.18.0 the averaging count and the shunt conversion time are settable per profile through SENSe:AVERage alone; the bus and die conversion times are read-only.
- No service request line: over a serial port *SRE only shapes *STB?'s master summary bit.
- *OPC? and *WAI do not block. A blocking query could not be interrupted by ABORt over a line with no device clear, so *OPC? answers 1 at once and *WAI returns at once; *OPC is the one that waits, by setting bit 0 of the ESR when a window that ends by itself has ended (0.11.0), and a host polls *ESR?.
Old console command to SCPI
The console protocol of firmware 0.1.0 (key=value lines with METER_OK: / METER_ERR: prefixes) maps to the SCPI set as follows. Every capability it had is kept; nothing it printed is lost, though some facts now come from a query beside the command instead of from the command's own acknowledgement.
| Old command | SCPI | Notes |
|---|---|---|
| IDN? | *IDN? and SYSTem:INFormation? | *IDN? is the standard four fields; SYSTem:INFormation? carries the old fields, model=kleidos-meter in place of the bare word |
| METER? | SYSTem:STATus? | the same fields, without the leading word |
| PROFILE TRACE\|STATE\|SLEEP\|BURST | SENSe:PROFile <name> + SENSe:PROFile:REPort? | the acknowledgement's fields are the report |
| RANGE 0\|1 | SENSe:CURRent:RANGe:INDex 0\|1 + SENSe:CURRent:RANGe:REPort? | or SENSe:CURRent:RANGe <amps> |
| BUS <hz> | SYSTem:COMMunicate:I2C:FREQuency <hz> | |
| START [ch,...] | SENSe:FUNCtion:ON "CURR",... + INITiate + FETCh:HEADer? | channel i_ua is CURR, v_mv VOLT, p_mw POW, die_c TEMP; the METER_HDR block is one report unit |
| START FORCE | INITiate:FORCe | |
| STOP (capture) | ABORt + FETCh:STATistics? | the METER_OK: stopped fields, without the word |
| STOP (null window) | ABORt + CALibration:ZERO:RESult? | the result line's fields plus running=0 stored=; the refusals that followed it (null not stored, calibration write failed) are errors 102 and 106 in the same answer |
| MARK <label> | TRACe:MARK "<label>" | the acknowledgement is the METER_MARK stream record |
| DUMP [RAW] [from] [count] | TRACe:DATA? [SCALed\|RAW][,from[,count]] | the same rows, inside a definite-length block |
| ZERO <s> | CALibration:ZERO <s> + CALibration:ZERO:RESult? | the acknowledgement's fields are the running report |
| CAL SHUNT <uohm> | SENSe:CURRent:SHUNt <ohms> | ohms now: 100012 µΩ is 0.100012 |
| CAL TAG <text> | CALibration:TAG "<text>" | |
| CAL VBUSSIDE SOURCE\|UNKNOWN | CALibration:VBUSside SOURce\|UNKNown | |
| CAL? | CALibration:DATA? | |
| DIAG? | DIAGnostic:ALERt? | |
| SCAN? | DIAGnostic:I2C:SCAN? | |
| REGR <addr> | DIAGnostic:REGister? <addr> | 0x04 is written #H04 |
| CHARGE? | SENSe:CHARge? | |
| CHARGE RESET | SENSe:CHARge:RESet | |
| LED? | SYSTem:LED? | carries the boot report too |
| RELAY? | ROUTe:STATe? | |
| RELAY 3\|4 ON\|OFF [LIVE] | ROUTe:RELay3\|RELay4 ON\|OFF[,LIVE] | |
| LEAD OPEN\|CLOSE [FORCE] [LIVE] | ROUTe:LEAD OPEN\|CLOSe[,FORCe][,LIVE] + ROUTe:RESult? | |
| BYPASS ON\|OFF [FORCE] [LIVE] | ROUTe:BYPass ON\|OFF[,FORCe][,LIVE] + ROUTe:RESult? | |
| NULLPATH ON\|OFF [LIVE [FORCE]] | ROUTe:NULLpath ON\|OFF[,LIVE[,FORCe]] + ROUTe:RESult? | |
| METER_ERR: <reason> | an error in the queue, <code>,"<text>;<reason>" | read with SYSTem:ERRor:ALL?; every unit after a refused one still runs |
| boot lines IDN …, LED …, METER_ERR: … | *ESR? bit 7 and the error queue | nothing is printed at boot |
| METER t= ch= v= stream line | unchanged (FORMat:DATA TEXT) | CSV added |
| METER_OK: mark=… printed for a LIVE relay move | METER_MARK mark=… n=… t=… | |
| — | MEASure, READ, FETCh, CONFigure for current, voltage, power, energy, temperature; SAMPle:COUNt, SAMPle:TIMer?; the apertures and averaging; *RST, *TST?; the status registers; FORMat:DATA CSV; TRACe:POINts? | new |