Engraving issue

I’m engraving a circuit board, the first side went fine. For some reason the gantry isn’t going all the way down on the back side. I’m using Estlcam, I set the depth at 0.3mm using the v-bit. I used the tiny touch plate to set the position. Using Repetier-Host the bit is riding about 1mm above the board instead of going down -0.3mm. I re-did the gcode a couple of times in Estlcam but it keeps doing the same thing. Could you take a look at my gcode and see if I’m missing anything?

Jerry
Clear Back Traces_R_Flipped.gcode (977.7 KB)

In terms of depth of cutting, the g-code looks fine. The Z feedrate is really slow. Maybe you need that for the plunge into a circuit board? Anyway, I did find this line which is suspect:

G29 X0 Y0 Z0

G29 is bed leveling. This is not something I’ve ever used, but, if that is what you were trying to do, I don’t believe the format is correct. I’m guessing that you were trying to do a G92, which would have established the current router position as (0,0,0).

But whether the G92 would work correctly will depend on what code you are executing for your touch plate. How you are handling your touch plate is the most likely the root of your issue. Can you post the front side code as well as whatever code or method you are using with your touch plate?

1 Like

I don’t know how I got that turned around, but yes, that’s what I was trying to do. That may be the problem. This is the gcode I’m using for the touch plate:
G28 Z
G92 Z0.5
G0 Z5 F480

I’ve been using that in a separate gcode and then loading the gcode for my carve. Can I just put the touch plate gcode at the beginning of my carve gcode rather than use a separate gcode file? Will it pause after G0 Z5 F480 and then I just push start again to continue?

I changed it to G92 X0 Y0 Z0, ran the touch plate code first and then the carve code but this time its saying about 5mm above the board as it carves. Am I putting it in the wrong place?

Clear Back Traces_R_Flipped.gcode (977.7 KB)

Take out the Z0 it is resetting the Z hight to where it is when the code runs. You are running the code to set the z high and pulling up to 5mm then running the z0 with the next file resetting it to 0 being 5mm high.

Your new behavior is what I would expect given what you are doing. The touch plate code looks fine. Just remove the G92 from the top of your g-code file, and your cutting will work.

As for what is happening, your touch plate code is correctly setting the Z=0 height to the top of the stock, but it is lifting the router 5mm off your stock so you can remove the plate. If you have a display, you will see that Z is at 5. If, after you run your touch plate code, you send a G1 Z0 F450, you will see that the bit will just kiss the top of your circuit board.

The problem is that you are executing a G92 at the top of the file, which set the current position (Z=5) as the Z=0 position. Remove the G92, and you are golden. The only question I have is why did your front side code work? What did you do differently for the front side?

I don’t want to get you confused here, but for something that needs to be this accurate, you might consider using the copper stock as your touch plate rather than the little touch plate sitting on top of the stock. The code used would be a bit different since you would not need to adjust for the plate thickness.

That’s the $64,000 question. I don’t recall doing anything different. This is how the code generated from Estlcam starts:

Project Clear Back Traces_R_Flipped
;Created by Estlcam version 11 build 11.244
;Machining time about 00:45:26 hours

G90
M03 S24000
G00 X0.0000 Y0.0000 Z0.0000 F
G00 Z2.0000 F480

;No. 1: Engraving 2
G00 X10.5297 Y16.0668 F
G00 Z0.5000 F480
G01 Z0.0000 F18 S24000
G01 Z-0.3000 F18
G01 X19.5845 Y12.2597 F1200
G01 X20.3115 Y12.2128 F1200
G01 X21.0387 Y12.1689 F1200
G01 X21.7661 Y12.1282 F1200
G01 X22.4937 Y12.0905 F1200
G01 X22.5380 Y12.0884 F1200
etc.

When I rant this code the z axis would bury itself into the board and I would quickly have to unplug the control board. Someone on this forum told me to replace G00 X0.0000 Y0.0000 Z0.0000 F with G92 X0 Y0 Z0 so I tried that and it worked. But now its not working! If I click on Home z axis in Repetier-Host it also buries the z axis so maybe G00 X0.0000 Y0.0000 Z0.0000 F was doing the same thing. I don’t understand why Repetier-Host does that or if there is any way to change it. Anyway, I will try your suggestion and be ready to quickly unplug.

Jerry

