跳转到主要内容

raydriver.grbl.types

Value types shared by the GRBL drivers: DeviceState, DeviceStatus and DeviceError. These mirror the identically-named types in Rayforge so the Python shell can convert losslessly.

DeviceError​

An error or alarm with code, title and description.

code​

code: int

description​

description: str

title​

title: str

DeviceState​

The complete state of a device at a moment in time.

buffer_available​

buffer_available: Optional[int]

buffer_rx_available​

buffer_rx_available: Optional[int]

error​

error: Optional[DeviceError]

feed_rate​

feed_rate: Optional[int]

machine_pos​

machine_pos: list[Optional[float]]

Machine position in mm; entries may be None.

spindle_speed​

spindle_speed: Optional[int]

status​

status: DeviceStatus

wco​

wco: list[Optional[float]]

Work coordinate offset in mm; entries may be None.

work_pos​

work_pos: list[Optional[float]]

Work position in mm; entries may be None.

DeviceStatus​

Machine state as reported in Grbl status reports.

Values:

  • ALARM
  • CHECK
  • CYCLE
  • DOOR
  • HOLD
  • HOME
  • IDLE
  • JOG
  • LOCK
  • QUEUE
  • RUN
  • SLEEP
  • TEST
  • TOOL
  • UNKNOWN
  • UNLOCK

name​

name: str