Hello Guest it is June 24, 2019, 05:55:53 AM

Author Topic: Closed loop system, encoder connected to mach3  (Read 50526 times)

0 Members and 1 Guest are viewing this topic.

Re: Closed loop system, encoder connected to mach3
« Reply #10 on: June 26, 2010, 10:25:57 AM »
I dont know EMC for myself... Its just another one of the stories I heard..

And indeed. the thing that emc is "realtime thats also the thing i've heard... SO i think for that reason its not possible in mach3.. because windows is too slow..

Anyway the idea whas... the stepper system is an open loop with no feedback at all.. My idea was.. if there is something watching over the movements and could do "something"about eventual errors that would be better than nothing...

Offline Hood

*
  •  25,844 25,844
  • Carnoustie, Scotland
    • View Profile
Re: Closed loop system, encoder connected to mach3
« Reply #11 on: June 26, 2010, 11:41:07 AM »
There is a board sold by Ron Rogers that can monitor encoders and throw an error to stop Mach and then I believe update the DROs with the correct position. Its not closed loop as it will not correct until after an e-stop and whether it would save your work will depend on the following error you set and how fast you are cutting.

Theoretically you could do this in a Brain or a macropump but I have my doubts whether this would be fast enough to save the work as the update is only 10Hz and in reality is could be nearer 5Hz as the error could be seen just after one scan so will not be picked up until the next.

As said though it would all depend on how fast you cut and how much of an error is too much, could be fine for plasma or router but doubt it would be good enough for a metal cutting machine where tolerances are usually much tighter.

Just my thoughts on the subject.
Hood

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: Closed loop system, encoder connected to mach3
« Reply #12 on: June 26, 2010, 12:07:44 PM »
There are a few different points to consider here.

1) If a stepper system looses position you are doing something wrong.
2) There are closed loop stepper systems available, but what does that mean?

#1) A stepper will always go where you command - unless you overload it, (or have an issue with the quality of pulse stream driving it.) A servo on the same system 'may' have enough power to bully through what would stall a stepper but you still have a problem where the potential stall occurred. If you ask either system to feed faster than it is able you will have a problem. Having a closed loop stepper does not make the stepper any more powerful, or capable of anything that it could not do when driven open loop.

#2) What does a closed loop stepper system get you? Well, since a stepper motor is a constant power device if you are near a stall condition you will not have any reserve power to try and accelerate to catch up. That leaves only two options: just report an error occurred, or ask the pulse generating device (i.e. Mach, EMC2) to hold up whilst the machine tries to catch up. (This second option is what controller manufacturers like to tout as 'closed loop back to the controller'.) For Mach the first option, reporting an error and stopping is viable. There is at least one BOB available that does this, and the Taig DSLS system does this as well. The second option, asking the controller to hold up, is not a viable option with the parallel port driver, an external motion control board could do this as generally they just grab the next n moves from Mach's buffer and process them, since they are in control of the motion they can hold up processing moves.


Still, if you are stalling a stepper system then you have a problem with what you are asking it to do. The value of a supervisory system depends on what type of system you are building.
Happy machining , Jeff Birt
 

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Closed loop system, encoder connected to mach3
« Reply #13 on: June 26, 2010, 12:41:21 PM »
Let's see if we can't bust another myth for fun. realtime means real time.

The two types of realtime system that I know of are: Soft and hard. We're dealing here with soft.

To be called a soft realtime system two conditions have to be met.
1) The jitter must be kept within acceptable limits - but there will allways BE jitter. Remind you of anything?
2) The system must provide ready access for applications to be given higher priority than system functions if required.

No. 2 is really where RT linux passes and standard Windoze doesn't. AFAIK Art worked long and hard to get round that one - but get round it he did.

Another one.

Stepper motors can lose the occasional step.

Personally I've never seen it happen. I've seen steppers stall - period - but never have I seen one miss the occasional step. Not saying it absolutely CAN'T happen because never say never but here's why I find it difficult to understand how it can happen.

So our stepper is cruising along at whatever rpm and for some reason misses a step. The next pulse comes along and what? Well it's not going to move the stepper because the driver is in the wrong phase. Our stepper is still stalled. The next pulse comes along. No - still out of phase - our stepper stays where it is. In fact with a full step drive the stepper will miss 4 steps minimum because of incorrect phase and will allways lose steps in multiples of 4. (In a microstep system it will miss 4*microstep steps before the driver issues the correct phase signals). Anyway back to our full-step system - the 4th pulse comes along - good - correct phase, the motor moves a step from stationary. The 5th pulse comes along. Ooops - way to soon. The controller is sending out pulses at the speed the motor would have been going if it hadn't stalled, but it has only done one step from stationary - don't we need an acceleration ramp? The 6th, 7th, etc. steps are all too close together - stall....

The ONLY exception I can see to this is if the stepper motor is moving so slow in the first place that it doesn't NEED an acceleration ramp to get it going again. But wait - if it's going at that speed it's way up near the highest part of it's torque curve - so how come it missed a step in the first place? A system that misses steps at low speed is just plain not up to the job.

My ramblings for the day

Cheers

Ian

« Last Edit: June 26, 2010, 01:42:30 PM by stirling »

Offline RICH

*
  • *
  •  7,338 7,338
    • View Profile
Re: Closed loop system, encoder connected to mach3
« Reply #14 on: June 26, 2010, 02:14:55 PM »
Quote
I've seen steppers stall - period - but never have I seen one miss the occasional step

