Hello Guest it is September 24, 2020, 11:40:06 AM

Author Topic: Can someone look at my code and tell me what I'm doing wrong? Using ger21 screen  (Read 3002 times)

0 Members and 1 Guest are viewing this topic.

Hello Everyone. I am absolutely loving ger21's screenset and being able to do tool changes but in my first larger cut I'm having weird issues.

I'm using MasterCAM x5 to create the code and I know there are a few quarks like I have to change the very first G90 in the code to G91.1 to make it not error upon loading in Mach3.

The other issue I had was there was an M01 call right before the 1st real tool change (yes there is an M6 at the start but that works flawlessly) and Mach just stopped at that. So I removed the M01 and it seemed to work. Since the spindle was 44" away it came back to the front, let me change the bit, did it's re-zero to the fixed tool change touchplate then went all the way back to the far end of the piece where it was.

Then instead of starting back up a strange menu popped up with a bunch of check-boxes and things about starting the spindle and getting up to feed rate so I hit ok (this wasn't the usuall just hit cycle start again to get going).

Did that and then the spindle came all the way back to the front and didn't do anything.

I'm guessing it is something in MasterCAM's creating the gcode causing this but I'm not sure what.

Could someone take a look and let me know what I need to fix? It's probably the lines around 150

Offline ger21

*
  • *
  •  6,286 6,286
    • View Profile
    • The CNC Woodworker
It sounds like you somehow hit the Run From Here Button. That's what the "strange window" you saw probably was. You're code runs through without any issues here.

You really need to learn how to edit the post processor your using, as there are a lot of things in that code that really don't need to be there, and others that shouldn't be there at all.


G90 and G91.1 do two different things, and you shouldn't replace G90 with G91.1. They both should be there, and you do have both, with G90 on line N104. They must be on different lines.

After the tool changes, you're doing a tool length offset, G43. You don't want to have these in there, as they can change the Z zero setting, depending on what you have entered in your tool table.

On line 102, you have G8 P1. Mach3 doesn't support G8, whatever it may be??
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Thanks ger21. I'm just learning MasterCAM and it definitely has some strange things it adds into the code.

So G90 doesn't wipe out G91.1? Without the G91.1 I get that wonderful arc to radius error.

So should I totally delete any reference to G43?

I may have inadvertently hit the pause button on my pendant when that run from here menu came up. Would that cause it?

Anyone with MasterCAM experience that can help me edit the correct pst file so these things don't happen again?

Offline ger21

*
  • *
  •  6,286 6,286
    • View Profile
    • The CNC Woodworker
G90 is absolute distance mode
G90.1 is absolute IJ mode (for arcs)

G91 is Incremental distance mode
G91.1 is Incremental IJ mode (for arcs)

Most CAM programs use absolute distance mode and Incremental IJ mode, so your code should have both a G90 and a G91.1.
But they MUST be on different lines, or only one of them will be read.

I would remove the G43 lines when using my screenset, as you don't need them.

Hitting the Pause button should not cause what you saw. I would think that you would have had to hit stop, then Run From Here. I'd be very careful to not inadvertently click on anything while the machine is running.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
So if I don't want to get that arc radius error which should I have in there? 90.1 or 91.1?

Offline ger21

*
  • *
  •  6,286 6,286
    • View Profile
    • The CNC Woodworker
Depends on how you have MasterCAM configured, but it appears to be 91.1
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
I don't have MasterCAM configured really. Still learning it and was told I could edit the pst file for the profile I was using but haven't tried to find the right one yet as there are tons and none seemed to be named what I thought they would and none of the dates had changed on them.

I did add a separate 91.1, removed the M01 and both of the G43 lines and everything worked as it should.

Again thanks for the help and I cannot thank you enough for making this screenset ger21. Now if I could just find a digitizing probe script/screenset I think I'll be a very happy man.

Offline ger21

*
  • *
  •  6,286 6,286
    • View Profile
    • The CNC Woodworker
The 2010 Screenset has a Probing wizard. If you want to do 3D digitizing, just use the wizard that comes with Mach 3.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
I saw the one in your screen set. Definitely plan on using it for edges but I meant 3D. Guess I didn't know that was built into the wizard. Thought I saw someone had a really good script setup for fast digitizing but we're having issues with newer versions of Mach3