Realtime PWM mode added.

Discussions and file drops for Auggie
Joakim
Old Timer
Posts: 56
Joined: Mon Sep 17, 2012 5:48 am

Re: Realtime PWM mode added.

Post by Joakim »

Art:
I understand PWM 2 is not OC and will drive the laser power pin (as pot meter). I forgot that PWM 2 is a "normal" PWM.

Running latest Auggie 1.47(b) I get RT PWM on axis 8 and nice PWM signal on Encoder pin 9 (PWM 2) when pressing the fire button.

I ran into another problem:

1) Reset system. OK.
2) Reference all axis. OK.
3) Trying to jog X and Y. OK.
4) Issuing G0 X50 Y50 in single line windows. Nothing happens and the system seems to lock up.
5) Only solution is to reset system.

Log file says:
52:41:97  Setting Fold: -1
52:47:743  OverSpeed: GLine:1, s0:0.0000 s1:0.0000 d:22.0049 t:1.#INF
52:47:743  Motion Disabled
52:47:774  Clearing Motion buffer of entries

I have been through the configuration but it seems to be fine.
Feedrate are non-zero (F400) override is 100%, limit switches are not engaged.
Where should I look for the error?

I will wait with further wiring until movements are working.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Hi J:

Sounds liek we're getting close..

>>52:41:97  Setting Fold: -1
52:47:743  OverSpeed: GLine:1, s0:0.0000 s1:0.0000 d:22.0049 t:1.#INF

  This is a planner error, the t: is time, and it looks like its trying to move
22.0049 units at a speed which somehow is getting trashed by a division
by zero somewhere. ( The 1.#inf is a reaction to impossible math).

  Its something I should be checking , so Ill fix it when we figure this out.
Check your axis, X,Y,Z, (and A) if your using a 57, XYZ otherwise, and make sure they
all have a steps/unit and a max and min velocity set. It may be its trying to move
"A" axis, you have none, but the numbers are there and cause the failure. 
  If your not using an axis, give it numbers from the X axis.. if Im right and
its just an axis with no numbers, let me know and Ill add code so that
cannot happen anymore.

In specific: the line

OverSpeed: GLine:1, s0:0.0000 s1:0.0000 d:22.0049 t:1.#INF


is generated by the planner when it tries to move using current
setup accel , and steps/unit and it gets a move faster than 115Khz
in steps, or an impossible amount....  A move, any move,
even if in only one axis still requires computation of the other axis,
so check they all have numbers in them.

  Sorry for that, as we find such things now I will do a permanent
safety repair, its running very well here functionally, so Ill do my
best over the next while to cure whatever ails configurations unlike
my own..

  Dans reporting crashes on GCode load, so things like that will be
searched for as well..

Thx
Art


Joakim
Old Timer
Posts: 56
Joined: Mon Sep 17, 2012 5:48 am

Re: Realtime PWM mode added.

Post by Joakim »

Art:

Thank you, it worked  :D  - All axis (X, Y, Z, A and 5 - 8 ) now has valid entries and movement is now again possible on PoKeys57CNC.
I have disabled axis Z, A and 5-7 as they are not used at present.
Will low parameters for unused (enabled = false) axis slow down movement from the motion planner?

I will now proceed with wiring up laser fire and power control, one at a time...

Where is the software connection between RT PWM out on the free axis 8 and the output to OC1 output, is it in the script somewhere?

I made a new X and Y end stop design with simple 3D printable part and two micro switches (didn't like the old design), giving the standard bed a larger working area. I could put it up on the forum for others to use if you like.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Hi Joakim:

  Only an axis to be included in a motion will affect the speed, so you should be OK, Ive added to my list
to put in appropriate values for unused axis. Thx for the note. ( As you can imagine, in a 1 year old
controller there are, as of yet, probably hundreds of such small items to fin and correct.. :)

  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 appropriate pin will then have the PWM
controlled by the freeaxis.. ( You dont actually use the freeaxis, its just a transfer mechanism to the
PWM controller... and a great indicator that its working..

In config/Planner config is where youll find all the settings..

IMPORTANT:

  After changing any config item related to pwm, press the LIB button, then Done on the librarians
dialog, this restarts the scripting engine so the script globals for the PWM variables are updated..

Thx
Art
GlennD
Old Timer
Posts: 80
Joined: Tue Oct 18, 2011 4:19 pm

Re: Realtime PWM mode added.

Post by GlennD »

Art
With the update you just posted (1.48), I can now cut the same as I was with the DSP.
600mm/m 85% and 2 passes in 5mm acrylic.

Code:

M3
G1x10
Y10
X0
Y0
M5

Working on the airblow now.

Thank you
Glenn
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Glenn:

  Thx for the report, nice to  know.  Im having so much fun testing various images and such
I cant drag myself to the code enough..  lol


Glad to hear we can cut as well. There is some internal problem that can cause stuttering on short vector programs, or at least Ive seen it while debugging, but other than that Im pretty happy with
how its running.

Are you still getting crashes on GCode loads?

Art
GlennD
Old Timer
Posts: 80
Joined: Tue Oct 18, 2011 4:19 pm

Re: Realtime PWM mode added.

Post by GlennD »

Art
I think the crash was of my own making.
The combo of the M3 and the G110 using the same PWM pin.

So this was weird installed the new version cut great a I said went to rerun that photo I posted in the in the laser stories and the power slider did nothing had it on Zero and it was still cutting full on.

I deleted the Gearotic motion directory and started over. 
Everything is working great now.  Slider is fine and I am moving at 12000 mm/m no problem currently.

The jitter that would happen every once in a while is also gone.

This is so cool thank you again..
Glenn
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
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
Old Timer
Posts: 56
Joined: Mon Sep 17, 2012 5:48 am

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%.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
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
Old Timer
Posts: 56
Joined: Mon Sep 17, 2012 5:48 am

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...  ;)
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Realtime PWM mode added.

Post by ArtF »

Good to know. :)

Art
Joakim
Old Timer
Posts: 56
Joined: Mon Sep 17, 2012 5:48 am

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
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
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
Old Timer
Posts: 56
Joined: Mon Sep 17, 2012 5:48 am

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

Who is online

Users browsing this forum: No registered users and 52 guests