Machsupport Forum

Third party software and hardware support forums. => Galil => Topic started by: jmroberge on December 27, 2010, 11:53:11 PM

Title: Mach3 & Galil using stepper motor and encoder feedback
Post by: jmroberge on December 27, 2010, 11:53:11 PM
I have recently added an encoder on the x axis of my router. The system controller is a gall 2108 card from Galil. The feedback is from  a rack and pinion ygear mounted on an encoder.
How do I configure Mach3 to use the encoder feedback to drive the x axis rather than the open loop control that I currently have. Is this possible to do with this setup? I am able the see that the encoder does work properly in the Smartterm (Galil) as the motor position does increments/decrements  as the position changes.
Thanks 
Title: Re: Mach3 & Galil using stepper motor and encoder feedback
Post by: Hood on December 28, 2010, 07:18:08 AM
Mach is open loop and if the loop is to be closed at all it will have to be done in the Galil. Whether this can be done I dont know, you would be better posting on the Galil part of the forum for answers specific to Galil.
Hood
Title: Re: Mach3 & Galil using stepper motor and encoder feedback
Post by: jmroberge on December 28, 2010, 11:53:19 AM
thanks, I moved this post to the Galil section.
Title: Re: Mach3 & Galil using stepper motor and encoder feedback
Post by: smurph on December 28, 2010, 12:18:23 PM
If you are running steppers from the Galil, then it is open loop as well.  To get closed loop, you will need to run servos.  There is no PID loop involved with stepper motors.  :(

Steve
Title: Re: Mach3 & Galil using stepper motor and encoder feedback
Post by: HighOctane on December 29, 2010, 10:19:21 PM
It looks like galil supports that functionality, at least on some of their controllers...

http://www.galilmc.com/support/appnotes/optima/note2445.pdf (http://www.galilmc.com/support/appnotes/optima/note2445.pdf)
Title: Re: Mach3 & Galil using stepper motor and encoder feedback
Post by: smurph on December 30, 2010, 12:36:32 AM
That's Stepper Position Maintenance (SPM).  You have to set up code to catch position errors.  Where the position error is "caught", the motor stopped, and then a POSERR subroutine is called to correct the error.  Unfortunately, this is nowhere near a closed PID loop.  :(  

Also, this "mode" of correction is not suited to the way we stream data to the controller.  We don't download a Galil script to the controller at all.  If you run the plugin and enable debug output, then you can see what we are doing by looking at the GalilDebug.txt file.  

So, unfortunately, all that the plugin supports is open loop control for stepper motors on the Galil.  :(

Steve