CNCadmin
05-10-2007, 11:27 AM
I added a few functions at the end before finish and would like to know if I have to adjust this bit of code to make it work-
function floodon()
text(" M08 (Flood coolant on)\n")
end
function miston()
text(" M07 (Mist coolant on)\n")
end
function coolantoff()
text(" M09 (Coolant off)\n")
end
function finish()
-- endz = safez
text (" T0\n")
text (" G00 Z4.5\n")
text (" G59\n")
text (" G00 X0 Y0\n")
-- rapid()
-- endy = 0
-- endx = 0
-- endz = 5
-- rapid()
text (" M05\n M30\n")
end
locost_cam
05-11-2007, 04:26 AM
Yes that should work fine. It might do odd things if you use the parking position in options->material (later versions of SheetCam only)
Les
CNCadmin
05-11-2007, 09:53 AM
What I would like is for the flood to turn on and off with the laser is that possible?
locost_cam
05-11-2007, 10:04 AM
If you are using a plasma based post then edit the pendown() and penup() events. Otherwise use the spindlecw() and spindleoff() events.
Just use text() to add the code to the output, just like you did in function finish().
Les
CNCadmin
05-11-2007, 10:07 AM
function pendown()
if (preheat > 0.001) then
modaltext (" G00")
modalnumber (" Z", cutheight * scale, "0.0000")
text ("\n G04 P")
number (preheat,"0.###")
eol()
end
modaltext (" G00")
modalnumber (" Z", pierceheight * scale, "0.0000")
text ("\n M03\n") (" M08\n") <------------------ like this ?
if (piercedelay > 0.001) then
text (" G04 P")
number (piercedelay,"0.###")
eol()
end
end
locost_cam
05-11-2007, 10:49 AM
function pendown()
text ("\n M03\n") (" M08\n") <------------------ like this ?
end
Try this instead
text ("\n M03\n M08\n")
The \n starts a new line
Les
CNCadmin
05-11-2007, 11:19 AM
So this is all I need than-
function pendown()
if (preheat > 0.001) then
modaltext (" G00")
modalnumber (" Z", cutheight * scale, "0.0000")
text ("\n G04 P")
number (preheat,"0.###")
eol()
end
modaltext (" G00")
modalnumber (" Z", pierceheight * scale, "0.0000")
text ("\n M03\n M08\n") <--------------------here
if (piercedelay > 0.001) then
text (" G04 P")
number (piercedelay,"0.###")
eol()
end
end
function penup()
text (" M05\n M09\n") <------------here
if (enddelay > 0) then
text (" G04 P")
number (enddelay,"0.###")
eol()
end
end
Thanks so much for your help!!
locost_cam
05-11-2007, 12:39 PM
Yup. That is all you need to do.
Les