Page 1 of 1

Laser on and off script

Posted: Fri Dec 08, 2017 6:01 am
by chris9870
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.

Re: Laser on and off script

Posted: Fri Dec 08, 2017 9:57 am
by andrew
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.

Re: Laser on and off script

Posted: Fri Dec 08, 2017 10:42 am
by chris9870
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

Re: Laser on and off script

Posted: Fri Dec 08, 2017 11:32 am
by andrew
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.

Re: Laser on and off script

Posted: Sat Dec 09, 2017 1:06 am
by chris9870
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 8487 times
Thank you
Chris