VCarve Tool Change Help!

I want to try out VCarve with my MPCNC and am hitting a snag when I do a tool change with Repetier.

I have successfully setup tool changes in Estlcam with the following script:
[blockquote]M05
M84 S0
G0 Z50
@pause Change tool: <n>
G0 Z0
M03[/blockquote]

This Raises my router 50mm, Locks all of the motors, and puts a pause message on my screen. I can then safely change the tool, hit continue in Repetier and it takes off from there.

I put the same script into my VCarve PostProcessor File:
[blockquote]±--------------------------------------------------

  • Commands output at toolchange
    ±--------------------------------------------------

begin TOOLCHANGE

“M05”
“M84 S0”
“G0 Z50”
@pause Change tool”
“G0 Z0”
“M03”[/blockquote]

This raises my router 50mm, however the motors do not lock. When I hit continue I have gotten two different reactions:

  1. The program assumes I am at “home” and tries to continue from there (50mm too high and well away from x0,y0)
  2. Given the behavior above, I tried changing the bit and manually (i.e. by hand) moving the router back to 0,0,0. When I hit “Continue” the router moved back the the position 50mm above the surface and away from x0,y0 and then locked the motors! However, then the program stopped running, so there was no way to continue the cut.

What is confusing me is that the gcode is essentially the same from both programs:
Here is Estlcam (a couple lines on each side of the tool change):
[blockquote]G00 Z5.0000 F480

;No. 2:
M05
M84 S0
G0 Z50
@pause Change tool: 60 degree finish
G0 Z0
M03
G00 X27.8980 Y27.1180 Z5.0000 F2100
G00 Z0.5000 F480[/blockquote]

Here is VCarve (a couple lines on each side of the tool change):
[blockquote]G1 Z5.080
M05
M84 S0
G0 Z50
@pause Change tool
G0 Z0
M03
G1 X83.975 Y96.175 Z5.080
G1 Z-2.540 F180.0[/blockquote]

I am going to try adding an “@isathome” and removing the M84 to lock the motors, hopefully that work. However, I would really like the functionality to work the same between the two programs and this has been proven to be a reliable strategy in Estlcam.

Has anyone gotten this to work with VCarve?

A couple of notes about my setup:

  1. I do not have an LCD so I need to use Repetier to pause
  2. I do not have end switches, so I cannot “home” the machine
  3. The bits I am changing between (1/4" Endmill and 60degree 1/2" V-bit) are exactly the same “depth” (meaning protrusion from the router), that is why this pause in mid-air strategy has worked for me.

Ok, so I am making progress, I have added the “M84 S0” to the HEADER section of the post processor and that seems to fix the motors not locking issue. Now my GCode looks like this from VCarve for the tool change:

[blockquote]G1 X190.500 Y237.883
G1 Z5.080
M05
G1 Z50
@pause Change tool: End Mill (0.25 inch)
G1 Z0
M03
G1 X83.975 Y96.175 Z5.080
G1 Z-2.540 F180.0[/blockquote]

The issue now is that the router completes the “G1 Z0” step and then the program crashes with “Error: Line number is not Last Line Number+1”

Ideas?

I didn’t think repetier can do the tool change code. I just break the code up into different files per tool.

There are a couple of posts on here that I used to piece it together on Estlcam/Repetier, here is the one I refound:
https://www.v1engineering.com/forum/topic/locking-the-steppers-for-tool-changes/

I do agree, if I need to manually move the machine back to home, then there really isn’t much advantage doing a “tool change” vs just doing multiple files. That will be my temporary solution to test VCarve for now, but I still would like to understand why the same Tool Change GCode acts differently between the two programs.

M0 is a stop command, stop, shutdown. I think you want a pause.

Maybe m226, but then you also need to tell it how you will resume or maybe the M25. I just make multiple files until I were to set up endstops and a touchpad.

http://reprap.org/wiki/G-code