मुख्य सामग्री पर जाएँ

raygeo.driver.ruida

Ruida laser controllers implemented in Rust. RuidaDriver speaks the binary rpascript protocol over USB, UDP or TCP: it runs complete job scripts, executes live motion and job-control commands, polls the controller status and reports the machine state through the uniform driver event surface. Job compilation from Ops lives in the encoder; this session consumes rpascript text.

RuidaDriver​

A direct connection to a Ruida laser controller.

All async methods return asyncio futures; a typed DriverEvent is delivered to event_callback(event) on the event loop thread. run() and run_raw() take rpascript text; the machine-code encoder produces it from Ops.

machine_status​

machine_status: dict

The last decoded controller status.

protect_enabled​

protect_enabled: bool

Whether protect mode blocks SET_SETTING.

execute()​

execute(line: str) -> Awaitable[None]

Send one raw rpascript line.

ParameterTypeDescription
linestr
ReturnsAwaitable[None]

focus_z()​

focus_z() -> Awaitable[None]

Run the controller's Z auto-focus routine.

ParameterTypeDescription
ReturnsAwaitable[None]

get_setting()​

get_setting(address: int) -> Awaitable[list]

Read one controller memory address; returns (address, data) pairs.

ParameterTypeDescription
addressint
ReturnsAwaitable[list]

home_u()​

home_u() -> Awaitable[None]

Home the U axis.

ParameterTypeDescription
ReturnsAwaitable[None]

home_xy()​

home_xy() -> Awaitable[None]

Move the XY axes to the current origin.

ParameterTypeDescription
ReturnsAwaitable[None]

home_z()​

home_z() -> Awaitable[None]

Home the Z axis through the controller's homing routine.

ParameterTypeDescription
ReturnsAwaitable[None]

jog_axis_rel()​

jog_axis_rel(axis: str, delta: float) -> Awaitable[None]

Jog one axis relatively in millimetres.

ParameterTypeDescription
axisstr
deltafloat
ReturnsAwaitable[None]

jog_u_to()​

jog_u_to(u: float) -> Awaitable[None]

Jog to an absolute U position in millimetres.

ParameterTypeDescription
ufloat
ReturnsAwaitable[None]

jog_x_to()​

jog_x_to(x: float) -> Awaitable[None]

Jog to an absolute X position in millimetres.

ParameterTypeDescription
xfloat
ReturnsAwaitable[None]

jog_xy_rel()​

jog_xy_rel(
x: Optional[float] = None,
y: Optional[float] = None,
) -> Awaitable[None]

Jog XY relatively in millimetres.

ParameterTypeDescription
xOptional[float] = None
yOptional[float] = None
ReturnsAwaitable[None]

jog_xy_to()​

jog_xy_to(x: float, y: float) -> Awaitable[None]

Jog to an absolute XY position in millimetres.

ParameterTypeDescription
xfloat
yfloat
ReturnsAwaitable[None]

jog_y_to()​

jog_y_to(y: float) -> Awaitable[None]

Jog to an absolute Y position in millimetres.

ParameterTypeDescription
yfloat
ReturnsAwaitable[None]

jog_z_to()​

jog_z_to(z: float) -> Awaitable[None]

Jog to an absolute Z position in millimetres.

ParameterTypeDescription
zfloat
ReturnsAwaitable[None]

reset()​

reset() -> Awaitable[None]

Stop the job and home XY, like the panel's reset key.

ParameterTypeDescription
ReturnsAwaitable[None]

set_jog_speeds()​

set_jog_speeds(xy: float, z: float, u: float) -> None

Set the jog speeds in mm/s.

ParameterTypeDescription
xyfloat
zfloat
ufloat
ReturnsNone

set_protect()​

set_protect(enabled: bool) -> None

Block or allow SET_SETTING commands.

ParameterTypeDescription
enabledbool
ReturnsNone

set_setting()​

set_setting(address: int, a: int, b: int) -> Awaitable[None]

Write one controller memory address. Blocked while protect mode is on.

ParameterTypeDescription
addressint
aint
bint
ReturnsAwaitable[None]

Functions​

encode_script()​

encode_script(lines: Sequence[str]) -> list[int]

Encode rpascript lines into the controller's raw byte stream, including the file checksum.

ParameterTypeDescription
linesSequence[str]
Returnslist[int]