587,750 active members*
3,307 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2) > : Stepper+Encoder :How to Stop Exec on Missed Steps?
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2007
    Posts
    76

    Smile : Stepper+Encoder :How to Stop Exec on Missed Steps?

    Hello Everyone,

    I'm working on a CNC Router in my free time. I have read many posts about using an Encoder along with a Stepper motor. However I'm confused as to how to get it done. I do not intend to obtain a Closed loop Stepper Drive system (which many said is almost impossible to do - Plz correct me if I'm wrong here!). All i want is The machine to Pause/Stop Execution when the Motor stalls or misses steps. I have read it is quite possible using EMC2. I have been searching various topics and doing a lot of reading over here but I couldn't find info as to how exactly to configure it.

    Hope someone can help me with the configuration steps or point me to a thread where configuring Encoders with Steppers is discussed.

    Thank You!


    Joe!

  2. #2
    Join Date
    May 2005
    Posts
    1662
    The only example I can remember:
    http://wiki.linuxcnc.org/cgi-bin/emc..._With_Encoders

    The author mentions posting his .ini and .hal files, although I'm not sure where he posted them. Maybe the author subscribes to the emc-user mailing list ?
    Anyone who says "It only goes together one way" has no imagination.

  3. #3
    Join Date
    Mar 2009
    Posts
    106
    Yes, it is possible. Check out the products by Jon Elson on this site: http://pico-systems.com/oscrc4/catalog/index.php.
    Jon also maintains a pico-systems forum here at CNCzone. You may find that you could go to a full-blown servo system for very little more using his products.

  4. #4
    Join Date
    Oct 2007
    Posts
    76
    Thanks Cyclestart, Marzetti.

    I had come across the link on LinuxCNC site. But like you said even I couldnt find where he had posted his INI n HAL files.

    Pico systems are more of a commercial option. It costs about $250 i guess. In a way it is worth the price. But I'm not from the US. So the Shipping charges and Customs duties are gonna make the price double if not triple

    If only I could lay my hands on the INI n HAL Files or atleast some advice on how to go about making those edits to the HAL files. In a way I'm a lil afraid of modifying the HAL files unless I'm sure of what I'm doing. Hope someone can me help out with this...

    Joe!

  5. #5
    Join Date
    Jul 2003
    Posts
    1759
    there are a couple of ways to do this that I have seen...

    1. You unhook the feedback from the stepgen that goes back to emc2 and instead hook in the output from the encoder componant back to emc. So instead of the feedback loop coming from the stepgen - it is coming from the encoder. Then you set the following error to what you want emc to estop at.

    Emc2 -> hal stepgen -> printer port -> stepper drive/stepper -> encoder -> printer port -> hal encoder -> emc2.

    You would have to make sure you can count the encoder fast enough through the printer port to get the speed you need.

    2. You change the encoder so it runs in velocity mode instead of position. Now you setup a pid loop that takes postion and feedback from the encoder and output a velocity command to the stepgen. It in effect runs the like a servo loop. It will actually correct for some missed steps as long as the stepper didn't stall. You set the following error the same as above to estop when tripped.

    sam

  6. #6
    Join Date
    Mar 2004
    Posts
    369
    Quote Originally Posted by joprinz View Post
    Hello Everyone,

    I'm working on a CNC Router in my free time. I have read many posts about using an Encoder along with a Stepper motor. However I'm confused as to how to get it done. I do not intend to obtain a Closed loop Stepper Drive system (which many said is almost impossible to do - Plz correct me if I'm wrong here!). All i want is The machine to Pause/Stop Execution when the Motor stalls or misses steps. I have read it is quite possible using EMC2. I have been searching various topics and doing a lot of reading over here but I couldn't find info as to how exactly to configure it.
    First, there may be a problem in reading the encoder back into the computer. It takes a minimum of two wires per encoder. So, you might need to dedicate most of an additional parallel port to this input job, as it takes 6 signals for a 3-axis machine.

    Second, depending on the speed of the machine, software may not be able to keep up with the encoder count rate. That depends on the encoder resolution and the maximum speed of the motors.

    It can be done with my Universal Stepper Controller. The normal mode of using this board is to have the counters in the board count the step pulses as they go out. But, by flipping a switch, you can make it count the actual position as indicated by the encoders. If you do this, it WILL be a true closed-loop system, as all positioning will be based on the encoder reading, not the step pulses generated. It will not be able to correct for motor stalls or major loss of steps, as that will only ask for greater velocity when the motor has already stalled. It will correct for an occasional dropped step without your ever knowing this has happened, but a properly set up system will not do this anyway. By setting the FERROR parameter in the ini file, you can set a tolerance for the error you want to allow before a following error is declared and the program is stopped.
    Even when this happens, your position reference will be maintained, due to the encoders.

    See :
    http://pico-systems.com/oscrc4/catal...products_id=21
    for a look at that board.

    Jon

  7. #7
    Join Date
    Oct 2007
    Posts
    76
    Thank You Sam, Jon for your inputs.

    I'm not very familiar with editing the HAL files. But now I have an idea as to what I need to do. Just need to do a bit of reading the HAL Manual. I'l post my results once i'm done.

    Thank you once again

    Meanwhile does anyone have a modified HAL n INI files for a similar setup? It be great to have a reference file while learning HAL.

    Joe!

Similar Threads

  1. weird cutting (Missed steps?????)
    By MonoNeuron in forum DIY CNC Router Table Machines
    Replies: 4
    Last Post: 01-11-2009, 01:03 PM
  2. Missed steps and back EMF question
    By wjfiles in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 3
    Last Post: 08-14-2006, 02:11 PM
  3. Missed Steps
    By fool in forum Machines running Mach Software
    Replies: 11
    Last Post: 04-05-2006, 12:51 AM
  4. Missed Steps - A curse or manageable?
    By andy_ck87028 in forum Stepper Motors / Drives
    Replies: 3
    Last Post: 07-20-2005, 11:47 PM
  5. Problem with error or missed steps or something?
    By rustyolddo in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 18
    Last Post: 07-10-2005, 02:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •