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

Stepper motor device closed if out-of-range angle specified #692

Open
alexdewar opened this issue Nov 5, 2024 · 2 comments
Open

Stepper motor device closed if out-of-range angle specified #692

alexdewar opened this issue Nov 5, 2024 · 2 comments
Assignees

Comments

@alexdewar
Copy link
Collaborator

In the FINESSE rig, the stepper motor can only move to angles between 0 and 270 degrees, because there are two limit switches. (This is an artificial limitation: the hardware will not be damaged if the mirror moves outside this range.)

The way this is currently handled by the software is that the backend will raise an error if it is instructed to move to an angle outside this range (the dummy device does too). The problem is that FINESSE (the software) currently treats all device errors, so it will close the device.

There are two components to this issue:

  1. We need a way to communicate non-fatal errors
  2. It would be better not to hardcode the limits (see Stepper motor: make limit switches configurable #685)

In relation to point 2, one possible alternative approach would be to figure out when a limit switch has been triggered by querying the controller. From the manual, it seems like the easiest way to do this would be with the AL ("request alarm status") command. We would need to send this query every time the motor has stopped moving. One side benefit of this approach is that we would also be able to retrieve the alarm status, so we could also inform the user about drive faults etc.

@alexdewar
Copy link
Collaborator Author

Note: I've just been playing with this and you can indeed detect when the motor's hit a limit switch with the AL command. The only thing is that the relevant bits remain set, even once you've started moving the motor again. From the manual, it seems that you can clear this with the AR command ("alarm reset").

@alexdewar
Copy link
Collaborator Author

To clarify, I think it would make sense send the AL command whenever the motor has stopped moving to check whether it has stopped because something has gone wrong, including hitting a limit switch or a drive fault (#703). We will want to check whether this works with the actual controller though. I don't think there's a way to simulate drive faults, but there's no harm in driving to a limit switch, so we should do that.

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

No branches or pull requests

2 participants