The missed step is a tough one. My experience in all this time on missed steps can be counted on one hand and i really can't clarify a simple single missed step as all is not as it seems. In the few times that a stepper "skipped" the outcome was that axis movement was such that the axis went off with a mind of it's owne, like just cutting some random path thru the metal, or you could hear the skip ( but maybe extremely short - say just a few steps / fraction of a second) and it kept the pathing of the code but was off somewhat in location. Very , very infrequent / unusual if your motor tuning &  application is proper for what you are going to do.

We tried finding magical lost steps using custom high end equipment which would count and compare steps out of the PP to the actual steps provided to a stepper along with measured distance. The counting accuracy was in parts per million and although the equipment said  there were a few in the comparison we never heard or experienced a problem in the stepper motor movement. In one case it identified that the lost steps were due to belt tension ie; the steppers were turning appropriately as pulsed....movment was lost in the timimg belt which made it appear like lost steps.  SO looking for a needle in the hay stack that may not even exist is difficult.

So i agree with ya, Ian.  Steppers are very accurate and reliable when used properly, and they either work or don't, and there is a world of difference between stalled/skipped/ lost step.

BTW, two different steppers, all things equal, can require different steps per unit ( lost steps ....not really, variation in constructed quality)
unusual, but true.

BUSTING THE MYTHS........ ???

RICH 

Re: Closed loop system, encoder connected to mach3
« Reply #15 on: July 15, 2010, 10:14:36 AM »
I thought I would come in here and explain a few things.  (emc person)

Emc can count encoders in realtime.  (whether it is software (ie - printer port)  or hardware (ie mesa/pico systems hardware or such) - emc sees it the same)  On a decent computer I would expect the software counting to approach 30khz or more.  (hardware will be into the mhz)

Now - there are at least 2 ways that you could setup a closed loop stepper system within emc.

1.  trip a following error.  The commanded position in emc will be compared to the feedback position from the encoders.   If the following error is greater than the set point - the machine stops. (this is checked in the servo thread (by default the servo thread is 1khz)

2. Setup a pid loop.  this works similar to above.  If the following error is greater than the set point the machine stops.  Also - if the machine loses a few steps - this will be corrected for by the pid loop.  (it sort of sets the steppers up as servos - the step generator within emc (or hardware) is set to velocity mode instead of position.)

There is an issue with the above setup.  Steppers are not servos.  Servos - if you lag behind the pid loop will tell the servos to catch up.  If you do that with steppers - they will stall.  So - if you start to get a lag because you are pushing the steppers outside of their envelope - they will stall as the pid loops pushes them harder.

The good news is - emc still knows where the machine is.  (feedback from the encoder)  Turn it back on and go. :)

there has been talk of maybe trying adaptive feed.  where as the following error increases - the feedrate is decreased.  (I don't think anyone has tried that yet)

I really don't think it is a good solution.  IMHO - might as well go servos then.  (if you are putting in that much effort)

sam
Re: Closed loop system, encoder connected to mach3
« Reply #16 on: July 15, 2010, 05:58:53 PM »
Quote
what IF we set up a brain to monitor the DRO/encoder like has allready been done. BUT instead of tripping a stop we write a macro to do a controlled stop, record current line of the program. RefHome the  axis then return to Currentline minus say 10 lines then" run from here" to restart??
i think for mach is best way.

Amir
**Even a clock that does not work is right twice a day**
Re: Closed loop system, encoder connected to mach3
« Reply #17 on: May 05, 2014, 05:11:31 PM »
to look like brain that would compare encoder and line g coda

greeting
Re: Closed loop system, encoder connected to mach3
« Reply #18 on: May 08, 2014, 03:47:34 AM »
I dont know EMC for myself... Its just another one of the stories I heard..

Sticking to what you either know, or from experience have a good reason to believe, is an excellent strategy when standing on a soap-box ;-)

And indeed. the thing that emc is "realtime thats also the thing i've heard... SO i think for that reason its not possible in mach3.. because windows is too slow..

My House Rabbits are "realtime" ;-) what are you saying?

Anyway the idea whas... the stepper system is an open loop with no feedback at all.. My idea was.. if there is something watching over the movements and could do "something"about eventual errors that would be better than nothing...

Stepper systems are designed to be open loop, having steps becomes unnecessary once you close the loop - Think Servos - If you are getting missed steps you have a faulty system or setup which will be far easier to fix by correcting the faults than by bodging on something unnecessary for a good working system,

 - Nick
« Last Edit: May 08, 2014, 03:50:16 AM by magicniner »
Re: Closed loop system, encoder connected to mach3
« Reply #19 on: October 21, 2014, 06:57:47 PM »
Ian.....
Glas scale are for precision and nothing else... If you having 2 measuring systems on a machine it is usual to prevent the user to make bad parts. What is happening, the machine is comparing the 2 measuring system and if they aren't following within a given window the machine stops. all in all the NC looks for backlash in the machine.

If you buy a Siemens PCU 50, ER module, LT module, Controller and NC module, then you have spend a lot of money and we haven't been talking about licens for the CNC it is extremely expensive.
We have some hobbing machines and in October I bought a license for a PCU 50 Solusionline. The only thing the license it is gave me access to the parameter for the B spindle effect so we can prevent damaged the hob. the price for the license was 3000 $

My pointte is, and don't get me wrong but with all respect for MACH3, it's a super cool program but it is for hobby and light industry.

If you loose some steps you can make the machine to shut down, that is what expencive machines do.  You can't undo lost steps and you can't undo a car crash, it is just the way it is....

I totally agree with Ian it is spot on....

- Allan