pyopticon.majumdar_lab_widgets.omega_usb_utc_widget module
- class pyopticon.majumdar_lab_widgets.omega_usb_utc_widget.OmegaUSBUTCWidget(parent_dashboard, name, nickname, default_serial_port)
Bases:
GenericWidgetWidget for an Omega USB-UTC thermocouple reader. A USB-UTC converts a single thermocouple (using the usual 2-prong thermocouple connection) into a USB signal. The Omega thermocouple reader desktop app can be used to set what type of thermocouple (K-type, etc.) is assumed.
- Parameters:
parent_dashboard (pyopticon.dashboard.PyOpticonDashboard) – The dashboard object to which this device will be added
name (str) – The name that the widget will be labeled with, and under which its data will be logged, e.g. “Methane Mass Flow Controller”
nickname (str) – A shortened nickname that can be used to identify the widget in automation scripts, e.g. “CH4 MFC”
default_serial_port (str) – The name of the default selected serial port, e.g. ‘COM9’
- on_failed_serial_open()
If serial opened unsuccessfully, set readouts to ‘No Reading’
- on_update()
Update the device by polling the serial connection.
- on_serial_query()
Send a query to the serial device asking for the temperature.
- on_serial_read()
Parse the responses from the previous serial query and update the display. Return True if valid and and error string if not.
- Returns:
True if the response was of the expected format, an error string otherwise.
- Return type:
bool or str
- on_serial_close()
When serial is closed, set all readouts to ‘None’.