diff --git a/config_params.py b/config_params.py index b94d0425..1bf7be5b 100644 --- a/config_params.py +++ b/config_params.py @@ -83,7 +83,7 @@ class RasterStatus(Enum): DEWAR_SECTORS = {"amx": 8, "fmx": 8, "nyx": 5} PUCKS_PER_DEWAR_SECTOR = {"amx": 3, "fmx": 3, "nyx": 3} -cryostreamTempPV = {"amx": "AMX:cs700:gasT-I", "fmx": "FMX:cs700:gasT-I"} +cryostreamTempPV = {"amx": "XF:17IDB-ES:AMX{CS:1}SAMPLE_TEMP_RBV", "fmx": "FMX:cs700:gasT-I"} VALID_EXP_TIMES = { "amx": {"min": 0.005, "max": 1, "digits": 3}, diff --git a/gui/control_main.py b/gui/control_main.py index fac41044..98e47e66 100644 --- a/gui/control_main.py +++ b/gui/control_main.py @@ -142,7 +142,7 @@ class ControlMain(QtWidgets.QMainWindow): roiChangeSignal = QtCore.Signal(int, str) highMagCursorChangeSignal = QtCore.Signal(int, str) lowMagCursorChangeSignal = QtCore.Signal(int, str) - cryostreamTempSignal = QtCore.Signal(str) + cryostreamTempSignal = QtCore.Signal(object) sampleZoomChangeSignal = QtCore.Signal(object) def __init__(self): @@ -1334,7 +1334,7 @@ def createSampleTab(self): 140, highlight_on_change=False, ) - ringCurrentMessageLabel = QtWidgets.QLabel("Ring(mA):") + ringCurrentMessageLabel = QtWidgets.QLabel("Ring (mA):") self.ringCurrentMessage = QtWidgets.QLabel(str(self.ringCurrent_pv.get())) beamAvailable = self.beamAvailable_pv.get() if beamAvailable: @@ -1350,12 +1350,12 @@ def createSampleTab(self): else: self.sampleExposedLabel = QtWidgets.QLabel("Sample Not Exposed") self.sampleExposedLabel.setStyleSheet("background-color: #99FF66;") - gripperLabel = QtWidgets.QLabel("Gripper Temp:") + gripperLabel = QtWidgets.QLabel("Gripper Temp (K):") if daq_utils.beamline == "nyx": self.gripperTempLabel = QtWidgets.QLabel("N/A") else: self.gripperTempLabel = QtWidgets.QLabel("%.1f" % self.gripTemp_pv.get()) - cryostreamLabel = QtWidgets.QLabel("Cryostream Temp:") + cryostreamLabel = QtWidgets.QLabel("Cryostream Temp (K):") if getBlConfig(CRYOSTREAM_ONLINE): self.cryostreamTempLabel = QtWidgets.QLabel( str(self.cryostreamTemp_pv.get()) @@ -2074,14 +2074,21 @@ def processFastShutter(self, shutterVal): self.shutterStateLabel.setStyleSheet("background-color: #99FF66;") def processGripTemp(self, gripVal): - self.gripperTempLabel.setText("%.1f" % gripVal) - if int(gripVal) > -170: + gripValKelvin = gripVal + 273.15 + gripValMaxKelvin = 103.15 # -170 in degC + self.gripperTempLabel.setText("%.1f" % gripValKelvin) + if gripValKelvin > gripValMaxKelvin: self.gripperTempLabel.setStyleSheet("background-color: red;") else: self.gripperTempLabel.setStyleSheet("background-color: #99FF66;") def processCryostreamTemp(self, cryostreamVal): - self.cryostreamTempLabel.setText(str(cryostreamVal)) + self.cryostreamTempLabel.setText(f"{cryostreamVal:.2f}") + if cryostreamVal is not None: + if 99 < cryostreamVal < 102: + self.cryostreamTempLabel.setStyleSheet("background-color: #99FF66;") + else: + self.cryostreamTempLabel.setStyleSheet("background-color: red;") def processRingCurrent(self, ringCurrentVal): self.ringCurrentMessage.setText(str(int(ringCurrentVal)))