Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output_value for Epics output record device is only valid for analog inputs #889

Closed
canismarko opened this issue Nov 21, 2023 · 5 comments · Fixed by #891
Closed

output_value for Epics output record device is only valid for analog inputs #889

canismarko opened this issue Nov 21, 2023 · 5 comments · Fixed by #891
Assignees
Labels
Milestone

Comments

@canismarko
Copy link
Collaborator

I tried to use the EpicsRecordOutputFields device to map to an EPICS 'bo' record, and received an error message telling me that there is no .OVAL PV.

This is true, since the .OVAL field is defined for the 'ao' record, but not for the 'bo' record.

Not sure what the best solution is. Maybe move the output_value attribute to a subclass of the EpicsRecordOutputFields device (e.g. EpicsRecordAnalogOutputFields(EpicsRecordOutputFields))? Alternately, just make sure it's documented that the EpicsRecordOutputFields is only for analog outputs? Or a third option?

@prjemian prjemian added the bug label Nov 22, 2023
@prjemian
Copy link
Contributor

@canismarko Thanks for pointing this out.

@prjemian
Copy link
Contributor

I like option 1 the best, yet might break some current implementations. Here's my search of usage in the main branch here:

(base) jemian@otz ~/.../BCDA-APS/apstools $ git grep EpicsRecordOutputFields
apstools/devices/__init__.py:from ..synApps import EpicsRecordOutputFields
apstools/synApps/__init__.py:from ._common import EpicsRecordOutputFields
apstools/synApps/_common.py:    ~EpicsRecordOutputFields
apstools/synApps/_common.py:class EpicsRecordOutputFields(Device):
docs/source/api/synApps/index.rst:   ~apstools.synApps._common.EpicsRecordOutputFields

@prjemian
Copy link
Contributor

Summary with that search is that option 1 would not break existing apstools code.

@prjemian
Copy link
Contributor

Checking the instrument package template, no usage there either:

(base) jemian@otz ~/.../BCDA-APS/bluesky_training $ git grep EpicsRecordOutputFields

@prjemian
Copy link
Contributor

.OVAL is used specifically here:

(base) jemian@otz ~/.../BCDA-APS/apstools $ git grep OVAL
apstools/synApps/_common.py:    output_value = Component(EpicsSignal, ".OVAL", kind="normal")
apstools/synApps/calcout.py:    output_value = Cpt(EpicsSignal, ".OVAL", kind="hinted")
apstools/synApps/epid.py:    output_value = Component(EpicsSignalRO, ".OVAL", kind="config")
apstools/synApps/epid.py:    #     .LOPR <= .OVAL <= .HOPR
apstools/synApps/scalcout.py:    output_value = Cpt(EpicsSignal, ".OVAL", kind="config")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants