diff --git a/slic/utils/hastyepics.py b/slic/utils/hastyepics.py index 1945bc81a..bdc8e3974 100644 --- a/slic/utils/hastyepics.py +++ b/slic/utils/hastyepics.py @@ -10,6 +10,21 @@ def get_pv(*args, connect=False, timeout=0, **kwargs): return _get_pv(*args, connect=connect, timeout=timeout, **kwargs) +################################################################ en +++++++++++ +_ORIG_PUT = epics.PV.put + +# put with a sleep : needed for platforms like IOC +def put(self, value, *args, **kwargs): + kwargs.setdefault("wait", True) + kwargs.setdefault("timeout", 0.1) + + res = _ORIG_PUT(self, value, *args, **kwargs) + time.sleep(0.2) + return res + +# Monkey patch global +epics.PV.put = put +################################################################### # this is a copy of the epics.Motor constructor with some modifications class Motor(epics.Motor):