Skip to main content

Theia MCR motor control functions

Project description

Theia Technologies motor control board interface

Theia Technologies offers a MCR600 motor control board for controlling Theia's motorized lenses. This board controls focus, zoom, iris, and IRC filter motors. It can be connected to a host comptuer by USB, UART, or I2C connection.

Features

python The MCR600 board (and MCR400, MCR500 and others in the MCR series) has a proprietary command protocol to control and get information from the board. The protocol is a customized string of up to 12 bytes which can be deciphered in the MCR600 documentation. For ease of use, Theia has developed this Python module to format the custom byte strings and send them to the board. The user can request the focus motor to move 1000 steps for example. The focusRel function will convert this request to the appropriate byte string and send it over USB connection to the MCR control board. This will cause the lens motor to move 1000 steps.

Quick start

This module can be loaded into a Python program using pip.
pip install TheiaMCR Theia's motorized lens should be connected to the MCR600 board and the board should be connected to the host computer via USB connection thorugh a virtual com port.
There are functions to initialize the board and motors and to control the movements (relative, absolute, etc). The board must be initizlized first using the MCRControl init function. Then the motors must all be initialized with their steps and limit positions. The init commands will create instances of the motor class for each motor which can be accessed by focus, zoom, and iris named instances.

Functions

Initialization functions

  • create a MCRControl class instance to initialize the board communications
  • focusInit, zoomInit, irisInit: initialize the motors
  • IRCInit: initialize the IR cut filter motor

Motor movement functions

  • IRCState: set the filter switch state to 0 or 1 (For the following functions "motor" is replaced with "focus", "zoom" or "iris")
  • motor.home: send the motor to the home position and set the current step number
  • motor.moveAbs: move the motor to an absolute step number after sending it to home first. Moving to absolute step < 0 is possible if setRespectLimits(False).
  • motor.moveRel: move by a relative number of steps

Information and setting functions

  • MCRBoard.readFWRevision: read board firmware revision
  • MCRBoard.readBoardSN: read board serial number
  • motor.setMotorSpeed: set the motor speed in pulses per second (pps)
  • motor.setRespectLimits: turn on or off the home position limit stops for focus and zoom

Important variables

Each motor has these variables available

  • motor.currentStep: current motor step number
  • motor.currentSpeed: current motor speed in pulses per second (pps)
  • motor.maxSteps: maximum number of steps for the full range of movement
  • motor.PIStep: photointerrupber limit switch step position (within the full range of movement). After sending the motor to home, the current step will be set to this PIStep number.

License

Theia Technologies BSD license Copyright 2023 Theia Technologies

Contact information

For more information contact: Mark Peterson at Theia Technologies mpeterson@theiatech.com

Revision

v.2.0.7

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TheiaMCR-2.0.7.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

TheiaMCR-2.0.7-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file TheiaMCR-2.0.7.tar.gz.

File metadata

  • Download URL: TheiaMCR-2.0.7.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for TheiaMCR-2.0.7.tar.gz
Algorithm Hash digest
SHA256 4aa6d11c3e8d3fae951bd0d2e10a7c9b94b64a49bc0eec7db2c73ea86d7891ce
MD5 eadc3cf2415b4e2b618e37151be8cce4
BLAKE2b-256 1d28f4fd77d79c51f10cb6a3ed9ce40d617a9c8c92e3377d3769f598d0f1de0d

See more details on using hashes here.

Provenance

File details

Details for the file TheiaMCR-2.0.7-py3-none-any.whl.

File metadata

  • Download URL: TheiaMCR-2.0.7-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for TheiaMCR-2.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 91e0752c2b90de53b425bd9c836c5836ab69b69d66600ca212ca5c93946b3608
MD5 de4f57c040a8ec7baaedcee7c5211239
BLAKE2b-256 9d55aa5e4fc65aac64466cca9a6a87c18a3ebe43a6894fd38e4726a0d34c5529

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page