Closed prjemian closed 3 years ago
Alternatively, the existing set_default_timeout()
and proposed set_default_auto_monitor()
methods could be combined into a single set_defaults()
method and thus remove duplicated code and comments.
This change should be left to the installation to implement and not defined in a package such as apstools. The issue can be applied to the suggested default configuration for new installations.
Implementation is dependent on availability of new (since ophyd 1.5.4) ophyd.signal.set_defaults()
method. Test for that and warn if not available. The test can be removed once new release of ophyd includes this change (pulled to master this week) and the new ophyd release number is a minimum installation requirement.
This is waiting on the next release of ophyd (either 1.5.5 or 1.6.0) that includes PR https://github.com/bluesky/ophyd/pull/931.
This is the new code:
# set default timeout for all EpicsSignalBase connections & communications
from ophyd.signal import EpicsSignalBase
EpicsSignalBase.set_defaults(
auto_monitor=True,
connection_timeout=5,
timeout=10,
write_timeout=60,
)
Per https://github.com/prjemian/ipython-aps/issues/3#issuecomment-719347017, the random PV read timeout affects measurements at APS beam lines. It is reproducible in a non-deterministic time interval since the occurrence is random.
In
ophyd.EpicsSignal
andophyd.EpicsSignalRO
, the default isauto_monitor=False
. Need to change that default toauto_monitor=True
for all.