pylabrobot.mettler_toledo.MTSICSDriver#

class pylabrobot.mettler_toledo.MTSICSDriver(port: str | None = None, vid: int = 1027, pid: int = 24577)#

Bases: object

Driver for Mettler Toledo scales using the MT-SICS protocol.

MT-SICS (Mettler Toledo Standard Interface Command Set) is the serial communication protocol used by Mettler Toledo’s Automated Precision Weigh Modules. This driver is compatible with any MT-SICS device, including the WXS, WMS, and WX series.

During setup(), the driver queries I0 to discover which commands the connected device supports, then queries the device identity and firmware. send_command will raise MettlerToledoError if the command is not in the device’s I0 command list.

Tested on the WXS205SDU (used by Hamilton in the Liquid Verification Kit).

Spec: https://web.archive.org/web/20240208213802/https://www.mt.com/dam/ product_organizations/industry/apw/generic/11781363_N_MAN_RM_MT-SICS_APW_en.pdf

From the spec (Section 2.2):

“If several commands are sent in succession without waiting for the corresponding responses, it is possible that the weigh module/balance confuses the sequence of command processing or ignores entire commands.”

Methods

__init__([port, vid, pid])

Create a new MT-SICS driver.

cancel_all()

C - Cancel all active and pending interface commands.

clear_tare()

Clear tare weight value.

measure_temperature()

Read the current temperature from the scale's internal sensor in degrees C.

read_dynamic_weight(timeout)

Read a stable weight value within a given timeout, or return the current weight value if stability is not reached.

read_stable_weight()

Read a stable weight value from the scale.

read_stable_weight_repeat_on_change()

Start sending stable weight values on every stable weight change.

read_weight([timeout])

High level function to read a weight value from the scale.

read_weight_value_immediately()

Read a weight value immediately from the scale.

request_adjustment_history()

Query the adjustment (calibration) history.

request_adjustment_setting()

Query the current adjustment setting.

request_adjustment_weight()

Query the adjustment weight setting.

request_assortment_type_revision()

Query the revision of assortment type tolerances.

request_auto_zero()

Query the current auto zero setting.

request_capacity()

Query the maximum weighing capacity in grams.

request_date()

Query the current date from the device.

request_device_id()

Query the user-assigned device identification string.

request_device_info([category])

Query detailed device information for a specific category.

request_device_type()

Query the device type string.

request_environment_condition()

Query the current environment condition setting.

request_filter_cutoff()

Query the filter cut-off frequency.

request_firmware_version()

Query the firmware version and type definition number.

request_model_designation()

Query the model designation string.

request_net_weight_with_status()

Query net weight with unit and weighing status in one call.

request_next_service_date()

Query the date when the balance is next due to be serviced.

request_operating_mode()

Query the operating mode after restart.

request_operating_mode_after_restart()

Query the operating mode after restart.

request_profact_day()

Query ProFACT day of the week.

request_profact_temperature_criterion()

Query ProFACT/FACT temperature criterion.

request_profact_time()

Query ProFACT time criteria.

request_profact_time_criteria()

Query ProFACT single time criteria.

request_readability()

Query the readability setting.

request_remaining_weighing_range()

Query remaining maximum weighing range in grams.

request_serial_number()

Get the serial number of the scale.

request_serial_parameters()

Query current serial interface parameters.

request_software_material_number()

Query the software material number (SW-ID).

request_stability_criteria()

Query the user-defined stability criteria.

request_tare_weight()

Query tare weight value from scale's memory.

request_test_settings()

Query current test function settings.

request_test_weight()

Query the test weight setting.

request_time()

Query the current time from the device.

request_update_rate()

Query the current update rate for SIR/SIRU streaming.

request_uptime_minutes()

Query the uptime in minutes since last start or restart.

request_user_settings()

Query all current user-configurable settings.

request_weighing_mode()

Query the current weighing mode.

request_weighing_value_release()

Query the weighing value release setting.

request_zeroing_mode()

Query the zeroing mode at startup.

reset()

@ - Reset the device to a determined state (spec Section 2.2).

send_command(command[, timeout])

Send a command to the scale and read all response lines.

set_date(day, month, year)

Set the device date.

set_device_id(device_id)

Set the user-assigned device identification string.

set_display_text(text)

Write text to the display.

set_host_unit_grams()

Set the host output unit to grams.

set_time(hour, minute, second)

Set the device time.

set_weight_display()

Restore the normal weight display.

setup()

Connect to the scale, reset to clean state, discover identity and supported commands.

stop()

Reset the device to a clean state and close the serial connection.

tare([timeout])

Tare the scale.

tare_immediately()

Tare the scale immediately.

tare_stable()

Tare the scale when the weight is stable.

tare_timeout(timeout)

Tare the scale after a given timeout.

zero([timeout])

Zero the scale.

zero_immediately()

Zero the scale immediately.

zero_stable()

Zero the scale when the weight is stable.

zero_timeout(timeout)

Zero the scale after a given timeout.

Parameters: