motor-driver

Implement EPICS model-3 asyn motor drivers with controller and axis subclasses.

1|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/BCDA-APS/opencode-skills --skill motor-driver
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: motor-driver
Source: https://github.com/BCDA-APS/opencode-skills/tree/main/motor-driver
Command: npx skills add https://github.com/BCDA-APS/opencode-skills --skill motor-driver

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write EPICS model-3 motor drivers that reliably translate motion commands into hardware protocol calls and continuously publish accurate per-axis status to EPICS records.

Core Features & Use Cases

  • Controller + Axis architecture: Implement an asynMotorController subclass for axis management and a per-axis asynMotorAxis subclass for motion and polling logic.
  • Deterministic motion commands: Provide move, moveVelocity, home, and stop methods that send the right controller commands for absolute/relative moves and jogging.
  • Correct status polling: Implement a critical poll() method that queries position/limits/moving state, sets motor status parameters, calls callbacks, and updates the poller’s fast/slow behavior.
  • IOC shell integration: Register an iocsh create function so the driver can be instantiated from st.cmd using a clean configuration interface.

Quick Start

Tell the AI to generate a new motor-driver module skeleton for your hardware by subclassing asynMotorController and asynMotorAxis, implementing move/home/stop/poll, and wiring iocsh registration for controller creation.

Frequently Asked Questions about motor-driver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write an EPICS model-3 motor driver for a custom controller?

To write an EPICS model-3 motor driver, subclass asynMotorController and asynMotorAxis to execute motion commands and publish per-axis status, implementing move, home, stop, and poll methods for your hardware protocol.

How does polling work in an asyn motor driver?

Polling in an asyn motor driver uses a poller-driven poll() method that queries the device for position, limits, and moving state, sets motor status parameters consistently, calls callParamCallbacks(), and updates poller fast/slow behavior.

How do I register an EPICS motor driver for instantiation from st.cmd?

Register an IOC shell iocsh create function to instantiate the EPICS motor driver from st.cmd, providing a clean configuration interface for controller creation and axis management at runtime.

What motion commands does an EPICS model-3 asyn motor axis need to implement?

An EPICS model-3 asyn motor axis needs to implement move for absolute/relative moves, moveVelocity for jogging, home for homing, and stop methods that send the correct controller commands to the hardware.

Can I use this approach for a controller with multiple axes?

Yes, this architecture applies to building hardware-specific motion support for one controller with multiple axes, using the asynMotorController subclass for axis management and asynMotorAxis subclasses for per-axis motion logic.

Why does my EPICS motor driver status not update without callParamCallbacks?

EPICS motor driver status updates require calling callParamCallbacks() inside the poll() method after setting motor status parameters like done, moving, comms errors, and limits, ensuring records receive accurate per-axis updates.