Twomag
This module contains the TwoMagStirrer class, which is a wrapper for the TwoMagDevice class.
CLASS | DESCRIPTION |
---|---|
TwoMagStirrer |
A class that wraps the TwoMagDevice class and provides a higher level of abstraction for the 2Mag stirrer. |
Documentation last updated: 2025-02-22
TwoMagStirrer
TwoMagStirrer(
port: str,
address: str = "A",
model: str = MTP6,
*,
verbose: bool = False,
simulation: bool = False,
**kwargs,
)
Bases: Maker
2Mag stirrer class
ATTRIBUTE | DESCRIPTION |
---|---|
address |
The address of the device
TYPE:
|
model |
The model of the device
TYPE:
|
power |
Power of device in percentage
TYPE:
|
speed |
Speed of device in RPM
TYPE:
|
connection_details |
connection details for the device
TYPE:
|
device |
device object that communicates with physical tool
TYPE:
|
flags |
flags for the class
TYPE:
|
is_busy |
whether the device is busy
TYPE:
|
is_connected |
whether the device is connected
TYPE:
|
verbose |
verbosity of class
TYPE:
|
METHOD | DESCRIPTION |
---|---|
connect |
connect to the device |
disconnect |
disconnect from the device |
execute |
execute task |
resetFlags |
reset all flags to class attribute _default_flags |
run |
alias for execute() |
shutdown |
shutdown procedure for tool |
getPower |
get the power of the device |
getSpeed |
get the speed of the device |
getStatus |
get the status of the device |
setDefault |
set the device to default |
setPower |
set the power of the device |
setSpeed |
set the speed of the device |
start |
start the device |
stop |
stop the device |
Initialize a TwoMagStirrer object
PARAMETER | DESCRIPTION |
---|---|
port
|
The port to which the device is connected
TYPE:
|
address
|
The address of the device. Defaults to 'A'.
TYPE:
|
model
|
The model of the device. Defaults to MIXdrive.MTP6.
TYPE:
|
verbose
|
Whether to print out debug information. Defaults to False.
TYPE:
|
simulation
|
Whether to simulate the device. Defaults to False.
TYPE:
|
getPower
Get the power of the device
RETURNS | DESCRIPTION |
---|---|
int
|
The power of the device in percentage
TYPE:
|
getSpeed
Get the speed of the device
RETURNS | DESCRIPTION |
---|---|
int
|
The speed of the device in RPM
TYPE:
|
getStatus
Get the status of the device
RETURNS | DESCRIPTION |
---|---|
tuple[str, str]
|
tuple[str,str]: A tuple containing the status of the device |
setDefault
Set the device to default
RETURNS | DESCRIPTION |
---|---|
bool
|
Whether the device was set to default
TYPE:
|
setPower
Set the power of the device
PARAMETER | DESCRIPTION |
---|---|
power
|
The power to set the device to
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
int
|
The power of the device in percentage
TYPE:
|
setSpeed
Set the speed of the device
PARAMETER | DESCRIPTION |
---|---|
speed
|
The speed to set the device to
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
int
|
The speed of the device in RPM
TYPE:
|
start
Start the device
RETURNS | DESCRIPTION |
---|---|
bool
|
Whether the device was started
TYPE:
|