Ok, so after using the touch plate I ran the gcode starting like this:

G90
M03 S24000
G00 Z2.0000 F480

;No. 1: Engraving 2
G00 X10.5297 Y16.0668 F
G00 Z0.5000 F480
G01 Z0.0000 F18 S24000
G01 Z-0.3000 F18
G01 X19.5845 Y12.2597 F1200
etc.

and the bit moved just barely, maybe .5mm above the board.

I suggest you do the following. Use the touch plate to set the Z height, then in the manual tab of RepeaterHost, execute:

G1 Z0 F300

If the touch plate was perfectly flat on the copper, then the tip of the bit should just be touching the top of your copper. That is what you want before you execute your file. If the tip is above your copper, then it is possible you are not getting the touch plate flat against the copper.

If you continue to have issues getting the accuracy you need with the touch plate, I suggest you use copper surface as your “touch plate.”

  • Assure that the copper does not have a coating that would prevent electrical conductivity.
  • Weight the touch plate down on top of the copper, but away from where the bit will touch.
  • Attach the clip to the bit.
  • From RepetierHost, execute:
G28 Z

If everything goes to plan, this should leave the tip of the bit just touching the copper and have you ready to run your file.

Ok. I attached the touch plate, loaded and Started the Print. The bit moved down to the touch plate and back up 5mm. z axis showed 0.0mm. I removed the plate and clip and entered G1 Z0 F300 in the Gcode box and clicked Send. The bit moved down to maybe a couple of mm above the board and z axis showed -0.50mm. That’s not where it should be is it. I was thinking when I used the touch plate it should show z at 5mm. I was holding the touch plate firmly down to the copper board.

Something is strange with the behavior you are getting. The touch plate code you are executing does the following:

G28 Z        ; Homes the Z axis
G92 Z0.5     ; Compensate for the thickness of the touch plate
G0 Z5 F480   ; Rases the router so the plate can be removed

Note the above code assumes you are using the touch plate V1 sells, which is 0.5mm thick. The tip of the bit should be 5.0 mm above your stock at the end of homing, and the display should have a Z coordinate of 5.0 mm. You should be able to execute the above code using the touch plate, remove the plate, do a G1 Z0 F300 in the manual tab of RepetierHost, and the bit should just be touching the surface of your stock. If you cannot do this repeatedly and have the bit just touching, there is a problem beyond just knowing what g-code to use. It could be a mechanical issue. It could be an electronic noise issue.

I tried the touch plate several more times and each time when I click Start it dings, goes down and touches the plate, moves up 5mm but it still shows Z: 0.00. I just now noticed that even though Repetier-Host shows Z: 0.00 my V1CNC screen shows Z 5. I wonder if there is something wrong with Repetier-Host?

I’m not a regular Repetier-Host user. I’ve played with it a bit, but I don’t like to have my laptop in the shop, and I don’t like to trust wireless solutions, so I just use an SD card for all my cutting. I do know, both from personal experience and from the forum, that Repetier-Host and Marlin can be out of sync with respect to their coordinate system. Repetier-Host does not query Marlin about coordinates. There is a special command (@isathome) that, when used, will set Repetier-Host internal position to (0,0,0).

But the fact that Repeteir-Host and Marlin are out of sync should not matter with respect to the job you are doing. All that matters is that Marlin is displaying the correct coordinates before you execute the g-code file.

As for @isathome, you could use it in the touch plate routine to bring Marlin and Repetier-Host into sync:

G28 Z        ; Homes the Z axis
G92 Z0.5     ; Compensate for the thickness of the touch plate
G0 Z5 F480   ; Rases the router so the plate can be removed
M0 Remove the touch plate ; Pause to remove the touch plate
G0 Z0 F300   ; Move to Z = 0
@isathome

You will have to press the knob on the display after removing the plate. Note that @isathome sets X and Y as well.

I tried doing this. I used Manual Control to move the bit down to the board and checked with an ohm meter to get the precise point of contact. Then I unplugged the board and restarted Repetier-Host so it would see that position as 0. I changed my gcode to this thinking that it would raise Z 2mm, move to the first engrave position and then move down -2.3mm. and begin engraving. Instead it just drug straight accross the board without going up.

G90
M03 S24000
G92 X0 Y0 Z0
G00 Z2.0000 F480

;No. 1: Engraving 2
G00 X10.5297 Y16.0668 F
G00 Z-2.0000 F480
G01 Z-0.3000 F18
G01 X19.5845 Y12.2597 F1200
G01 X20.3115 Y12.2128 F1200
G01 X21.0387 Y12.1689 F1200
G01 X21.7661 Y12.1282 F1200
G01 X22.4937 Y12.0905 F1200
G01 X22.5380 Y12.0884 F1200

I will try that next.

Ok, tried this with the touch plate:
G28 Z
G92 Z0.5
G0 Z5 F480
M0
G0 Z0 F300
@isathome

V1CNC shows Z 5, Repetier-Host shows Z 0.50 I pushed the knob and V1CNCZ shows 0, Repetier-Host still shows Z 0.50.

I start my gcode:

G90
M03 S24000
G92 X0.0000 Y0.0000 Z0.0000 F
G00 Z2.0000 F480

;No. 1: Engraving 2
G00 X10.5297 Y16.0668 F
G00 Z0.5000 F480
G01 Z0.0000 F18 S24000
G01 Z-0.3000 F18
G01 X19.5845 Y12.2597 F1200
G01 X20.3115 Y12.2128 F1200
G01 X21.0387 Y12.1689 F1200
G01 X21.7661 Y12.1282 F1200
etc

and if Z moves down at all its only 0.5mm. It’s like it refuses to recognize any negative z value lower than what it thinks is 0.

I forgot to mention yesterday that I did an un-install/re-install of Repetier-Host in case something had gotten corrupted.

When Marlin thinks it is homed, it will refuse to move to any negative values, but the execution of a G92 will clear the “homed” state. This line “G92 X0.0000 Y0.0000 Z0.0000 F” should clear the homed state, but it may be F at the end confused the command since a G92 does not have a F parameter. Try changing that to “G92 X0 Y0 Z0.”

Repetier-Host in case something had gotten corrupted.

Make sure you setup Repetier-Host as indicated here. And I would ignore any Repetier-Host coordinate issues. For the most part, Repetier-Host simply sends the g-code to Marlin. It is what Marlin thinks that is important.

BTW: It shouldn’t be so hard to get this working. I cannot help but think there is something we are missing something. As mentioned, I don’t have a lot of Repetier-Host experience, but I’ve done a lot with g-code.

I checked my Repetier-Host setup and it was identical to the setup you referred me too. I also removed the F on G92 X0 Y0 Z0. I homed x & y and used the touch plate again. The V1CNC display read z 0.5 and Repetier-Host read z 0.00. Then i homed x & y again and the display read 5.5 and Repetier-Host read 5.0. I ran the gcode for my carve and as it was traveling to the different positions the display read z -0.3 while Repetier-Host said z 4.70 which appeared to be the actual position of the v-bit. I don’t understand why this is happening when the front side of the board ran perfectly. Here are the front and back gcodes.
Clear Front Traces_R.gcode (2.0 MB)
Clear Back Traces_R_Flipped.gcode (977.7 KB)

I’ll take a look at your g-code this evening if someone else doesn’t figure this out before then. Please:

  • Post the homing code you are currently executing
  • Are you turning off the steppers between the front and back side of your job?
  • Post any start or end code you have in Repetier-Host

You send g92 x0 y0 z0 at the start of your cut code… is your bit exactly at 0,0,0 before starting the cut? FWIW, you don’t find g92 in cut operation gcode often, usually just used for probe scripts… bet that’s your problem. Assuming you use the same probe script you posted above (the script is good)… I bet your cut works after you just put a ; before the g92 line. :wink:

I’m using end stops so I just click on Home X and Home Y in Repetier-Host. I can’t click on Home Z or Home All because it buries the bit into my spoiler board.

I’m not sure what you mean by that. Oh, yes because I usually do the back side on a different day than the front. I use a separate file to drill the holes after I carve the traces on the first side. Then, when I flip it over to do the back side I use two of the farthest holes to line up the board so the sides will match. It worked really well on the first one. I don’t understand why I’m having this problem now.

Do you mean is the bit touching the board? I use the touch plate code in a separate file which is supposed to put the bit 5mm above the board. Then I run the gcode file for my carve but I guess G92 is resetting that position as 0.0. I’m just not sure how to adjust the carve gcode so it brings the bit down to where it is supposed to be.