Hello Guest it is November 15, 2019, 05:38:26 AM

Author Topic: axis homing with encoder  (Read 8792 times)

0 Members and 1 Guest are viewing this topic.

axis homing with encoder
« on: September 01, 2013, 11:15:51 PM »
Hello, I'm new to the board, but not Mach3.  I owned a couple of Mach3 powered mills that I sold about 3 years ago, and am building another now for personal use. 

I know someone had a board that would use the Z axis encoder pulse to home the axis, I've looked, and as far as I know, they don't sell it anymore.  I had a couple of Mach3 powered CNC Bridgeport mills, and other than the normal floppy BP frames, I could hold .0005 which was required some times.  My only complaint was the limit switches that I used for homing the axis, they would only repeat +/-.002" at best. 

Mach3 seems to have made leaps and bounds since then, seems like the imagination limits possibilities at this point.  Being familiar with PLC's, I don't see how BRAINS can't be used to make an encoder driven "axis home". 

I was wondering if anyone has a direction to point me in before I try trial and error.

Thanks
MC

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: axis homing with encoder
« Reply #1 on: September 02, 2013, 11:38:24 PM »
Brains isn't a PLC it has a lot of limitations and quirks.

BUT IT can be done (;-)  You just have to figure out HOW to drive the axis to the index signal.

(;-) TP
Re: axis homing with encoder
« Reply #2 on: September 04, 2013, 04:57:20 AM »
I was wondering if anyone has a direction to point me in before I try trial and error.

I use vbs macros to home the machines to index pulse on the servo encoders.

I have connected the index pulse with the probe input in Mach3. So if we do a G31 command then it will stop on the index pulse. What I do is home the machine axes using home switches first  (VBS command DOBUTTON(24) etc.). Then do the G31 for each axis.

Hope I made it clear. If you need further help I can send the vb script I use in the home macro.

Zafar
Re: axis homing with encoder
« Reply #3 on: September 04, 2013, 05:59:47 AM »
Zafar that is interesting I would like to see that script. Cool idea. I was thinking of replacing a couple of large slaved steppers with AC servos and that would work well for my needs.

Thanks
Craig
Re: axis homing with encoder
« Reply #4 on: September 04, 2013, 07:35:15 AM »
Zafar that is interesting I would like to see that script. Cool idea. I was thinking of replacing a couple of large slaved steppers with AC servos and that would work well for my needs.

Thanks
Craig

Here's a part of the macro for z-axis. You can repeat it for the other axes.

DoButton( 14 )
DoButton( 24 )
DoButton( 24 )
While ismoving()
sleep(50)
Wend
code "g91 g31 z-2.6 f50"
While ismoving()
sleep(50)
Wend
setmachzero(2)

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: axis homing with encoder
« Reply #5 on: September 04, 2013, 04:57:43 PM »
IF you plan on doing any probing or TLO that will not work out well as each time you rotate an axis motor you will trip the Probe input.

Just a thought, (;-) TP
Re: axis homing with encoder
« Reply #6 on: September 04, 2013, 09:21:18 PM »
If I am doing probing on the same machine then I connect the probe hardware through a relay which is enabled by an extra output pin. It cuts off the encoder index from the probe input pin and connects the probe to it. :).

Zafar

Offline khalid

*
  •  213 213
    • View Profile
    • My Wood carving
Re: axis homing with encoder
« Reply #7 on: September 06, 2013, 02:39:15 PM »
chhaaaa gya ustad...well done... someday i wish learn all that stuff from u zafar..