Hello Guest it is April 25, 2024, 08:30:25 PM

Author Topic: G28 vs G28.1 Mach3 and Gecko G540  (Read 11151 times)

0 Members and 1 Guest are viewing this topic.

G28 vs G28.1 Mach3 and Gecko G540
« on: September 26, 2012, 04:10:43 PM »
Hey Guys,

I have a small mill setup that I use in conjunction with my lathe spindle to turn pool cue shafts and butts. (I have X set up as the long axis and Y as the short axis).  My controller is a Gecko G540.

While I can tolerate some slop along the X-axis, I want my Y-axis to be extremely repeatable.  So, my way of thinking is when I am making multiple passes along the X-axis to slowly turn down a piece to size I want to make sure that my cutter always starts at exactly the same Y zero.  To that end, I will program my G-code routine with 3 or 4 successive passes down the X-axis and I've been using a G28 at the beginning of each pass.

One problem with this is that G28 is always a full speed movement - I'd rather that it be nice and slow.

So recently, I discovered that there is a G28.1 command which seems perfect for my needs - it will seek out my home switches so I feel more confident that I'm getting a consistent starting place on each pass and it will move at the current jog speed, so I can issue a simple F1 or F5 right before my G28.1 X0 Y0 command. 

The problem that I'm having is that because of my geometry, my Y homes in the positive direction, not the negative, and is set up as such in the Config Homing/Limits section of Mach 3.  Now G28 causes the cutter to move in the correct direction (albeit at full speed) but G28.1 does not seem to refer to the configuration settings and moves in the negative direction, setting me up for a crash.

Is there some way to tell G28.1 to move in the opposite direction?

I wasn't sure where to start researching this problem as I don't know if it is a Gecko issue or a Mach3 issue or (heaven forbid) a programmer (me) issue ;D.

Thanks for any feedback.

Gary












Re: G28 vs G28.1 Mach3 and Gecko G540
« Reply #1 on: September 27, 2012, 05:34:07 PM »
Well, I did some more research and figured out that I simply needed to write a macro with the single line
DoOEMButton(105)
and save it as M1628.m1s.

I can now rapid to a position near my home limits and then execute M1628 and get the result that I wanted.

FYI

Gary

P.S. However, I would like to know where a guy can read up on general GCode programming - not so much the commands themselves, but the kinds of techniques or approaches to a GCode script that are "good" versus hacking through the commands.