pystages.m3fs
- class pystages.m3fs.M3FS(dev: str | None = None, baudrate=250000)
Class to command New Scale Technologies M3-FS focus modules in serial mode (VCP). If a M3-FS device is seen as a USBXpress chip, it may be used as a Virtual-Com-Port after a few cumbersome operations (custom driver with correct VID/DID).
- __init__(dev: str | None = None, baudrate=250000)
Connect to the device. If the serial device cannot be opened, a ConnectionFailure exception is thrown. If the device version is not supported, a VersionNotSupported error is thrown.
- Parameters:
dev – Serial device. For instance ‘/dev/ttyUSB0’. If not provided, a suitable device is searched according to according to vendor and product IDs
baudrate – Serial baudrate.
- command(command: M3FSCommand, data=None)
Send a command to the controller and get the response.
- Parameters:
command – Command integer ID.
data – Extra data string.
- Returns:
Response data string.
- property is_moving: bool
Queries the status of the stage to determine if it is moving