ACSpy-0.0.4
توضیحات
Package for working with ACS motion controllers.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | ACSpy-0.0.4 |
| نام | ACSpy |
| نسخه کتابخانه | 0.0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Pete Bachant |
| ایمیل نویسنده | petebachant@gmail.com |
| آدرس صفحه اصلی | https://github.com/petebachant/ACSpy.git |
| آدرس اینترنتی | https://pypi.org/project/ACSpy/ |
| مجوز | MIT |
ACSpy
=====
A Python package for working with ACS motion controllers.
Installation
------------
Execute
pip install acspy
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()
```
نحوه نصب
نصب پکیج whl ACSpy-0.0.4:
pip install ACSpy-0.0.4.whl
نصب پکیج tar.gz ACSpy-0.0.4:
pip install ACSpy-0.0.4.tar.gz