A Python package for working with ACS motion controllers.
Installation
git clone https://github.com/petebachant/ACSpy.git
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.
`python >>> 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:
`python >>> 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() `
License
ACSpy Copyright (c) 2013-2014 Peter Bachant
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ACSpy-0.0.1.zip.
File metadata
- Download URL: ACSpy-0.0.1.zip
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7302f71cef526bb22a8f48ba7423291c2e97de7e8296d6662215751dc3ee9471
|
|
| MD5 |
d5ebff76cd9bb23abd3596237e87043e
|
|
| BLAKE2b-256 |
0c9988271d127c9260b05f726f5a593efe78f4bc79547d4ecdd740551615ede2
|