How do i set my post to turn on extraction fan

Having problems with or questions about SheetCam? Post them here.
Post Reply
Phillip
Posts: 10
Joined: Fri Nov 27, 2015 2:47 am

How do i set my post to turn on extraction fan

Post by Phillip »

Hi all.
I'm new to cnc so this might be a simple question but i have a cand cnc motion controller on my table and have my exhaust fan hooked up to my aux output. i would like to make it come on automatically when i start cutting. It already stops automatically at the end of the cut. I have no coding experience but i think i from what I've read i have to put M08 somwhere in my post processor but I can't find the exact instructions some help or advice would be great thanks :)

Oh and im using the stock cand cnc mp3000 parallel port post i don't have the exact name here but i can get it tonight that helps
sph01
Posts: 19
Joined: Tue Aug 18, 2015 3:01 am

Post by sph01 »

If you want to add it to the post processor then you should talk with Tom at CandCNC. He wrote the post.
Phillip
Posts: 10
Joined: Fri Nov 27, 2015 2:47 am

Post processer

Post by Phillip »

Thanks i will do that
User avatar
Les Newell
Site Admin
Posts: 3668
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

What m-codes are used to turn your fan on and off?
You can add extra code using the 'Insert code' operations. Go to Operation->insert code. Enter the code to turn your fan on in the big box.
If you have any other operations defined, drag this one to the top of the list. Now repeat for the code to turn off the fan and make sure that one is at the bottom of the list.
Phillip
Posts: 10
Joined: Fri Nov 27, 2015 2:47 am

Post by Phillip »

Thanks Les i got it figured out now the problem was not my coding the windows problem where users can't edit program files with out administrative permissions so i had to go to the hard drive and edit it and save it using the same name so it would work. I only found this permissions problem when I read one of your other posts. I am using windows 10.
Thanks again
Phillip
Posts: 10
Joined: Fri Nov 27, 2015 2:47 am

Post by Phillip »

Oh and the insert code function didn't work just got error codes i i think because of the permissions thing agian. But M08 turns on the aux output on the cand cnc boxes
User avatar
Les Newell
Site Admin
Posts: 3668
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

If you use SheetCam's built in post editor it works around the Windows permission issues. You end up with two versions of the post showing in the post list. Your modified version will show up with '(edited)' after the name to signify that it has been modified.

What errors did you get form the 'insert gcode ' function?
Phillip
Posts: 10
Joined: Fri Nov 27, 2015 2:47 am

Post by Phillip »

It says "warning feed rate is zero" but i double checked it and it wasn't. If i drag it down so it's after the operation then it works
Phillip
Posts: 10
Joined: Fri Nov 27, 2015 2:47 am

Post by Phillip »

:) just looked closer at the gcode it looks okay even after i get the warning so i think it will work just the warning pops up for some reason thanks again
User avatar
Les Newell
Site Admin
Posts: 3668
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

That warning is a bug in the post processor. Edit your post and look for this code:

Code: Select all

function OnNewOperation()
   post.Text (" (Process: ", operationName, ")\n")
   if &#40;plungeRate <= 0&#41; then
      post.Warning&#40;"WARNING&#58; Plunge rate is zero"&#41;
   end
   if &#40;feedRate <= 0&#41; then
      post.Warning&#40;"WARNING&#58; Feed rate is zero"&#41;
   end
end
Change it to:

Code: Select all

function OnNewOperation&#40;&#41;
   post.Text &#40;" &#40;Process&#58; ", operationName, "&#41;\n"&#41;
end
Phillip
Posts: 10
Joined: Fri Nov 27, 2015 2:47 am

Post by Phillip »

Thanks &#128512;
Post Reply