ClosedLoop

Created by: Lester Caine, Last modification: 22 Oct 2024 (19:27 UTC)

There has been some disscussion on how closed loop can be achieved, and these are some notes relating to that.

Servo drivers will use the encoder to drive the loop and are inherently closed loop. The output of the encoder can be used back into Mach3 to run the dro's, but if there is a difference between expected and actual without an error from the servo then something is wrong. For the servo system to work, the rate pulses are applied to the step input must be lower than what the motor can actually achieve under load.

Steppers are a different matter and have been subject to a number of discussions. The easiest setup is running the DRO's from the encoder, but only using it as an error signal. i.e. If the encoder position moves too much from the expected position then Mach3 stops. This is not really closed loop, but is better than nothing. A side consideration on that is using something like smooth stepper with an encoder feedback so that EACH step is monitored. If the motor does not move, then you get an instant stop, and hopefully no damage to the work. This should work for full and half step, but may be more of a problem with micro-stepping where the encoder may have to be rather high resolution.

Getting the system to ADD steps when ones are missed requires either a different stepper driver. The Taig/Microproto driver closed loop 'works' step and direction, but converts those signals to a phase drive for the output stages, so if the encoder does not return movement, the WIDTH of the pulse can be altered, and drive to the output slowed down to cope with the problem. This approach does not work so well with stand alone stepper drives since since there is no way to actually control the output stages. Additionally in either case the expected position will be somewhat ahead of the actual position, so some means of slowing down Mach3 to keep it in sync would be useful. In this case using the encoder to return actual position and control Mach3 is essential for the best performance. Ideally you do not want Mach3 starting a new move if the previous move has not finished ;)

Driving the DSLS controller TOO hard maintains movement of the stepper motor, but with up to a 200 step error before a fault is generated. That said, running the Taig open loop gives 10mm/sec performance, while the closed loop system will run 25mm/sec happily in air, but may need to run slower when taking heavy cuts. The problem comes on square corners where the cutter has not quite reached the end on one axis when the other axis starts moving. While a setting for between move pauses could help, the proper solution would be for Mach3 to wait until it's DRO tells it that the previous move has finished.

I'll extend them with links to related products as time permits.