Skip to main content

Add your description here

Project description

PyMDrive

PyMDrive is a python driver for MDrive motors. It has wrappers for standard commands (home, move absolute, move relative, etc.) and any other MCode command can be added easily.

Installation

It is easiest to install with pip: pip install pymdrive

You can also install with uv by cloning the repo and using uv sync.

Usage

To get started do

from pymdrive import MdriveAxis, MdriveComm

COMM = MdriveComm("COM3")
await COMM.start()

X = MdriveAxis(comm=COMM, name="X")
Y = MdriveAxis(comm=COMM, name="Y")

This initializes the COMM and starts its asynchronous queue for processing commands without race conditions. The COMM is then passed to Axis instances where the names are those specified on the motors memory.

From there, you can send standard commands

await X.move_relative(1000)

await Y.move_absolute(0)

There's a testing.ipynb notebook in the tests directory with these and other commands.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymdrive-1.0.0.tar.gz (10.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymdrive-1.0.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pymdrive-1.0.0.tar.gz.

File metadata

  • Download URL: pymdrive-1.0.0.tar.gz
  • Upload date:
  • Size: 10.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for pymdrive-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9104bf9eaabe480ee2e8621decb0fd0f82bbd1e1ed7c317be0d7e052596c376d
MD5 802cc7250c2f3dae6cf884e38e9ac08b
BLAKE2b-256 911afa2a0b06ecbd0909da3527174bde2803f96fad577df3a620998d35b48be3

See more details on using hashes here.

File details

Details for the file pymdrive-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pymdrive-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for pymdrive-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a7a0c749ee0410e8086e802eef5ecf004d3dd76f2b2320d7fd3f9b1041bd055
MD5 ad3a8c684e5f2812e7d81f7ffadcd1f1
BLAKE2b-256 f7a23165e13ea32692ec8d7764c1aaa3bdca0ca3c0ff2a18686d16c464e8d308

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page