Open fergusL opened 5 years ago
The VFD attempts to accelerate at a constant rate when starting, up to set speed, and decelerate at a constant rate when stopping. In the VFD you can set one or more running speeds (we currently just use one) and the acceleration/deceleration in terms of how many seconds it should take to accelerate to/decelerate from the maximum rated speed.
As the system has a nominally constant, known deceleration we can predict at any given moment how much further the dome will rotate if told to stop right now, and have the goto_az
command tell the VFD to stop the right distance before the target azimuth in order to avoid overshooting.
It's not something that we can solve simply, but it's worth noting that the condition in this
while
is guaranteeing that the dome will overshoot. When the rotation relay is disabled the dome does not stop moving instantly, the VFD will respond by ramping down the speed at a pre-programmed rate. If we wait until the dome is already at (or past) the target position before beginning that deceleration than it will overshoot every time._Originally posted by @AnthonyHorton in https://github.com/_render_node/MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MjkyNzg2ODM3/pull_request_reviews/more_threads_