Interface to Mettler Toledo balances and scales that use the Mettler Toledo Standard Interface Command Set (MT-SICS).
Project description
mettler_toledo_device_python
======================
This Python package (mettler\_toledo\_device) creates a class named
MettlerToledoDevice, which contains an instance of
serial\_device2.SerialDevice and adds methods to it to interface to
Mettler Toledo balances and scales that use the Mettler Toledo
Standard Interface Command Set (MT-SICS).
Authors::
Peter Polidoro <polidorop@janelia.hhmi.org>
License::
BSD
Example Usage::
from mettler_toledo_device import MettlerToledoDevice
dev = MettlerToledoDevice() # Automatically finds device if one available
dev = MettlerToledoDevice('/dev/ttyUSB0') # Linux
dev = MettlerToledoDevice('/dev/tty.usbmodem262471') # Mac OS X
dev = MettlerToledoDevice('COM3') # Windows
dev.get_serial_number()
1126493049
dev.get_balance_data()
['XS204', 'Excellence', '220.0090', 'g']
dev.get_weight_stable()
[-0.0082, 'g'] #if weight is stable
None #if weight is dynamic
dev.get_weight()
[-0.6800, 'g', 'S'] #if weight is stable
[-0.6800, 'g', 'D'] #if weight is dynamic
dev.zero_stable()
True #zeros if weight is stable
False #does not zero if weight is not stable
dev.zero()
'S' #zeros if weight is stable
'D' #zeros if weight is dynamic
devs = MettlerToledoDevices() # Automatically finds all available devices
dev = devs[0]
======================
This Python package (mettler\_toledo\_device) creates a class named
MettlerToledoDevice, which contains an instance of
serial\_device2.SerialDevice and adds methods to it to interface to
Mettler Toledo balances and scales that use the Mettler Toledo
Standard Interface Command Set (MT-SICS).
Authors::
Peter Polidoro <polidorop@janelia.hhmi.org>
License::
BSD
Example Usage::
from mettler_toledo_device import MettlerToledoDevice
dev = MettlerToledoDevice() # Automatically finds device if one available
dev = MettlerToledoDevice('/dev/ttyUSB0') # Linux
dev = MettlerToledoDevice('/dev/tty.usbmodem262471') # Mac OS X
dev = MettlerToledoDevice('COM3') # Windows
dev.get_serial_number()
1126493049
dev.get_balance_data()
['XS204', 'Excellence', '220.0090', 'g']
dev.get_weight_stable()
[-0.0082, 'g'] #if weight is stable
None #if weight is dynamic
dev.get_weight()
[-0.6800, 'g', 'S'] #if weight is stable
[-0.6800, 'g', 'D'] #if weight is dynamic
dev.zero_stable()
True #zeros if weight is stable
False #does not zero if weight is not stable
dev.zero()
'S' #zeros if weight is stable
'D' #zeros if weight is dynamic
devs = MettlerToledoDevices() # Automatically finds all available devices
dev = devs[0]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
mettler_toledo_device-1.3.zip
(12.3 kB
view hashes)
Close
Hashes for mettler_toledo_device-1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fde5dd15a9149ae7328f235ab5047a64bec51c666d5a81a2cd7d4e22a9bbc0db |
|
MD5 | b1a58c66702d85efa70bb1b11c4d837e |
|
BLAKE2b-256 | 3a3eea09b01b5463279bd4ffec101474457224a013dd0ea07d8436c1ea99a28a |