Author Topic: M3 and M5 help  (Read 426 times)

Offline gorf26

  • Ewok
  • *
  • Posts: 7
    • View Profile
M3 and M5 help
« on: March 27, 2020, 00:13:16 am »
I seem to be having problems with the m3 and m5 being generated correct in the gcode.
i have 5 opts 2 drilling a pocket and 2 profiles the m3 and m5 are not posting to the gcode correctly
no m5 is in the gcode at all, and the m3 is only posting before the drilling opts, and all others only have the S-2500
no m3, there are m6 tool change's in the g code so the spindle should turn off m5, i know i had it working at one time but have to replace hard drive and reinstall all but been so long don't remember how i had it setup and tried to search but came up empty, any suggestions?..

Thanks gary

Offline turbothis

  • Ewok
  • *
  • Posts: 20
    • View Profile
Re: M3 and M5 help
« Reply #1 on: March 27, 2020, 03:22:50 am »
i hate to be the guy to say you need to check it before running and then manually adjust these things.
i have just gave in over the years in thinking there is a perfect post processor and just run my hands over the code before running it :-[

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 5866
    • View Profile
    • Cambam French Doc
Re: M3 and M5 help
« Reply #2 on: March 27, 2020, 04:13:39 am »
Hello Gary

Welcome to the forum.  ;)

It would be fine to give more detailed informations like: what is the machine control software you're using to drive the machine, what post processor you're using to generate the Gcode.;please share your .cb file, the Gcode obtained (.nc), and if you're using a custom post processor, also share the .cbpp file.

I'm not aware of problem with the M3 / M5 with the post processor that comes with CB (Mach3, default, etc ...)

You can post those files as attachment trough the "Additional Option" link at the bottom of the message editor.

Quote
i have just gave in over the years in thinking there is a perfect post processor and just run my hands over the code before running it

I never change anything manually in the GCode ; with the correct post processor, the result is exactly what I want.

Cambam allow to do a lot of things with the post processor itself, and if this can't be done with the PP, it can be done with the post treatment ...

++
David
« Last Edit: March 27, 2020, 04:18:07 am by dh42 »

Offline turbothis

  • Ewok
  • *
  • Posts: 20
    • View Profile
Re: M3 and M5 help
« Reply #3 on: March 27, 2020, 05:19:21 am »
i use dynomotionCNC for my mill controller which is based off linuxCNC i believe
it has a nice open G code viewer to do many task like offset any of the code, replace code and more.

my dolphin cad/cam post processor is kinda junky so i edit a small amount each time

Offline gorf26

  • Ewok
  • *
  • Posts: 7
    • View Profile
Re: M3 and M5 help
« Reply #4 on: March 27, 2020, 22:27:42 pm »
Thanks

I attached a zip with the post, cb file and gcode...

Thanks gary

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1294
    • View Profile
Re: M3 and M5 help
« Reply #5 on: March 28, 2020, 05:05:56 am »
Hi Garry

I had a look at your CB file and pp.
the PP is a Mach3 with the drilling cycles modified.
I made a new Mach3copy.pp which adds the M5s.
I ran the file through Camotics and it seems Ok.
I had to change a few things in the mops, positive target depth in the profile mop.
I made another file using one of my plugins which annotates the drilling code
so that it will be easy to  read the Gcode and follow what’s happening.

I've included the CB file and the PP and a file with vanilla  .nc code
and a separate file that has more detailed comments.
Hope this helps.

About the file itself, with the profile mop (0.25dia tool 0.8 deep) may want
a bit of added cutwidth (the mop cutwidth property) being so deep the chip
evacuation may be a bit difficult if you don’t have high pressure air\coolant
and effectively you are slotting so making the cutwidth a little wider will help
the finish and stop the tool from re-cutting the chips.

Dave

Offline gorf26

  • Ewok
  • *
  • Posts: 7
    • View Profile
Re: M3 and M5 help
« Reply #6 on: March 28, 2020, 17:45:33 pm »
Thanks

I should have said this before but i am using mach4..
So it doesn't seem to like the unmodified drill in the post i did have to change the g83 and drill post so as not have mach4 complain about missing Q words.. so i most likely will have to put them back, but the m3 and m5 did look good now.
and i do have a fairly good flow of coolant so it should keep the chips clear, but i will see how it go's and modify gcode if necessary..

Thanks gary 

   

Offline gorf26

  • Ewok
  • *
  • Posts: 7
    • View Profile
Re: M3 and M5 help
« Reply #7 on: March 28, 2020, 19:46:09 pm »
Dave

After digging in a little further, i have found some issues.

I see with the drill ops that you are using the standard-mm from 98..
i am using cambam 1.0 and i get the message standard-mm from 98 not found..

Also i am seeing the m3 and m5 not showing up in the pocketing and profiling again, they only show in the drill

