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

Document strategies of waiting for a signal to match a value, pushing it down to EPICS or checking in the device or plan #386

Open
DominicOram opened this issue Jun 14, 2024 · 4 comments
Assignees
Labels
Developer Experience documentation Improvements or additions to documentation
Milestone

Comments

@DominicOram
Copy link
Contributor

As a developer I would expect set on a SignalRW to only finish when the readback of the signal matches the setpoint. This would, I think match the behaviour of ophyd.

@coretl
Copy link
Collaborator

coretl commented Jun 17, 2024

I'm a little reluctant to push this down to the Signal level unless there is nowhere else to put it. I would prefer it was handled in one of two places:

  • In the EPICS layer with put complete returning when the operation was complete, like we did for the valve and positioner templates
  • In the Device level where thresholds can more easily be read, like we did for the motor record

Ideally we use put complete to work out when it stopped, then additional checks at the device level if we need to check the readback matches the setpoint, optionally within a tolerance. If there is no put complete, then this could be put in the Device level too.

How would this look for your use case?

@DominicOram
Copy link
Contributor Author

This particular use-case is setting BL03I-MO-ROBOT-01:NEXT_PIN and reading BL03I-MO-ROBOT-01:NEXT_PIN_RBV. These are integers so no need to worry about tolerance. I have currently solved it by putting the check in the device, which is working fine. I'm happy for it to be in the put complete of the PV, I can discuss this with MX controls if you think it's the best solution?

@DominicOram
Copy link
Contributor Author

I just found

async def set_and_wait_for_value(
, which I could use for this. I think putting the put callback in is good too though

@coretl
Copy link
Collaborator

coretl commented Jun 17, 2024

Co-opting this ticket to turn into some documentation on the strategies of waiting for a signal to match a value, pushing it down to EPICS or checking in the device or plan

@coretl coretl changed the title SignalRW should wait on readbcak being the same when set called Document strategies of waiting for a signal to match a value, pushing it down to EPICS or checking in the device or plan Jun 17, 2024
@coretl coretl added this to the 1.0 milestone Jul 19, 2024
@stan-dot stan-dot added documentation Improvements or additions to documentation Developer Experience labels Nov 18, 2024
@coretl coretl self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Experience documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants