diff --git a/DG_PY_Kalypso.py b/DG_PY_Kalypso.py index 3098c80e73c4a12b2a716f022185f5896273bddc..c27cf3c6fe9308b223ee993f9acf245b35ffc9c0 100644 --- a/DG_PY_Kalypso.py +++ b/DG_PY_Kalypso.py @@ -198,6 +198,13 @@ class StateThread(Thread): str_state = 'acquisition in progress...please be patient' else: str_state = 'acquisition in progress...please be patient -to stop acquisition send Stop command' + elif self.mother.Local_synchro_attr!="": + loc_syn_attr=tango.AttributeProxy("self.mother.Local_synchro_attr") + loc_syn_attr_state=loc_syn_attr.state() + loc_syn_attr_value=loc_syn_attr.read().value + if loc_syn_attr_value != 3 or loc_syn_attr_state != tango.DevState.ON: + self.mother.set_state(tango.DevState.ALARM) + str_state = 'Please check Local synchro card' elif ps_outut == False: self.mother.set_state(tango.DevState.ALARM) str_state = 'Alarm Power_supply Off' @@ -739,6 +746,10 @@ class DG_PY_KalypsoClass(PyTango.DeviceClass): [PyTango.DevBoolean, "If you dont want to keep files when you are in Star sequence mode", [False]], + 'Local_synchro_attr': + [PyTango.DevString, + "check if local synchro was in good state to trig kalypso", + [] ], } diff --git a/DG_PY_Kalypso.xmi b/DG_PY_Kalypso.xmi index 58535ab4d60f54d31e1a1e14383c2916c5c4f53a..5a4c29b0f6ee6525b29e98039dfb8e0c8fd283d4 100644 --- a/DG_PY_Kalypso.xmi +++ b/DG_PY_Kalypso.xmi @@ -75,6 +75,10 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <DefaultPropValue>False</DefaultPropValue> </deviceProperties> + <deviceProperties name="Local_synchro_attr" description="check if local synchro was in good state to trig kalypso"> + <type xsi:type="pogoDsl:StringType"/> + <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> + </deviceProperties> <commands name="State" description="This command gets the device state (stored in its device_state data member) and returns it to the caller." execMethod="dev_state" displayLevel="OPERATOR" polledPeriod="0"> <argin description="none"> <type xsi:type="pogoDsl:VoidType"/>