Not sure right now if its because i changed the dill post back so mach4 likes it.. but don't think so..

Will check further..

Thanks gary

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1294
    • View Profile
Re: M3 and M5 help
« Reply #8 on: March 29, 2020, 02:44:46 am »
HI Garry

Mach4...there isn’t one here, so we'll have to set one up from scratch.
This can be a tedious and frustrating process if you don’t apply a systematic
approach to the problem.

With the tool libraries, they don't import with the CB file, you usually will have different
tool libraries and tools to me, so the normal process would be to download a CB file
and change the tool libraries to suit the ones you have ie. standard-in.
of course the tool numbers will be different so when you download the CB file I've made
you should select the right tool number from your library.

Too get started, I've made a CB file as (inch), I'm in metric land.
I've just put a circle and a square in the file and selected my 0.25 drill and endmill.
you will have to change these to suit whatever tool numbers they are in your library.

In the first pic I've selected a Drill mop and generated the code.
Notice there’s no Q value as the peck distance has not been set.
In the second pic there is one (Q value) as I've set the peck distance to 0.01.

I ran this file on on my Mach3 powered mill and as you can see, it works.

Load the .nc file provided and see what Mach4 thinks of it, if its ok I'll post the PP.

Dave

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1294
    • View Profile
Re: M3 and M5 help
« Reply #9 on: March 29, 2020, 02:46:49 am »
.NC File to test run or simulate in Mach4.

Offline gorf26

  • Ewok
  • *
  • Posts: 7
    • View Profile
Re: M3 and M5 help
« Reply #10 on: March 29, 2020, 23:01:20 pm »
Dave

I see what your saying, and the code does run in mach4..

Code: [Select]
( Made using CamBam - http://www.cambam.co.uk )
( XballscrewmountFinal7 3/28/2020 3:50:46 PM )
( T3 : 0.125 )
( T4 : 0.25 )
( T7 : 0.25 )
G20 G90 G91.1 G64 G40
G0 Z0.125
M5
( T3 : 0.125 )
T3 M6
( Drill1 )
G17
M8
M3 S1000
G0 X-0.4456 Y-0.6138
G98
G83 X-0.4456 Y-0.6138 Z-0.125 Q0.05 R0.125 F10.0
G83 X0.4384 Z-0.125
G80
M9

here is were the problem seems to be if there is 2 or more holes and cambam outputs 2 lines with the g83
the second line is missing the Q word so mach4 doesn't like it...
endless i change the post g83 {$g83} to {$_g83} then it seems to work with mach4, and a major problem is if the m5 for some reason is missing at the end of one of the ops then when the m3 is executed it seems to turn off the spindle i assume it for some reason thinks it was already off.

I'll have to have a look at the m3 macro, there was quite a few things going on in there but its been a while since i wrote it, turns on and off at least 3 relays... forget what else is going on in there, but as long as an m5 is executed then all seems fine..

Just an update i reinstalled mach3 and ran the gcode with the 2 g83 lines and it ran fine, so mach3  doesn't care about no Q in the second g83..

Thanks gary
« Last Edit: March 29, 2020, 23:44:26 pm by gorf26 »

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1294
    • View Profile
Re: M3 and M5 help
« Reply #11 on: March 30, 2020, 00:18:12 am »
Hi Garry

The G83 is no problem to fix.
Don't worry about the custom M3, I don't realy need to see it. don't touch it.
The only thing I need you to do is generate a .nc file with at least two drilling ops with a couple of holes in each and a  profile mop and then Hand edit it so that Mach4 runs properly,run it though Mach4 to make sure that it runs and then re-post it here and I will modify the PP to generate that identical code.

Dave

Offline gorf26

  • Ewok
  • *
  • Posts: 7
    • View Profile
Re: M3 and M5 help
« Reply #12 on: March 30, 2020, 22:11:51 pm »
Dave

Here is the cb, gcode and post...

I messed with the post a little and it seems to be allot better, the copy works with both mach4 and mach3
M3 S seems good also its in all the opts...

So the only problem i have right now is the m5, only shows in the gcode at end of the file, so spindle is not shutting off at the tool change.

the m8 and m9 look good also...

So only one more thing to get going.

Thanks gary

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1294
    • View Profile
Re: M3 and M5 help
« Reply #13 on: March 31, 2020, 06:23:33 am »
HI Garry
Here you go.
Dave

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2275
    • View Profile
Re: M3 and M5 help
« Reply #14 on: March 31, 2020, 11:11:31 am »
Quote
So the only problem i have right now is the m5, only shows in the gcode at end of the file, so spindle is not shutting off at the tool change.
I don't have running Mach3 in front of me but its behavior on tool change is defined in Mach3 own settings IIRC. -> (stop spindle, wait for start)