Likes

Search

ALWAYS End G-Code with return to X0.00 Y0.00 Z1.00 - HOW?

I have to do manual tool changes between etching the bottom of a PCB, Drilling, and cutting it out of the larger board.

Right now, the G-Code generated by pcb-gcode lifts the cutter to Z 1.000 but doesn't home it. I've spent the morning trying to make this happen by editing user-gcode.h without success. This must somehow be coded into the routine somewhere and maybe it would be better to fix it there. But where and how?

I would prefer something like:

G00 Z1.0000

G00 X0.0000 Y0.0000

Also the G-Code locates some end of file text at the joint between the trace etching and the spot-drilling but then doesn't show them at the actual end of file. This is not a big deal but I would truly like to no longer have to manually jog the tool in X and Y axes to return it to home.

There is a command just for automatic change of tool. All that you need is to add after that G00 Z1.000 a new line with G91 G28 Z0. This will lift your tool to the "Home Z position". You need to add after this, the command G90 for return to "Absolute coordinate system".

There is a command just for automatic change of tool. All that you
need is to add after that G00 Z1.000 a new line with G91 G28 Z0.
This will lift your tool to the "Home Z position". You need to add
after this, the command G90 for return to "Absolute coordinate
system".

As I say before, you have to add that command just after that "G00 Z1.000" in a new line.So it will look like this:your code....................................................G00 Z1.000G91 G28 Z0G90M30%

I can add these lines to the end of every G-Code file I generate,
but that requires time and since I want it in every file I do, I
want to change something in the pcbgcode.ulp so that it does it
automatically.

Right now what I'm getting is it lifts the tool to Z1.0000 and
then shuts down.

As I say before, you have to add that command just after that "G00
Z1.000" in a new line.
So it will look like this:
your code...........
......................
...................
G00 Z1.000
G91 G28 Z0
G90
M30
%

I have to do manual tool changes between etching the bottom of a PCB, Drilling, and cutting it out of the larger board.

Right now, the G-Code generated by pcb-gcode lifts the cutter to Z 1.000 but doesn't home it. I've spent the morning trying to make this happen by editing user-gcode.h without success. This must somehow be coded into the routine somewhere and maybe it would be better to fix it there. But where and how?

I would prefer something like:

G00 Z1.0000

G00 X0.0000 Y0.0000

Also the G-Code locates some end of file text at the joint between the trace etching and the spot-drilling but then doesn't show them at the actual end of file. This is not a big deal but I would truly like to no longer have to manually jog the tool in X and Y axes to return it to home.

My confusion is that I want it at the end of a file. I want the tool to return to X0 Y0 Z1.0 at the end of every job. This sets me up for turning off the machine, manually raising the head, changing the for the next stage, and then setting the height which I do by rolling the tool tip against a short piece of 1/4 inch steel drill stock.

Once this is done, I re-home the z axis and do the next run - drilling in this case.

The reason I need X0 and Y0 is that this is a clean part of the work piece and is a good place to set tool height.

I run the etch, then the drill, then mill. there is no tool change in the end of the etch gcode, or for that matter the drill, or mill code now. I tried doing what you recommended just below the END_OF_FILE (bottom), but it wouldn't take.

somewhere in your code you are sending an M02 but I couldn't find it. What I'd like is instead of the M02 by itself Id like to send:

|"G01 Z1\n" "G01 X0 Y0\n" "M02\n"; How can I do that? and thanks much for looking into this with me. john ferguson |

You should be able to add code in user-gcode.h in one or more of the TOOL_CHANGE_ strings. Like this:

|TOOL_CHANGE_BEGIN[ALL] = "G01 Z1\n" "G01 X0 Y0\n" "M06\n"; |

This code would be added to your gcode files for the beginning of tool changes for ALL sides of the board (top and bottom).

Regards,John

On 10 Apr 2020, at 15:34, John Ferguson via groups.io wrote:

Hi guys,

I have to do manual tool changes between etching the bottom of a PCB, Drilling, and cutting it out of the larger board.

Right now, the G-Code generated by pcb-gcode lifts the cutter to Z 1.000 but doesn't home it. I've spent the morning trying to make this happen by editing user-gcode.h without success. This must somehow be coded into the routine somewhere and maybe it would be better to fix it there. But where and how?

I would prefer something like:

G00 Z1.0000

G00 X0.0000 Y0.0000

Also the G-Code locates some end of file text at the joint between the trace etching and the spot-drilling but then doesn't show them at the actual end of file. This is not a big deal but I would truly like to no longer have to manually jog the tool in X and Y axes to return it to home.

My confusion is that I want it at the end of a file. I want the tool to return to X0 Y0 Z1.0 at the end of every job. This sets me up for turning off the machine, manually raising the head, changing the for the next stage, and then setting the height which I do by rolling the tool tip against a short piece of 1/4 inch steel drill stock.

