Hello Guest it is December 26, 2024, 06:19:52 PM

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

0 Members and 1 Guest are viewing this topic.

Closed loop system, encoder connected to mach3
« on: June 26, 2010, 03:50:28 AM »
Hi Guys.

I'm toying with an idea for quite some time now.. i'm sure that im not the first but i really like to know what to expect..

I'd like to know if its possible  to make for exemple a milling machine with steppermotors and connect some encoders to the shafts of the steppers. Then if I connect the encoders to mach3 will mach be able to adjust any loss of steps? or does mach only show the coordinates in a DRO and leaves the loss of steps as they are?

Up til now I havent found someone who could tell me how mach3 reacts to encoders and resolves faults like loss of steps..

Regards

Robin

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • www.razordance.co.uk
Re: Closed loop system, encoder connected to mach3
« Reply #1 on: June 26, 2010, 04:17:20 AM »
Hi Robin

Mach doesn't close the loop. In a servo system for example - the loop is closed at the driver. That said, just give me a minute - I'm going to get on my soapbox.

Correctly specified and correctly driven stepper motors DO NOT loose steps and even if they did you can't correct something that's already happened.

Cheers

Ian
Re: Closed loop system, encoder connected to mach3
« Reply #2 on: June 26, 2010, 04:38:59 AM »
Hi Ian

Thanks for the reply...

I understand how the servo closed loop systems work... And also know that  a good stepper system doesnt loose steps..
What I wanted to know whas in the event that it would happen, or that one of the steppers would stall for an instant  for what reason at all... that mach could  correct this by moving to the right position according to the feedback of the encoders..

SO if I understand correctly.. I CAN connect encoders to the shafts..  of each axis and connect it to mach... mach will show the coordinates in the DRO but in the event of a slight stall or loss of a step   mach does not correct it and continues from the "wrong"spot.. Or the other way around... that mach just puts out a pulse stream at a certain frequency untill the encoder says he reached the spot  and then stops..

Thats to bad.. hahah Just wanted to know if it whas possible  to have a cheap stepper system with the benifits of an encoder just like a servo system... and mach would have a realtime knowledge of where the axis are and correct any faults..

Thanks

Robin

« Last Edit: June 26, 2010, 04:41:18 AM by pe2rvv »
Re: Closed loop system, encoder connected to mach3
« Reply #3 on: June 26, 2010, 06:31:14 AM »
I think the Granite drives can be configured to use stepper motors with encoder "assist"

ATB
Derek

Hi Ian

Thanks for the reply...

I understand how the servo closed loop systems work... And also know that  a good stepper system doesnt loose steps..
What I wanted to know whas in the event that it would happen, or that one of the steppers would stall for an instant  for what reason at all... that mach could  correct this by moving to the right position according to the feedback of the encoders..

SO if I understand correctly.. I CAN connect encoders to the shafts..  of each axis and connect it to mach... mach will show the coordinates in the DRO but in the event of a slight stall or loss of a step   mach does not correct it and continues from the "wrong"spot.. Or the other way around... that mach just puts out a pulse stream at a certain frequency untill the encoder says he reached the spot  and then stops..

Thats to bad.. hahah Just wanted to know if it whas possible  to have a cheap stepper system with the benifits of an encoder just like a servo system... and mach would have a realtime knowledge of where the axis are and correct any faults..

Thanks

Robin


You can "chop it off" but can't "chop it on"

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • www.razordance.co.uk
Re: Closed loop system, encoder connected to mach3
« Reply #4 on: June 26, 2010, 07:51:04 AM »
Mach doesn't know or care whether you have a servo or a stepper system. It just sends out step and dir signals and trusts that whatever's attached does what it's meant to. The only difference is that with a servo drive you can connect the servo drive's fault output to Mach so that Mach get's to know about it. What does Mach do? It stops sending signals. Of course you can put encoders or whatever you like on a stepper. But you would have to get that "whatever" to detect a missing step and let mach know and Mach would do exactly the same thing - just stop sending signals. AFAIK there are no systems for steppers that will "re-position" after a lost step and to be honest if there was IMHO it would be pointless. In fact it would be as pointless as a servo system that tried to re-position after it had exceeded it's allowable following error. If you REALLY want the warm feeling of knowing that your system has lost position and that Mach will stop, then personally I'd go servos. Each motor brings there own advantages to the party but If it looks like a duck and quacks like a duck then it probably is a duck - no point in trying to pretend it's anything else.

Cheers

Ian
« Last Edit: June 26, 2010, 07:57:15 AM by stirling »
Re: Closed loop system, encoder connected to mach3
« Reply #5 on: June 26, 2010, 08:21:59 AM »
Hahah...

Ok message undersood... I get the idea..

Today I heard from someone else that EMC2 does have this function... and that its the only cnc controller that does that because its working on linux and not windows..
(dont know if it really works, havent seen it)
So i've heard a lot of stories, and just wanted to know what was the real deal...
The only thing I dont understand is... Why do Professional controls like Heidenhain, fanuc, siemens etc something similar like that?
Yes the do have servo's with encoders  connected to the drives but the frequently also have a measuring system like a liniair encoder (glass ruler) to give feedback to the controls . Thats a real closed loop..

Thats how i came up with the idea..and thought what is the reason why mach doesnt do that?

Anyway..thanks for the reply.... now for the decision.. stay with steppers or go servo  ;D
« Last Edit: June 26, 2010, 08:31:19 AM by pe2rvv »

Offline RICH

*
  • *
  •  7,427 7,427
Re: Closed loop system, encoder connected to mach3
« Reply #6 on: June 26, 2010, 08:43:01 AM »
Quote
stay with steppers or go servo
A decision only you can make. I have never gone to servos because i have 5 drives for steppers and a bunch of stepper motors.
But, i will get a servo and at least one drive ( one of these days ) for running the spindle on the lathe constantly.
This way there will not be changing torque and have linear speed over the rpm range.

FWIW and depends on the good junk you may already have,
RICH
Re: Closed loop system, encoder connected to mach3
« Reply #7 on: June 26, 2010, 08:50:52 AM »
Hahah indeed..

WHel this is the reason I'm asking

I'm rebuilding  a morbidelli U-15...
The old servo's and drives were unuseable... so i bought 20Nm stepper motors and 230V AC stepperdrives...

http://www.youtube.com/watch?v=CD5Dq8_9UDk

Sometimes I have tiny quarks with mach... and thats the reason i'd like some feedback to mach..

Servo's that size are very expensive and the project would loose its purpose to make a fairly cheap industrial machine...

Anyway, if you'd like to see some pics just register in the dutch cnc forum   www.cnczone.nl

and look in this topic:  http://www.cnczone.nl/viewtopic.php?f=6&t=2256

Thanks for the help

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • www.razordance.co.uk
Re: Closed loop system, encoder connected to mach3
« Reply #8 on: June 26, 2010, 09:52:03 AM »
Today I heard from someone else that EMC2 does have this function...
We have to be careful here and be clear exactly WHAT function we're talking about.

If you're saying that EMC can take encoder POSITIONAL feedback and correct a motor that's lost position then I'd say two things - "are you sure?" and "why?"

Let's take servos as an example as they allways have a feedback loop. It could be stated that servos are ALLWAYS in the wrong position and allways TRYING to get to the commanded position. The error between where they are and where they should be - the following error - has a maximum which is set to what is deemed acceptable. If this maximum is exceeded there's nothing ANY controller can do - it's too late - it's happened - the fat lady has sung!. If you're going to let ANY controller correct OUTSIDE the allowable following error - why not just increase what you regard as the acceptable maximum following error?

and that its the only cnc controller that does that because its working on linux and not windows..
May the great engineer in the sky save us from the Linux high priesthood. Linux is a great OS but  I wouldn't be surprised if one of the faithful claimed it could achieve world peace before dinner. EMC runs under a modified kernel just as Mach does. A vanilla Linux could not run EMC for exactly the same reason as a vanilla Windows couldn't run Mach. Neither of them are realtime systems and that's the challenge, to get them both to mimic one as best they can. The advantage the Linux guys had was they had access to the kernel source code. Somehow I don't think Bill and Art are that close!

The only thing I dont understand is... Why do Professional controls like Heidenhain, fanuc, siemens etc something similar like that?
Yes the do have servo's with encoders  connected to the drives but the frequently also have a measuring system like a liniair encoder (glass ruler) to give feedback to the controls . Thats a real closed loop..
Well someone who knows more about glass scales will hopefully step in. But I don't think that's what glass scales do. I thought their purpose was for accuracy. BUT AGAIN - If a drive can keep the servo within the following error limit - and they do - because if they didn't they'd be as much use as a chocolate fireguard - how can you improve on this?

All good fun...

Cheers

Ian

Offline BR549

*
  •  6,965 6,965
Re: Closed loop system, encoder connected to mach3
« Reply #9 on: June 26, 2010, 09:57:19 AM »
IAN, 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???

Might be a poormans closed loop ERROR recovery system ???

We already have a brain to do cruise controll to monitor spindle speed and regulate Feedrate based on RPM drop.


EMC does run in a realtime kernal so all its I/O is realtime. Mach runs in a Buffered system, once the buffer runs there is little to no interaction to the pulse stream.

Heck even the old DOS could run realtime. I think that the old dos made a good controller inside of the mem limits.

AND there IS a Windows RTK but it is very expensive from MS

I don't think EMC does realtime corrections it just closes the stepper loop LIKE it does with a servo.  It doesn't really matter where you close the loop as far as position controll.
« Last Edit: June 26, 2010, 10:09:40 AM by BR549 »