Skip to content

Connecting to Smaract-MCS2 by Smaract in Python

Instrument Card

The MCS2 is SmarAct’s most versatile and modular control system.

Its stringent modular design approach makes it the perfect choice for all field of applications

Smaract-MCS2

Device Specification: here

Manufacturer card: SMARACT

SMARACT

In our Motion business unit, we develop and produce high-precision, compact products for nano-positioning that meet the highest demands while being easy to handle

  • Headquarters: USA
  • Yearly Revenue (millions, USD): 15
  • Vendor Website: here

Demo: Send commands to a Polulu stepper motor driver

Connect to the Smaract-MCS2 in Python

PROTOCOLS > SCPI

To connect to a Smaract-MCS2 Motion using Instrumental, you can use the following Python script:

from instrumental import instrument
# Get the list of available instruments
paramsets = list_instruments()
# Connect to the first instrument in the list
dev = instrument(paramsets[0])
# Perform operations on the connected device
dev.move_home()
# Check the current position of the device
pos = dev.check_position()
print("Current position:", pos)
# Close the connection to the device
dev.close()

This script imports the instrument function from the instrumental module and uses it to connect to the first instrument in the list returned by the list_instruments function. It then performs some operations on the connected device, such as moving the device to its home position and checking its current position. Finally, it closes the connection to the device using the close method.