Machine Actions
- qtpyvcp.actions.machine_actions.issue_mdi(command, reset=True)[source]
Issue an MDI command.
An MDI command can be issued any time the machine is homed (if not NO_FORCE_HOMING in the INI) and the interpreter is IDLE. The task mode will automatically be switched to MDI prior to issuing the command and will be returned to the previous mode when the interpreter becomes IDLE.
ActionButton syntax to issue G0 X5:
machine.issue_mdi:G0X5
It is simpler to use the MDIButton, examples in the Widgets section.
- Parameters:
command (str) – A valid RS274 gcode command string. Multiple MDI commands can be separated with a
;
and will be issued sequentially.reset (bool, optional) – Whether to reset the Task Mode to the state the machine was in prior to issuing the MDI command.
- class qtpyvcp.actions.machine_actions.home[source]
Homing actions group
- class qtpyvcp.actions.machine_actions.unhome[source]
Unhoming actions group
- qtpyvcp.actions.machine_actions.getAxisLetter(axis)[source]
Takes an axis letter or number and returns the axis letter.
- Parameters:
axis (int | str) – Either a axis letter or an axis number.
- Returns:
The axis letter, all for an input of -1.
- Return type:
str
- qtpyvcp.actions.machine_actions.getAxisNumber(axis)[source]
Takes an axis letter or number and returns the axis number.
- Parameters:
axis (int | str) – Either a axis letter or an axis number.
- Returns:
The axis number, -1 for an input of all.
- Return type:
int
- class qtpyvcp.actions.machine_actions.jog[source]
Jog Actions Group
- static axis(axis, direction=0, speed=None, distance=None)[source]
Jog an axis.
Action Button Syntax to jog the X axis in the positive direction:
machine.jog.axis:x,pos
- Parameters:
axis (str | int) – Either the letter or number of the axis to jog.
direction (str | int) – pos or +1 for positive, neg or -1 for negative.
speed (float, optional) – Desired jog vel in machine_units/s.
distance (float, optional) – Desired jog distance, continuous if 0.00.