Realtime PWM mode added.

Discussions and file drops for Auggie
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Realtime PWM mode added.

Post 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


Joakim
Site Admin
Posts: 56
Joined: Mon Sep 17, 2012 4:48 pm

Re: Realtime PWM mode added.

Post 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%.
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Hi Joakim:

  Ive noticed the same thing.. perhaps some sort of correction can be developed over time..

Art
Joakim
Site Admin
Posts: 56
Joined: Mon Sep 17, 2012 4:48 pm

Re: Realtime PWM mode added.

Post 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...  ;)
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Good to know. :)

Art
Joakim
Site Admin
Posts: 56
Joined: Mon Sep 17, 2012 4:48 pm

Re: Realtime PWM mode added.

Post 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
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Realtime PWM mode added.

Post 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
Joakim
Site Admin
Posts: 56
Joined: Mon Sep 17, 2012 4:48 pm

Re: Realtime PWM mode added.

Post 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
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Realtime PWM mode added.

Post 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
Joakim
Site Admin
Posts: 56
Joined: Mon Sep 17, 2012 4:48 pm

Re: Realtime PWM mode added.

Post by Joakim »

Art:
Moved the K40 current control to G110 Pxx GCode as you suggested - works great. Making a new GCode is really easy...  :D

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.
Post Reply