![]() |
![]() ![]()
Experimental Physics and
| ||||||||||||||||
|
Hi Marco, On Fri, Sep 16, 2022 at 1:38 PM Marco A. Barra Montevechi Filho via Tech-talk <tech-talk at aps.anl.gov> wrote:
Sorry for the confusion! For each PV in Channel Access, there are a few choices in "record type": "plain", "severity", "time", "control", and "graphics" (I might be missing one or two). These will change which set of metadata can be retrieved with the data. If I recall correctly, "severity" is a subset of "time" and "graphics" is a subset of "control". "plain" gives no extra metadata, "time" gives timestamp, alarm, and severity, and "control" giving lots of metadata, but importantly not the timestamp. In pyepics, there is a choice of this record type (called "form" in the pyepics code and docs, as "type" is a builtin in Python), with "time" being the default, "plain" and "ctrl" being available. That is mypv = epics.PV(pvname, form='ctrl') will create a PV with all the control metadata available but by default mypv = epics.PV(pvname, form='ctrl') will create a PV with time metadata. Even for a "time" PV, doing `mypv.get_ctrlvars()` will return the "control" metadata (precision, limits, etc). `mypv.get_with_metadata()` will try to give all the available metadata, but it might not explicitly look those up - it might rely on cached values from the last monitor event. The intention for the `use_monitor` option for `mypv.get_with_metadata()` is to control whether those cached values are used, but it does seem to be doing something incorrectly: I'll investigate. I think that the best way to get an accurate and complete set of all the metadata, use mypv.get_with_metadata(with_ctrlvars=True) That will really do a fetch of the current values of the control metadata, or to get the control metadata with mypv.get_ctrlvars() Again, sorry for the confusion. --Matt
| ||||||||||||||||
ANJ, 16 Sep 2022 |
![]() · Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |