Hello Guest it is March 06, 2021, 09:50:28 AM

Author Topic: using a spindle encoder w/ Mach 3  (Read 27942 times)

0 Members and 1 Guest are viewing this topic.

using a spindle encoder w/ Mach 3
« on: January 17, 2008, 01:48:21 PM »
 I have an older DOS-based cnc lathe that I'm looking to upgrade to Mach 3 using my existing g100/mach3 setup. The lathe uses a KVM style spindle motor controller and so I was planning on using the digispeed XL board, however, the spindle uses an encoder (see attached image) and I'm trying to find out how I might be able to take advantage of the existing encoder arrangement by configuring mach rather than swapping it out for a pulse generating indexer, etc...

 Can this be accomplished with the g100 and mach combined or can mach even be configured to at all to take advantage of a spindle encoder like this one?

 Thanks!!


Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: using a spindle encoder w/ Mach 3
« Reply #1 on: January 17, 2008, 04:05:19 PM »
I dont know anything about the G100 so cant say whether it can be used or not, however I know the SmoothStepper will be using an encoder for spindle sync for threading etc so maybe it can be similar for the G100.
Hood

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: using a spindle encoder w/ Mach 3
« Reply #2 on: January 18, 2008, 12:34:00 PM »
Mach 3 is programmed to accept pulses into the computer to measure the spindle speed. There are two methods. One is a simple one pulse per revolution of the spindle. The other is several pulses per revolution (these can be specified).

What you need to know, therefore, is the system your existing lathe/mill uses. This needs converting to a 5 volt signal, and then can be fed into your computer.

So the question is - what signal does your system give out.

It may be, however,  that the problems trying to integrate an existing system into Mach3 is too expensive. You can buy optical encoders for a few pence/cents and achieve a satisfactory input into Mahc 3 . There are several posts on this if you do a search.

I use an optical encoder to measure the spindle speed and a Digispeed PWM converter to run my lathe/mill with excellent results.

I have attached a diagram for the optical encoder - which can be wired directly to your brealout board. I was looking for a picture -  but I can't find one

The tracking of your spindle speed is quite simple - I think the "control" of your spindle speed will be the most important.
« Last Edit: January 18, 2008, 12:41:55 PM by jimpinder »
Not me driving the engine - I'm better looking.
Re: using a spindle encoder w/ Mach 3
« Reply #3 on: January 19, 2008, 05:53:12 PM »
 Thanks a lot for help... I really appreciate it!

 So by signal are you referring to the main controller board's output signal to the spindle controller or one that is sent back to the software/pc?
Re: using a spindle encoder w/ Mach 3
« Reply #4 on: January 19, 2008, 09:40:43 PM »
^What main controller board are you referring to?

What mach needs is one pulse per revolution of the spindle it can be a reflective sensor or inductive proximity sensor that senses a piece of metal.  The signal from the sensor can't be very short so if you are using the reflective sensor and put a 1/16" strip of shiny stuff on the spindle that will probably not work as it will go by to fast for mach to see it.   Another thing with threading and mach you need a motor with some HP, because mach uses one pulse per rev of the spindle if you take a cut and spindle slows down a little mach will take some time to adjust and feed speed to correct for the slower spindle speed and will most likely ruin the thread unless you take a lot of very small cuts.  But if you have at least 1HP motor it will hold the spindle speed nice and steady so you can take some good cuts and have nice threads.  The motor you have now will probably not be the best choice,  it worked with the DOS system because the encoded sent out 100 or more pulses per rev of the spindle so the control software noticed the slightest change in spindle speed and corrected the feed quickly.
Re: using a spindle encoder w/ Mach 3
« Reply #5 on: January 19, 2008, 10:17:06 PM »
 Are you saying that it would not work even if I were able to get mach to acknowledge the pulses from the encoder (using the "several pulses per revolution" option and specifying the correct pulses/rev which matched the encoder)?

 As for the "controller" I was referring to the existing main controller board (LCB3) that is equipped with the cnc lathe. As it is currently setup the encoder connects directly to the controller board and the board ouputs signals to the spindle controller. I wasn't sure if Jim was referring to the signal being sent from the controller board to the spindle controller or if he was referring to another signal (perhaps sent from the board to the pc for the software to track!?!).

 Thanks again for all the help guys.
Re: using a spindle encoder w/ Mach 3
« Reply #6 on: January 20, 2008, 01:55:03 PM »
1. Mach is made to take one pulse per rev, if you know how to write custom plug-ins for mach that take more pulses thats great! It will help all of us.

2. You might be on to something, it is possible that the encoder goes to the spindle motor controller and keeps a constant speed no matter what the load is until it is too much for the motor,  but I don't know that for sure unless you have some manuals that say that.  You can do a test, buy a cheap tachometer on eBay start the spindle and put some load on the chuck and see if it slows down if not, then great if it does then the encoder has no control of the spindle rpm and is just passed straight to the pc.


Re: using a spindle encoder w/ Mach 3
« Reply #7 on: January 20, 2008, 11:07:44 PM »
 I might be in some luck with this encoder... apparently it has a separate indexing channel (z channel) which generates 1 pulse per rev. The typical A and B channels generate 60 ppr but can't I just bypass these outputs and send the z-channel signal (providing it's 5v) back to mach? 

 Would it be worth a try?


 

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: using a spindle encoder w/ Mach 3
« Reply #8 on: January 21, 2008, 02:38:25 AM »
I think the Index pulse will be too short for Mach to see through the parallel port.
Hood
Re: using a spindle encoder w/ Mach 3
« Reply #9 on: January 21, 2008, 01:27:30 PM »
 How about through the ethernet port via the Grex/G100? Would that be worth trying?