Command Syntax

ASCII command syntax for Koheron V1 firmware controllers.

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.

Finding command documentation

Use the API command reference to find commands for the connected product. Check the command page for its syntax, response, and required write access. Read IDN? and version to identify the device and firmware before selecting the relevant reference.

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. Follow the command documentation for raw binary payloads and responses: use byte-counted reads and writes instead of terminal line readers.

See Serial Interface and Binary Status.