Skip to content

Tailstock quill

A powered tailstock quill needs a machine-owned controller that sequences the actuator, checks travel and pressure feedback, applies functional interlocks, and reports when the requested position has been reached. Ctrl reserves a program-level pair for that controller:

Code Intent Executor opcode
M20 Retract or release the tailstock quill 0
M21 Extend or engage the tailstock quill 1

These commands express intent rather than output polarity. The machine configuration decides which valve state or motor direction retracts and extends its quill.

Complete the shared peripheral remap setup first. Add the quill endpoint to the shared __init__ function in toplevel.py, before component.ready():

self.tailstock_quill = HalExecutor(self, "tailstock-quill", component)

Connect the seven remap.executor.tailstock-quill.* pins to the machine-owned quill controller according to the executor protocol. The controller owns the meaning of diagnostic result values and must document them beside its HAL implementation.

Add the two reserved commands to the machine’s existing [RS274NGC] section:

REMAP = M20 modalgroup=10 python=m20_tailstock_quill_retract
REMAP = M21 modalgroup=10 python=m21_tailstock_quill_extend

Add the operations to the shared remap.py module:

def m20_tailstock_quill_retract(self, **words):
yield from executor_execute(self, self.tailstock_quill, request=0)
def m21_tailstock_quill_extend(self, **words):
yield from executor_execute(self, self.tailstock_quill, request=1)

The part program waits at the remapped command until the quill controller reports a terminal result. Use a justified executor timeout when normal quill travel can exceed the default ten seconds.

The quill controller should define:

  • how program, panel, and service requests are serialized;
  • which machine states permit extension and retraction;
  • the required travel-limit, pressure, or position feedback;
  • how it detects contradictory or stale sensors;
  • what cancellation and timeout do to an active movement; and
  • which physical condition is held after success.

Report Succeeded only when the full promised condition is true. A command acknowledgement or energized valve is not proof that the quill reached its requested position.