GithubHelp home page GithubHelp logo

augre / acspy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from petebachant/acspy

0.0 2.0 0.0 50 KB

Python package for working with ACS motion controllers.

License: MIT License

Python 100.00%

acspy's Introduction

ACSpy

A Python package for working with ACS motion controllers. Note that this project is not affiliated with or endorsed by ACS Motion Control.

Installation

Note that the ACS motion control SPiiPlus User-Mode Driver must be installed and running. Contact ACS to obtain this software.

This Python package can be installed from PyPI via pip with

pip install acspy

To install from the source, clone locally and execute

python setup.py install

Usage

Using the acsc module

The acsc module is designed to mimic the syntax of the ACS C library that it wraps.

>>> from acspy import acsc
>>> hcomm = acsc.openCommDirect()
>>> acsc.enable(hcomm, 0)
>>> acsc.getMotorState(hcomm, 0)
{'moving': False, 'enabled': True, 'in position': True, 'accelerating': False}
>>> acsc.closeComm(hcomm)

Using the Controller object

The control module provides an object-oriented interface to the controller, making code development more intuitive. An example of its use:

>>> from acspy.control import Controller
>>> controller = Controller(contype="simulator", n_axes=4)
>>> controller.connect()
>>> axis0 = controller.axes[0]
>>> axis0.enable()
>>> axis0.enabled
True
>>> axis0.ptp(500.5)
>>> axis0.rpos
500.5
>>> axis0.disable()
>>> controller.disconnect()

acspy's People

Contributors

hstarmans avatar petebachant avatar ralic avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.