Having Z safety height retracted before M6?

Discussion of post processors for various CNC machines

Having Z safety height retracted before M6?

Postby jkanzaki » Sat Mar 19, 2016 6:32 pm

Hi All,

I notice when I am using Meshcam V6 the Gcode it generate M6 tool change command appear after the X0 Y0 Z(retracted safety height)? For me this is problematic because I prefer the to turn on my spindle during a M6 tool change command (which will pause my machine).

Thanks
Henry
jkanzaki
 
Posts: 12
Joined: Fri Jul 10, 2015 7:00 pm

Re: Having Z safety height retracted before M6?

Postby Randy » Sat Mar 19, 2016 7:10 pm

Henry, what is your machine and control software, and what MeshCAM postprocessor are you using? If I understand correctly, you have a manually-controlled spindle (router) and want the motion to stay paused until you flip the switch on? Most controllers will accept a M0 command, which pauses everything until you press the (usually on-screen) START button again. If so, you could add the M0 on the line after the M6 toolchange.

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA

Re: Having Z safety height retracted before M6?

Postby jkanzaki » Sat Mar 19, 2016 7:58 pm

Randy wrote:Henry, what is your machine and control software, and what MeshCAM postprocessor are you using? If I understand correctly, you have a manually-controlled spindle (router) and want the motion to stay paused until you flip the switch on? Most controllers will accept a M0 command, which pauses everything until you press the (usually on-screen) START button again. If so, you could add the M0 on the line after the M6 toolchange.

Randy



Hi Randy,

I am running a shapeoko 3 Grbl
Machine Window 10 64 bit
Dw611 manual spindle
Gcode sending program : chilipepper

In chilipepper, M6 command will cause the everything until I hit (Unpause). In the NC file though I had to place M6 after G0X0.0000Y0.0000Z0.1100 ( z is the retracted height ) by editing the NC text file. I am just wondering if there is a better way by not having to go in to edit the text file.

just curious thats all.
jkanzaki
 
Posts: 12
Joined: Fri Jul 10, 2015 7:00 pm

Re: Having Z safety height retracted before M6?

Postby Randy » Sun Mar 20, 2016 4:47 pm

Henry, in the nc files you attached in the other thread, you are using a .250" cutter for roughing and a .125" cutter for finishing, but both are called T1.
%
(FILENAME: left.nc)
(TOOL/MILL,0.1,0.05,0.000,0)
G20
(STOCK/BLOCK, 8.500, 2.500, 0.385, 4.250, 1.250, 0.375)
(TOOL/MILL,0.2500,0,0.3750,0.0)
G0X0.0000Y0.0000Z0.1100
M6 T1
G0X-3.5317Y-1.1957
G1Z-0.0092F10.0
G1Z-0.0092F40.0
. . .
X3.5274Y-0.3738
X2.5827Y-0.0290
G0Z0.1100
(TOOL/MILL,0.1250,0,0.3750,0.0)
M6 T1
G0X-3.5894Y-0.9378
G1Z-0.0700F10.0
G1F40.0
X-3.5911Y-0.9358
X-3.6006Y-0.9201
. . .
X-3.5421
X-3.5579Y-0.9567
G0Z0.1100
(END)
(OF PROGRAM)


I think that if you call the finishing cutter T2 or whatever (anything but T1) the controller will pause. It probably isn't pausing because it doesn't know the finishing tool is different than the roughing tool.

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA

Re: Having Z safety height retracted before M6?

Postby jkanzaki » Mon Mar 21, 2016 4:32 am

Randy wrote:Henry, in the nc files you attached in the other thread, you are using a .250" cutter for roughing and a .125" cutter for finishing, but both are called T1.
%
(FILENAME: left.nc)
(TOOL/MILL,0.1,0.05,0.000,0)
G20
(STOCK/BLOCK, 8.500, 2.500, 0.385, 4.250, 1.250, 0.375)
(TOOL/MILL,0.2500,0,0.3750,0.0)
G0X0.0000Y0.0000Z0.1100
M6 T1
G0X-3.5317Y-1.1957
G1Z-0.0092F10.0
G1Z-0.0092F40.0
. . .
X3.5274Y-0.3738
X2.5827Y-0.0290
G0Z0.1100
(TOOL/MILL,0.1250,0,0.3750,0.0)
M6 T1
G0X-3.5894Y-0.9378
G1Z-0.0700F10.0
G1F40.0
X-3.5911Y-0.9358
X-3.6006Y-0.9201
. . .
X-3.5421
X-3.5579Y-0.9567
G0Z0.1100
(END)
(OF PROGRAM)


