Experimental Physics and
| |||||||||||||||||
|
Hi Terry, On Mon, Dec 2, 2019 at 11:00 PM CORNALL, Terry via Tech-talk <[email protected]> wrote:
You are right that the `timeout` to the underlying `PV.get()` is not exposed through the Motor `get()` method. It probably should be, and that would be easy to fix. You could first lookup the PV for the specific motor attribute and use its `get()` method, perhaps like m = epics.Motor('SR10BM01SPAL03:SPIN’, jog_speed = m.PV('JVEL').get(timeout=10.0) That would require knowing how the Motor Devices' PVs are indexed which is by "field suffix" ('VAL', 'JVAL', 'HOPR', and so forth), so that whereas you could get that jog speed using jog_speed = m.get('jog_speed') you could not do jog_speed = m.PV('jog_speed').get() # Nope, have to use 'JVEL' Note also that there is sort of a double use for the `timeout` argument in `PV.get()`. First, it is used as a connection timeout if the PV is not already connected. Then it is used as the timeout to get the actual data. That means that if the PV really is not connected, `PV.get(timeout=5.0)` really will return after 5+delta seconds (delta ~1ms). If the PV is very slow to connect and fetch the data, it could take longer than 5 seconds. I don't think I've ever seen that situation, but it is possible. I'll put "expose get() timeout to Devices and Motors" on the to-do list. --Matt
| ||||||||||||||||
ANJ, 03 Dec 2019 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |