diff --git a/undulator.py b/undulator.py index b566bda..8fb7545 100644 --- a/undulator.py +++ b/undulator.py @@ -365,7 +365,10 @@ class ScalerEK: def get_machine_n_und_ref(): - res = PVEnumAdjustable("SARUN:REF-UND").get() + adj = PVEnumAdjustable("SARUN:REF-UND") + res = adj.get() + if res is None: + return None if not res.startswith("SARUN"): return None n = len("SARUN")