PDA

View Full Version : G30 programming



Leadhead
02-06-2017, 04:28 PM
If using G30 for a 2nd or 3rd work zero ref. Does one just add another command with new coordinates and the last one is superseded? Please explain gently if you could!

Neale
03-06-2017, 06:27 PM
I cannot find exactly what Mach3 (are you using Mach3? Different motion control software might interpret G30/G30.1 slightly differently) does with G30. In LinuxCNC, it is similar to G28 - it moves the controlled position (i.e. generally the centre line of the cutter) to a predefined position. On my own machine, for example, I have defined my G28 position to be over the touchplate set into the bed to make tool height resetting easier. Mach3 allows you to define the G28 position through one of the configuration pages. As far as I can see, though, you set the G30 position by jogging (or MDI gcode entry) to wherever you want it to be, and then enter G30.1 into the MDI dialogue box and this save the current position as the G30 reference position. Then, when you want to return to that position, you can use G30 to go there. However, without testing it I do not know if Mach3 works the same way as, say, LinuxCNC. For example, the LCNC definition of G28 is to go directly there in one move but Mach3 goes to SafeZ first and then does the XY move. However, you can add coordinates to G28 so that Mach3 should first move to those coordinates and then to the G28 position, and I believe that G30 should work the same way.

What is rather confusing is that some documentation refers to G28/G30 as moving to "home" positions. Usually, we think of a machine having only one home position - where the home switches are - so using "home" in this context is a bit misleading. Maybe a better description is "predefined position". What is important, though, is that G28/G30 positions are in machine (absolute) coordinates and not work coordinates.

I'm not sure if this has made anything clearer, but it might give you some clues about how to test it on your machine!

Leadhead
04-06-2017, 08:51 AM
Neale - Thanks for reply. I am actually just beginning to use Planet CNC TNC. (Still have three other Mach3 M/c`s) Just to confuse myself. - Been experimenting with G30 and it is becoming clearer. Absolute XY position and Z sequence for clearance are set as normal and as you suggest this works conveniently for a fixed sensor plate. - But I still would like to understand the multiple G30 offsets. Going to "play" with it this morning by trying a G30.1, G30.2 etc.
I guess it might be used as zero offsets for multiple pieces on the table or multiple non uniform part positions on a single plane?
Just something I have not use before and as Planet CNC feature it, curiosity more than necessity has set in.

Neale
04-06-2017, 09:13 AM
Interesting. I haven't used G30 (used to have a LinuxCNC machine but now using Mach3) but the documentation I found all seems to talk about G30 (to go to preset position) and G30.1 (to set that position). Maybe the Planet dialect of gcode adds further G30.n settings? If so, not sure how you get access to them! Please update us when you've worked it out:smile: