NSLS-II-CSX / profile_collection

BSD 3-Clause "New" or "Revised" License
0 stars 5 forks source link

Adjust custom EPICS PV logic for kill motors to perform logic in ophyd using default PVs #84

Open maffettone opened 10 months ago

maffettone commented 10 months ago

The solution provided in https://github.com/NSLS-II-CSX/profile_collection/pull/83 depended on a Kill-STS PV that was custom built by John.

So for this kill motor, I made a new PV which is really a subset of another PV. The logic in EPICS is

record(calc, "$(SYS)$(DEV)Kill-Sts") {
field(INPA, "$(SYS)$(DEV)Sts:1-Sts CPP")
field(CALC, "(A>>11&1)=0")
}

which means its taking the PV that exists everywhere for turbo pmac, $(SYS)$(DEV)Sts:1-Sts , generically, and its doing the operation on its value: value>>11&1 and asking if that is equal to 0? If yes, then Kill-Sts is set to 1, if it not equal 0, Kill-Sts is set to 0.

We can embed this logic into the ophyd read back instead, so that it generically maps to all motors without need for custom EPICS database entries.

Will take some modification of class PMACKiller(EpicsSignal):

ambarb commented 10 months ago

Sounds like a good idea. Should we do this as a standard ophyd class from the start so it can get tested around the ring?

ambarb commented 6 months ago

we did the most immediate fix here. @maffettone do you want me to close this or leave it open until the feature above is merged and then we import from there?

maffettone commented 6 months ago

Let's leave it open. It motivates work in the nslsii package, and can be closed out when that get's sorted? https://github.com/NSLS-II/nslsii/pull/174