Skip to content

Strange INP field to record named "test" #553

Description

@AlexanderWells-diamond

In the ADBase.template file there seems to be an odd record who has an INP field pointing to a record simply named "test":

record(mbbi, "$(P)$(R)ShutterStatusEPICS_RBV")
{
    ...
    field(INP,  "test CP MS")
    ...
}

See file here: https://github.com/areaDetector/ADCore/blame/master/ADApp/Db/ADBase.template#L609

I note that when I start my camera IOC it attempts to form channel access links to the record, which obviously does not exist. Is this simply a remnant of some long forgotten test, or is there some other reason for this link to exist?

Activity

  1. ericonr commented on Dec 17, 2025

    @ericonr
    Member

    I don't think it's an issue. It's explained in https://areadetector.github.io/areaDetector/ADCore/ADDriver.html:

    Status of the EPICS-controlled shutter. This record should have its input link (INP) set to a record that contains the open/close status information for the shutter. The link should have the “CP” attribute, so this record processes when the input changes. The ZRVL field should be set to the value of the input link when the shutter is closed, and the ONVL field should be set to the value of the input link when the shutter is open.

  2. AlexanderWells-diamond commented on Dec 18, 2025

    @AlexanderWells-diamond
    Author

    So it's being left in simply as an example? From the text it sounds like the INP, ZRVL and ONVL should all be macros, to allow easy substitution of record values?

  3. ericonr commented on Jan 7, 2026

    @ericonr
    Member

    So it's being left in simply as an example?

    I would assume so.

    From the text it sounds like the INP, ZRVL and ONVL should all be macros, to allow easy substitution of record values?

    Seeing as these fields are present in autosave configuration (below) I would assume they are expected to be overwritten, so simply using macros would only apply for the first time an IOC is launched. Afterwards, it should be included in st.cmd files using dbpf to ensure a known state.

    $(P)$(R)ShutterStatusEPICS_RBV.INP
    $(P)$(R)ShutterStatusEPICS_RBV.ZRVL
    $(P)$(R)ShutterStatusEPICS_RBV.ONVL

    It probably wouldn't hurt to support optional macros for them, though.

  4. ericonr commented on Feb 5, 2026

    @ericonr
    Member

    Do you think it's a big issue to have this constant search for non-existent PV? We discussed this in the AreaDetector meeting, and an example is important to make the need for "CP" in the link explicit. It could be possible to find a PV in the IOC that could be used as the link for this one, keeping the example but avoiding a bad connection.

  5. AlexanderWells-diamond commented on Feb 9, 2026

    @AlexanderWells-diamond
    Author

    I have no particularly strong opinions on a solution, I just don't like it because of the error it creates. It makes extra noise to investigate if you ever have the need to debug connections to your IOC.

    If you feel it is important to leave the example there, could it just be left as a comment in-line with the record? But I'm also ok with it linking to an existing record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions