Page 4 of 6
Re: Realtime PWM mode added.
Posted: Thu Apr 28, 2016 12:49 am
by ArtF
Hi Glen:
Thx, I know there are many little bugs.. one I might mention, is the Laser3D mode stays
in effect till turned off, so if you don't get any laser, check its off. it is after the final pass, youll get
no laser until its reset or turned off.
Ill be fixing that shortly..
Thx
Art
Re: Realtime PWM mode added.
Posted: Thu Apr 28, 2016 5:23 pm
by Joakim
Art:
Watch the latest video I posted 2 night ago on configing the laser, it shows where to set the PWM channel
that the freeaxis will drive. Select a PWM channel there and the appropria te pin will then have the PWM
controlle d by the freeaxis. . ( You dont actually use the freeaxis, its just a transfer mechanism to the
PWM controlle r... and a great indicator that its working..
Great video explaining how things are working - watched it twice.
Had mixed up laser power (RT LaserOn) and laser power (mA to tube). After reconsideration I selected the same laser activation input on the power supply as the Mosi board used. That has opto coupled protection and connected it to Pokeys PWM channel 4.
Works fine!

Thanks!
For my CO2 tube and K40 machine, the limits are:
- 12% RT PWM before the laser fires at 20kHz PWM period.
- 4mA current at high voltage before laser fires.
I noticed a nonlinear relation between feedrate and power setting: 400mm/s at 50% is not the same as 800mm/s at 100%.
Seems that 400mm/s at 50% gives more cutting power than the double speed and 100%.
Re: Realtime PWM mode added.
Posted: Thu Apr 28, 2016 6:17 pm
by ArtF
Hi Joakim:
Ive noticed the same thing.. perhaps some sort of correction can be developed over time..
Art
Re: Realtime PWM mode added.
Posted: Fri Apr 29, 2016 12:34 am
by Joakim
Try and error... hmmm... Using PWM channel 4 with GND for powering Laser Fire opto coupler has the side effect of putting Pokeys57CNC into recovery mode on power on as PWM 4 on pin 18 is also RST.
Now using PWM channel 2 on Pokeys pin 20.
Just if someone run into similar problems, now you know why it loops recovery mode...
Re: Realtime PWM mode added.
Posted: Fri Apr 29, 2016 12:59 am
by ArtF
Good to know.
Art
Re: Realtime PWM mode added.
Posted: Thu May 12, 2016 11:49 pm
by Joakim
Art:
Have laser current control (mA) and laser PWM power working. I set the laser current in the SpindleSpeed() function, that way the GCode S parameter will set the current from 0% to 100% (S0 - S100). This will make it possible to change laser current on the fly.
Doing GCode vector cutting, how I can set the max laser power?
If the feedrate is set to 1000 mm/min (F1000) and the max laser power at 50%, I would expect a G1 move to ramp up (PWM) from 0% and be at 50% when the commanded feedrate is reached. But I need some way to set the max laser power from the GCode.
Joakim
Re: Realtime PWM mode added.
Posted: Fri May 13, 2016 12:15 am
by ArtF
Hi J:
Ill release a version at some point tomorrow. Thats the version Ill describe below..
In this version, you select Laser Spindle. You then dont have to use an S word. The Laser Power slider
on the screen selects the maximum power of the laser. SO if its set to 50% for example, and you command
F50, the PWM will ramp up from 0 - 50 and reach 50 when feedrate does. I will be tying the S word to the slider
so that it adjusts that when an S word is seen.
By doing it this way, both vector and raster modes are supported. It also allows tweaking while running just
by sliding the max power slider beside the test button.The version Ive been using should be out
at some point in the morning..
Art
Re: Realtime PWM mode added.
Posted: Fri May 13, 2016 9:52 pm
by Joakim
Art:
Thank you, Great. Just downloaded 1.48a and will try it out.
(Safest to back up changed scripts before installing...)
Is it possible to use another parameter (P or similar) to control laser current setting or is the solution to define a new G/M code?
Joakim
Re: Realtime PWM mode added.
Posted: Sat May 14, 2016 12:24 am
by ArtF
J:
Probably best to add a new Gcode.. the spindle script will get only the S parameter in its
call, but a Gcode gets many parameters, so allows better flexibility..
Art
Re: Realtime PWM mode added.
Posted: Mon May 16, 2016 1:43 am
by Joakim
Art:
Moved the K40 current control to G110 Pxx GCode as you suggested - works great. Making a new GCode is really easy...
The GCode S parameter has no effect on power setting (Real time PWM), not the output measured on the scope nor the power slider - am I doing something wrong?
The version I tested are the latest 1.48a.