A python library used to interface with the Aerotech automation1 controller API.
Project description
PyAutomation
A simple library used to interface with the Aerotech automation1 controller API.
Table of Contents
Installation
There are two methods that you can install the library:
Requirements
Before you begin, ensure you have met the following requirements:
Python >= 3.12
Aerotech automation1 API - click here for more information
PyPI
To install from PyPI run:
pip install pyautomation
Source
To install the library from source, first clone the repository and navigate into the project directory:
git clone https://github.com/GSECARS/PyAutomation.git && cd PyAutomation
If you want to install the project in development mode run:
pip install -e ".[development]"
otherwise just run:
pip install .
Usage
⚠️ Warning: To work around how PSO functions, an additional step is added as a taxi distance for each trajectory. For example, if you are running a trajectory from 0 to 10 with a step size of 2, the starting position will be at -2. This is a work in progress, more testing is required!
Below is an example of how to use the PyAutomation library to control an Aerotech automation1 controller, tested to work with the iXC4e.
First, import the necessary modules and create the AutomationAxis and PyAutomation objects:
from automation1 import PsoDistanceInput, PsoWindowInput, PsoOutputPin
from pyautomation import PyAutomation
from pyautomation.controller import AutomationAxis
from pyautomation.modules import Trajectory
# Create the Axis objects.
theta_axis = AutomationAxis(name="Theta", counts_per_unit=1491308.0888888889)
# Create the PyAutomation object
pyautomation = PyAutomation(
ip="10.54.160.27",
axis=[theta_axis],
verbose=True,
pso_distance_input=PsoDistanceInput.iXC4ePrimaryFeedback,
pso_window_input=PsoWindowInput.iXC4ePrimaryFeedback,
pso_output_pin=PsoOutputPin.iXC4eAuxiliaryMarkerDifferential,
)
Next, create a Trajectory object and configure it with the desired parameters:
trj = Trajectory(start_position=0, end_position=3.0, exposure=1, number_of_pulses=3, travel_direction=1)
Enable the controller, load the trajectory, run it, and then disable the controller:
pyautomation.enable_controller()
pyautomation.load_trajectory(trj)
pyautomation.run_trajectory()
pyautomation.disable_controller()
Contributing
All contributions to PyAutomation are welcome! Here are some ways you can help:
- Report a bug by opening an issue.
- Add new features, fix bugs or improve documentation by submitting a pull request.
Please adhere to the GitHub flow model when making your contributions! This means creating a new branch for each feature or bug fix, and submitting your changes as a pull request against the main branch. If you're not sure how to contribute, please open an issue and we'll be happy to help you out.
By contributing to PyAutomation, you agree that your contributions will be licensed under the MIT License.
License
PyAutomation is distributed under the MIT license. You should have received a copy of the MIT License along with this program. If not, see https://mit-license.org/ for additional details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyautomation-0.0.1.tar.gz
.
File metadata
- Download URL: pyautomation-0.0.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8be58851fd0f8dedd8c297e703f45e0dc73a08cd14828dc984572f476326c1d |
|
MD5 | fc6241d32e26c0c670a4dc6f9ec375a6 |
|
BLAKE2b-256 | f25fc1a1f671b376da163fc13c00b1fd561334a27a0e58d1fbf2aa2c04556d8f |
File details
Details for the file PyAutomation-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: PyAutomation-0.0.1-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ab50e890766686c408de906832b60832b4bedfb691c7849fc11d295ce85fc1c |
|
MD5 | e59cc7316ddf4bcfb771432c68119575 |
|
BLAKE2b-256 | 79d780e1d8029ed9784dbc793f309cfbb961dd4c02f344f9d1798a2fc1c5d8d8 |