diff --git a/csaxs_bec/devices/sim/sim_omny.py b/csaxs_bec/devices/sim/sim_omny.py index 929310fc..f0574620 100644 --- a/csaxs_bec/devices/sim/sim_omny.py +++ b/csaxs_bec/devices/sim/sim_omny.py @@ -334,12 +334,19 @@ _TEMP_CHANNELS = { 47: ("Park_Cryo_L", "K", 140, 100.0, 73.2), } +# CryoCon channels ("CRYO" bank, cryo_temperature1-4 -> A-D). Closed-loop controlled, +# so the simulated reading is put at the real setpoint. Channel D has no known real +# use yet -- left unseeded (shows as "0"/0.00; the CRYO branch of show_all() has no +# name-based hiding, unlike the TEMP bank). +# controller number (1=A, 2=B, 3=C, 4=D): (name, reading/setpoint in K) +_CRYO_CHANNELS = {1: ("Cryo sample", 90.0), 2: ("Cryo head", 82.0), 3: ("Sample backup", 90.0)} + class SimOMNYTemperatures(OMNYTemperatures): """OMNYTemperatures with all EPICS PVs replaced by in-memory mock PVs, seeded with realistic per-channel names/units/readings/setpoints for the 29 real "TEMP" - channels (see _TEMP_CHANNELS above). The 4 "CRYO" channels are not seeded yet -- - pending the cryocon controller reference. + channels (see _TEMP_CHANNELS above) and the 3 known "CRYO" channels (see + _CRYO_CHANNELS above). """ def __new__(cls, *args, **kwargs): @@ -361,6 +368,18 @@ class SimOMNYTemperatures(OMNYTemperatures): getattr( temperatures.temperature_alarmstate, f"temperature_alarmstate{channel}" ).put(0) + for controller_nr, (name, reading) in _CRYO_CHANNELS.items(): + getattr( + temperatures.cryo_temperature_name, f"cryo_temperature_name{controller_nr}" + ).put(name) + getattr(temperatures.cryo_temperature, f"cryo_temperature{controller_nr}").put( + reading + ) + getattr( + temperatures.cryo_temperature_setpoint, + f"cryo_temperature_setpoint{controller_nr}", + ).put(reading) + temperatures.cryo_temperature_closed_loop.put(1) temperatures.temperature_update_time.put(now) temperatures.cryo_temperature_update_time.put(now) return temperatures