Laser on and off script

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Post Reply
chris9870
Newbie Member
Posts: 3
Joined: Fri Dec 01, 2017 7:07 am

Laser on and off script

Post by chris9870 » Fri Dec 08, 2017 6:01 am

Hi

I am working on both CNC and Laser machines.
The codes generated by QCADCAM work very good for CNC machines, but I don't understand how to generate gcodes for a laser one.
I tried to modify java scripts, which are working partially except laser on and off(I had to modify laser on and off manually)

What I want to do is to turn on the laser when Z position is negative, and turn off when Z position is positive or 0 value.
I need to check current Z position in the java script but don't understand how to.

Can somebody give me some good ways to do it?

Thank you in advance.

User avatar
andrew
Site Admin
Posts: 5634
Joined: Fri Mar 30, 2007 6:07 am

Re: Laser on and off script

Post by andrew » Fri Dec 08, 2017 9:57 am

Do you need any Z movements at all or just the S255 M03 and S0 to switch on and off the laser?

I have set up a post processor without Z movements. Can you have a look at the attached output file and let me know if that would work with your controller?

If not, can you please correct it or part of it?

I had also sent you an e-mail about this on 21/11/2017. Please check also your "spam" folder in case it got filtered out by gmail.
Attachments
test.nc
(3.51 KiB) Downloaded 50 times

chris9870
Newbie Member
Posts: 3
Joined: Fri Dec 01, 2017 7:07 am

Re: Laser on and off script

Post by chris9870 » Fri Dec 08, 2017 10:42 am

Hi
I had your email in my spam. Sorry about that!
The file you sent me works just fine.
Actually,I don't need Z movement at all but to find out when to turn on and off laser by checking Z position.

Thank you for your reply.
Chris

User avatar
andrew
Site Admin
Posts: 5634
Joined: Fri Mar 30, 2007 6:07 am

Re: Laser on and off script

Post by andrew » Fri Dec 08, 2017 11:32 am

OK, I will include this post processor in the next release. Do you know the name of your controller, so I can name your post processor appropriately? Thanks.

chris9870
Newbie Member
Posts: 3
Joined: Fri Dec 01, 2017 7:07 am

Re: Laser on and off script

Post by chris9870 » Sat Dec 09, 2017 1:06 am

HI

I removed the controller, which came with the laser cutter and changed to it with stepper controllers.
It's a generic parallel port controller controlling MACH3.
GRBL also uses the same way, which changes PWM duty with [S] parameter.
I think it's a pretty generic PWM controller.
pPort.PNG
pPort.PNG (407.53 KiB) Viewed 1521 times
Thank you
Chris

Post Reply

Return to “QCAD/CAM”