I think that if you call the finishing cutter T2 or whatever (anything but T1) the controller will pause. It probably isn't pausing because it doesn't know the finishing tool is different than the roughing tool.

Randy


Hi Randy,

Thanks for the reply.
Actually, I believe both roughing and finish tool are name T1, because in MeshCam both tool are name as tool# 1. I use Chilipeppr to send gcode to my shapeoko and it has the ability to detect M6 and has option to pause the machine upon the detection of M6. What I find a bit annoyance is the fact when I generate the gcode in Meshcam it will look something like this

"(STOCK/BLOCK, 8.500, 2.500, 0.385, 4.250, 1.250, 0.375)
(TOOL/MILL,0.2500,0,0.3750,0.0)
M6 T1 <---- machine is pause but I can't start my spindle because my end mill is touching the material.
G0X0.0000Y0.0000Z0.1100 <---- at this point the machine will raise to Z and operation will proceed.
G0X-3.5317Y-1.1957
G1Z-0.0092F10.0

this line of code appears after M6, so when i first zero my Z axis the endmill will be touching the material. I am counting on the M6 command appear after this line so the machine will raise the spindle and pause the operation so I can manually turn on my spindle.

Hopefully what I explain make sense.
cheers
jkanzaki
 
Posts: 12
Joined: Fri Jul 10, 2015 7:00 pm

Re: Having Z safety height retracted before M6?

Postby Randy » Mon Mar 21, 2016 6:12 pm

Henry, the gcode you attached, and which I quoted above, has the tool at the retract height before the M6 line in both cases (first and second tools).

But I'll ask again--which MeshCAM postprocessor are you using? It is possible to edit the postprocessor to raise the tool even farther at a toolchange if that is what you need.

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA

Re: Having Z safety height retracted before M6?

Postby jkanzaki » Mon Mar 21, 2016 11:04 pm

Hi Randy,

I am using Meshcam V6 Build 27.
If that is not the post processor can you tell me where I can find it?

Sorry I wasn't try to avoid your question.
Henry
jkanzaki
 
Posts: 12
Joined: Fri Jul 10, 2015 7:00 pm

Re: Having Z safety height retracted before M6?

Postby Randy » Tue Mar 22, 2016 12:08 am

Henry, the postprocessor is the "Save as type" when you save the gcode.

post.png
post.png (65.47 KiB) Viewed 1427 times


The postprocessor takes the toolpaths (which are always the same based on your machining parameters) and format them for your machine. You can customize the start and end of the gcode, number of decimal places for the coordinates, comments, and also customize toolchanges.

For instance, my Tormach post has these lines at a toolchange

;
TOOLCHANGE = "M09 (coolant off)"
TOOLCHANGE = "M05 (spindle off)"
TOOLCHANGE = "M998"
TOOLCHANGE = "M06 T[T] G43 H[T] ([CUTVIEWERTOOL])"
TOOLCHANGE = "G0[SZ]"
TOOLCHANGE = "M08 (flood coolant on)"
TOOLCHANGE = "M03 [S] (spindle on)"
;


The M998 is a Tormach-specific macro that raises the head to a pre-determined height in machine coordinates, and is thus independent of where Z=0 is set for the particular job. After I change the tool, it rapids back down to the safety/retract height set in MeshCAM before it turns the coolant back on, to minimize splashing. (My toolchange height is at least 10 inches above any job I'm doing.)

But you can do quite a bit of customizing by editing a post--they are just text-format files that tell MeshCAM how to write the gcode.

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA


Return to Post Processors

cron