Skip to main content

PyAutomation

License Python

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.

back to top


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.

Metadata

Release files for PyAutomation 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyAutomation 0.0.1
File Size Uploaded
pyautomation-0.0.1.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyAutomation 0.0.1
File Interpreter ABI Platform
PyAutomation-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.6 kB

Release files / pyautomation-0.0.1.tar.gz

Download URL pyautomation-0.0.1.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a8be58851fd0f8dedd8c297e703f45e0dc73a08cd14828dc984572f476326c1d
BLAKE2b-256 checksum
How to use checksums
f25fc1a1f671b376da163fc13c00b1fd561334a27a0e58d1fbf2aa2c04556d8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / PyAutomation-0.0.1-py3-none-any.whl

Download URL PyAutomation-0.0.1-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ab50e890766686c408de906832b60832b4bedfb691c7849fc11d295ce85fc1c
BLAKE2b-256 checksum
How to use checksums
79d780e1d8029ed9784dbc793f309cfbb961dd4c02f344f9d1798a2fc1c5d8d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page