Binary Status

Experimental V1 firmware documentation. Koheron products currently ship with V0.x firmware by default. V1 firmware executables are not publicly available yet. Please contact us if you are interested in early access or would like to evaluate V1 on your device.

V1 firmware can provide a compact binary status block for efficient software polling. This is intended for applications that need to read many values at once without parsing several text commands.

For manual use and simple scripts, use text commands first.

Commands

  • $: returns the current binary status block, or only the CRC if the block has not changed since the previous request.
  • fmt$: prints the field list and format characters for the product binary status block.
  • stscfg: prints a text status/configuration line when implemented by the product.
  • logerr: returns the binary status snapshot associated with the last error, when implemented by the product.

These commands are hidden from help because they are mainly intended for software integration.

Product-specific layout

The binary status layout is defined by each product firmware. For example, CTL200, CTL300E and TEC200 all define different binary field lists. A typical field list contains enable states, monitored voltages and currents, temperatures, setpoints, limits, error masks and a final CRC field.

Use fmt$ on the actual controller to discover the field order used by the installed firmware:

>> fmt$
...

The reply is a text list. Each line contains a field name and a compact format character.

Format characters follow the Python struct convention used by the firmware metadata:

  • B: unsigned 8-bit integer.
  • H: unsigned 16-bit integer.
  • I: unsigned 32-bit integer.
  • f: 32-bit floating-point value.

The firmware uses a packed little-endian binary structure. The final field is normally a CRC16 over the preceding bytes.

CRC-short response

The $ command is optimized for repeated polling. When the current status block has the same CRC as the previous $ request, the firmware returns only the 2-byte CRC instead of the full block. When the CRC changes, it returns the complete status structure.

Software using $ must therefore handle two reply lengths:

  • 2 bytes: status unchanged, only CRC returned.
  • full structure size: status changed, complete binary block returned.

If your software needs a text value or a single parameter, do not use $; use the corresponding ASCII command.

Last-error snapshot

When the product implements logerr, the command returns a binary status snapshot associated with an error event. Products may also initialize this snapshot after a timeout so diagnostic software can still retrieve a representative status block.

Serial framing warning

In normal single-controller mode the firmware still emits the serial prompt around command processing. Binary integrations should read the serial stream carefully and should not treat binary status as a line-oriented text reply.

For robust software, use a dedicated binary-status reader that knows the expected structure size and validates the CRC.

[email protected]