Skip to content

Latest commit

History

92 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Standa Controllers

Low-level Python or simplified wrapper modules to send commands to Standa controllers.

Currently Supported Models

  • 8SMC5 - smc8.py

Features

  • Connect to Standa Controllers
  • Query state and parameters
  • Move individual axes to absolute or relative positions

Usage

smc8.py Example

importtimefromsmc8importSmcController# Open connection examples dev=SmcController(log=False)
dev.connect(device_str="192.168.31.123/9219", connection_type="xinet")
# ORdev.connect(device_str="/dev/ximc/00007DF6", connection_type="serial")
time.sleep(.25)
# Initialize dev instancedev.initialize() # checks statusstatus=dev.status() # Homes devicedev.home() time.sleep(5) #Give time for stage to move# Query Positionpos=dev.get_pos() # Query Position# Move to absolute positiondev.set_pos(position=5) #positive ot negativetime.sleep(5)
# Move to position relative of its current posdev.set_pos(position=10, abs_move=False) time.sleep(5)
# Perform absolute movedev.move_abs(100)
# Perform relative movedev.move_rel(-20)
print(dev.get_pos()) # Should be 80dev.home()
time.sleep(5)
#Close connectiondev.disconnect()

🧪 Testing

Unit tests are located in tests/ directory.

TODO: Make "Mock test" for PPC102 get_position and get_status which threw errors and was removed. Assumed to be due to the byte and int convertion

To run tests from the project root based on what you need: Software check:

pytest -m unit

Connection Test:

pytest -m default

Functionality Test:

pytest -m functional

About

Low-level Python modules for standa products

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages