Skip to content

Restructure software interlock

Emily Anne Thompson requested to merge restructure_apr11 into main

Restructure software interlock code. Now there are 3 classes:

  1. SoftwareInterlock: Top-level class that handles configuration of software interlock, control of lab equipment in case of shut-down, and sending alerts. Has an overall status of either 0 (all good) or 2 (interlock triggered).
  2. Quantity: Calculated quantity that the software interlock monitors. May be derived from the data of 1 or more sensors. Each quantity has a status of either 0 (all good), 1 (in warning stage), or 2 (in critical state).
  3. Sensor: Class than handles querying of data from influxDB, 1 for each sensor.

The SoftwareInterlock class continuously monitors all of its Quantities, if any of them change state (from 0 to 1 or vice versa), a single email is sent to the user. If any of them change to critical stage (2), then the state of the SoftwareInterlock goes to critical (2), which means the lab equipment is locked and the system is shut down in a way that is specific to whichever Quantity went into critical state. The user must restart the SW-interlock, even if all quantities go back to the all clear status.

Basic tests were performed with dry air flow sensor. More rigorous testing is still needed and there are a few to-do items: #1

Edited by Emily Anne Thompson

Merge request reports