Direct Encoder Stepper Stage Self Test

Source Code
Category: Diagnostics
Python
June 10, 2023

Direct Encoder Stepper Stage Self Test

By Nathan Paolini

These are scripts that can be run with a Zaber stepper motor driven direct encoder stage to allow the stage to analyze its own performance.

accuracy_plot.png

Hardware Requirements

A linear or rotary direct encoder stepper motor stage.

Dependencies / Software Requirements / Prerequisites

The script uses pdm to manage virtual environment and dependencies:

Instructions on how to install it can be found on the official pdm project page.

The dependencies are listed in pyproject.toml.

Configuration

Edit the following constants in the script to fit your setup before running the script:

  • SERIAL_PORT: the serial port that your device is connected to. For more information on how to identify the serial port, see Find the right serial port name.
  • AXIS: the axis number to test.

Running the Scripts

Once everything has been configured, you can set up the environment with:

cd examples/self_test_direct_encoder_stage/
pdm install

Then, run either the accuracy or settling-time script:

pdm run accuracy
pdm run settling-time

Script Purpose

Zaber stepper motor stages with direct encoders are capable of measuring their own open loop performance.

  • src/self_test_direct_encoder_stage/accuracy.py allows a stage to test it's open loop accuracy or repeatability.
  • src/self_test_direct_encoder_stage/settling_time.py allows a stage to determine its move-and-settle time for a variety of settings and step sizes.