Once this is done, I re-home the z axis and do the next run - drilling in this case.

The reason I need X0 and Y0 is that this is a clean part of the work piece and is a good place to set tool height.

I run the etch, then the drill, then mill. there is no tool change in the end of the etch gcode, or for that matter the drill, or mill code now. I tried doing what you recommended just below the END_OF_FILE (bottom), but it wouldn't take.

somewhere in your code you are sending an M02 but I couldn't find it. What I'd like is instead of the M02 by itself Id like to send:

|"G01 Z1\n" "G01 X0 Y0\n" "M02\n"; How can I do that? and thanks much for looking into this with me. john ferguson |

On 4/10/20 6:43 PM, John Johnson wrote:

Hey John,

You should be able to add code in user-gcode.h in one or more of the TOOL_CHANGE_ strings. Like this:

|TOOL_CHANGE_BEGIN[ALL] = "G01 Z1\n" "G01 X0 Y0\n" "M06\n"; |

This code would be added to your gcode files for the beginning of tool changes for ALL sides of the board (top and bottom).

Regards,
John

On 10 Apr 2020, at 15:34, John Ferguson via groups.io wrote:

Hi guys,

I have to do manual tool changes between etching the bottom of a
PCB, Drilling, and cutting it out of the larger board.

Right now, the G-Code generated by pcb-gcode lifts the cutter to Z
1.000 but doesn't home it. I've spent the morning trying to make
this happen by editing user-gcode.h without success. This must
somehow be coded into the routine somewhere and maybe it would be
better to fix it there. But where and how?

I would prefer something like:

G00 Z1.0000

G00 X0.0000 Y0.0000

Also the G-Code locates some end of file text at the joint between
the trace etching and the spot-drilling but then doesn't show them
at the actual end of file. This is not a big deal but I would
truly like to no longer have to manually jog the tool in X and Y
axes to return it to home.

Did you try putting your code in
FILE_END[ALL] = "(End of every file)\n";

?

Regards,
John

On 10 Apr 2020, at 19:16, John Ferguson via
groups.io wrote:

Hi John,

My confusion is that I want it at the end of a file. I
want the tool to return to X0 Y0 Z1.0 at the end of every
job. This sets me up for turning off the machine,
manually raising the head, changing the for the next
stage, and then setting the height which I do by rolling
the tool tip against a short piece of 1/4 inch steel drill
stock.

Once this is done, I re-home the z axis and do the next
run - drilling in this case.

The reason I need X0 and Y0 is that this is a clean part
of the work piece and is a good place to set tool height.

I run the etch, then the drill, then mill. there is no
tool change in the end of the etch gcode, or for that
matter the drill, or mill code now. I tried doing what you
recommended just below the END_OF_FILE (bottom), but it
wouldn't take.

somewhere in your code you are sending an M02 but I
couldn't find it. What I'd like is instead of the M02 by
itself Id like to send:

|"G01 Z1\n" "G01 X0 Y0\n" "M02\n"; How can I do that? and
thanks much for looking into this with me. john ferguson |

On 4/10/20 6:43 PM, John Johnson wrote:

Hey John,

You should be able to add code in user-gcode.h in one or
more of the TOOL_CHANGE_ strings. Like this:

|TOOL_CHANGE_BEGIN[ALL] = "G01 Z1\n" "G01 X0 Y0\n"
"M06\n"; |

This code would be added to your gcode files for the
beginning of tool changes for ALL sides of the board
(top and bottom).

Regards,
John

On 10 Apr 2020, at 15:34, John Ferguson via groups.io
wrote:

Hi guys,

I have to do manual tool changes between etching the
bottom of a
PCB, Drilling, and cutting it out of the larger board.

Right now, the G-Code generated by pcb-gcode lifts the
cutter to Z
1.000 but doesn't home it. I've spent the morning
trying to make
this happen by editing user-gcode.h without success.
This must
somehow be coded into the routine somewhere and maybe it
would be
better to fix it there. But where and how?

I would prefer something like:

G00 Z1.0000

G00 X0.0000 Y0.0000

Also the G-Code locates some end of file text at the
joint between
the trace etching and the spot-drilling but then doesn't
show them
at the actual end of file. This is not a big deal but I
would
truly like to no longer have to manually jog the tool in
X and Y
axes to return it to home.

Verify Delete

Are you sure you wish to delete this message from the message archives of pcbgcode@groups.io? This cannot be undone.

Verify Repost

Are you sure you wish to repost this message?

Report Message

Reason

Report to Moderators
I think this message isn't appropriate for our Group. The Group moderators are responsible for maintaining their community and can address these issues.
Report to Groups.io Support
I think this violates the Terms of Service. This includes: harm to minors, violence or threats, harassment or privacy invasion, impersonation or misrepresentation, fraud or phishing.