Skip to main content

Theia MCR motor control functions

Reason this release was yanked:

Module import error

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 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.

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
  • 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

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Contact information

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

Revision

v.2.0.1

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.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

TheiaMCR-2.0.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for TheiaMCR-2.0.1.tar.gz
Algorithm Hash digest
SHA256 2569fe86b2672135caac9437892253d4232721739126ddc6122e6b54d22d774d
MD5 30bb0b3a60114b0103fcf7b4554ea09e
BLAKE2b-256 250b575a8fb76a1f80cc01cc2514d61bc0948215d3d26dff0038006e0c2fbb58

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for TheiaMCR-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8db5689d9ef7e44a66725a12923604660025a9f846ada5c77b51c175106799b1
MD5 f2c46e600a5da2e95efef59e976a0720
BLAKE2b-256 63b59929a595c88179e461463fa18975cb795f588e8760db9c98569dde2c1a8e

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