status

Status/error codes returned by GS, BS and other status-bearing replies.

class tl_elliptec.status.StatusCode(*values)[source]

Bases: IntEnum

Status/error code carried in a GS or BS reply’s data byte.

See describe() for the human-readable meaning of each value.

OK = 0
COMMUNICATION_TIMEOUT = 1
MECHANICAL_TIMEOUT = 2
COMMAND_ERROR_OR_NOT_SUPPORTED = 3
VALUE_OUT_OF_RANGE = 4
MODULE_ISOLATED = 5
MODULE_OUT_OF_ISOLATION = 6
INITIALIZING_ERROR = 7
THERMAL_ERROR = 8
BUSY = 9
SENSOR_ERROR = 10
MOTOR_ERROR = 11
OUT_OF_RANGE = 12
OVER_CURRENT_ERROR = 13
tl_elliptec.status.describe(code)[source]

Get the human-readable meaning of a GS/BS status/error code.

Parameters:

code (int) – The numeric status code, e.g. from as_status_code().

Returns:

A short description, e.g. "Busy" for 9, or "Reserved" for any value in 14-255.

Return type:

str