Command Syntax

ASCII command syntax for Koheron V1 firmware controllers.
Firmware V1 documentation ยท V1.0-rc54-2d701ce

Koheron products currently ship with firmware V0.x by default. Firmware V1 is under active development and is not publicly available yet.

Contact us if you would like early access or want to evaluate V1 firmware on your device.

V1 firmware commands are ASCII tokens followed by optional arguments. A command can read a value, write a value, or perform an action.

Basic syntax

command [arguments...]
  • The command name starts at the beginning of the line.
  • Spaces, tabs, commas, CR, and LF are separators.
  • Send one command per line, except for raw binary payload commands such as memw.
  • Unknown non-empty commands set CMD_UNKNOWN.

For serial transport details, prompt behavior, echo, and command pacing, see Serial Interface.

Command-name matching

Commands are matched by their first four characters. For example, version may be sent as vers, and usrmode may be sent as usrm.

Because only the first four characters are used for matching, send the full command names shown in this manual unless you intentionally use a documented short command such as err or bdid.

Short command names and aliases are sent as written, for example IDN?, err, bdid, and regs.

Read and write commands

Many commands read with no argument and write with one or more arguments.

>> rtset
10000.000
>> rtset 12000
12000.000

If a write is rejected, the firmware leaves the previous setting unchanged and raises CMD_INVALID_ARG. The command normally prints the current value.

Read errors with err and clear reviewed errors with errclr.

CLI write validation

CLI writes are parsed strictly. Invalid values include:

  • malformed numbers
  • integer overflows
  • booleans other than 0 or 1
  • values outside the documented range

When validation fails, the command leaves the previous setting unchanged and raises CMD_INVALID_ARG.

Defaults are applied only during initialization, explicit default restore, or EEPROM/config recovery.

Floating-point arguments

Commands that take floating-point arguments use decimal notation:

[+|-]digits[.digits][e|E[+|-]digits]
[+|-].digits[e|E[+|-]digits]

Accepted examples:

Input Meaning
1 decimal value without a fractional part
+1 explicit positive sign
-1 negative value
1.0 decimal value with a fractional part
1. decimal value with a trailing decimal point
.5 decimal value without digits before the decimal point
-.5 signed decimal value without digits before the decimal point
1e-3 decimal exponent
3.2e+1 decimal exponent with explicit exponent sign
-2.5E2 uppercase exponent marker

At least one digit is required. Special names such as nan and inf, hexadecimal notation such as 0x10, and trailing non-whitespace characters are not accepted.

Action commands

Action commands perform an operation instead of simply reading or writing one setting.

>> save
A1B2
>> errclr
ffffffff

Some action commands print a confirmation, CRC, mask, or result. Others may produce no normal response.

Help format

The hidden common help command output includes an access marker and compact format string.

Access markers:

Marker Meaning
r read-only
w write-only
rw read/write

Format characters:

Format Meaning
f floating-point value
u unsigned decimal integer
x hexadecimal integer
s text string
b raw binary payload or raw binary reply

Commands with raw binary data require byte-counted reads or writes. Do not handle them with terminal line readers.

Numeric formats

Use the format documented for each command.

Use Format implemented by common commands
User mode, key, baud rate, board ID, serial number, and sequ state Decimal unsigned integer
Error masks, stmsk values, and sequencer register values Hexadecimal digits. Error masks and stmsk values are parsed without a 0x prefix. stmsk accepts up to 16 hex digits. Sequencer register values are fixed-width hexadecimal fields.
User EEPROM page address for memr and memw Hexadecimal digits without a 0x prefix
Product-specific measurements and setpoints Product-dependent; commonly floating point

Raw binary commands

Most commands are ASCII line commands. Commands whose help format includes b use raw binary data or return raw binary frames.

See Serial Interface and Binary Status.