Realtime PWM mode added.

Discussions and file drops for Auggie
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 »

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
Old Timer
Posts: 56
Joined: Mon Sep 17, 2012 5:48 am

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.
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 »

J:

  No, nothign wrong, its me, your just ahead of me is all. I haven't yet hooked the S word to the slider as I havent needed to
yet, Ive been using the slider.
  Ill probably just add it to the spindle speed script call to set the variable MaxLaser to the correct value from 0 - 100.. It will
happen in a future update when I get to need it to react to the S word..
 
Glad to hear its coming together. :)

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. I am slowly moving forward with the laser project...  :)

If I read you correct I could set the variable "MaxLaser" to a value from 0 - 100 in the SpindleSpeed function. I will try doing that tomorrow, must be something like: GlobalSet( "MaxLaser", value );

When I played around with the dialog slider control, I noticed that script is never called on slider change - would be nice to have script calls, whenever slider changes value. I wanted to use this functionality to have the PWM value follow slider.

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 »

J:

  Yes, all correct , should work fine..

As I recall, as you need to do is make a script called

global LaserMax = function()
{
...
}

  And the script will get called when you slide it..

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

Re: Realtime PWM mode added.

Post by Joakim »

Art:

It works great setting the laser power from SpindleSpeed(). Likewise reading the values  :) Thanks.
No luck getting callback function to work when DRO changes. I must be doing something wrong...

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:

  Im adding a few things in there, so Ill try it myself and fix what ever the logjam is.. :)

Thx
Art
BobL
Global Moderator
Global Moderator
Posts: 466
Joined: Sun Sep 05, 2010 7:18 am

Re: Realtime PWM mode added.

Post by BobL »

ArtF wrote: One more piece of data, ( because threads such as this exist for years and many tend to read them for info..)

The following photo shows the Pokeys57 revision 2 changed the PWM location on the TestIO connector. As indicated by the arrow..

Art
Art;  Just received my opto board, using rev 2 Pokey CNC57 board, their info shows original layout without any change to the pwm pin 7 on test I/O connector in their pdf? Do I use pin 7 (default) from the Test IO connector, or you think pin 14 like you mentioned is the way to go for laser power control?

Cheers
Bob
Gearotic Motion
Bob
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 »

Bob

I believe the software is defaulted to the Pin14, but the script can easily be changed to use any of the 4 PWM channels comming
out..
Art
BobL
Global Moderator
Global Moderator
Posts: 466
Joined: Sun Sep 05, 2010 7:18 am

Re: Realtime PWM mode added.

Post by BobL »

Art;

Had to make a few changes with my setup to fit,so first of all will be using the pendent plug of the Pokey57CNC ver 1.2, so I'm using pin 11 of that plug, registered to pin 21 of the pokey. This will be my PWM pin to control my laser power. Had issues loading first of all the libraries, even with a new install or by deleting previous versions of Gearotic, it did not want to load, and I do agree with Maynard now that this problem only appears to be present when I use Win XP or Vista, if I use Win 8 or 10, appears to work just fine?  I compared both of my profiles generated in Auggie, one from my Win XP and the other from my Win10, I do see a bunch of stuff missing in the file generated by Win XP version.  Anyhow just about to adapt the Win10 profile version to my WinXP shortly, I'll let you know how that goes.

Cheers
Bob
Gearotic Motion
Bob
DanL
Old Timer
Posts: 362
Joined: Wed Sep 10, 2014 1:35 pm

Re: Realtime PWM mode added.

Post by DanL »

Bob that's what I ended up doing The 57cnc manual has the 1.2 pinout
BobL
Global Moderator
Global Moderator
Posts: 466
Joined: Sun Sep 05, 2010 7:18 am

Re: Realtime PWM mode added.

Post by BobL »

Thanks Dan.. Art and I are working on it as we speak.. Hopefully we'll see some results soon. Thanks for your input..

Cheers
Bob
Gearotic Motion
Bob
BobL
Global Moderator
Global Moderator
Posts: 466
Joined: Sun Sep 05, 2010 7:18 am

Re: Realtime PWM mode added.

Post by BobL »

Hi;

This is what we come up with.

  For all XP users, next release of Gearotic should have a fix in it, however for now if your library doesn't appear to work in XP like mine did, simply copy and add the following code to your profile and restart Auggie.
To elaborate, inside your Gearotic Motion folder, you'll find a folder called "Profile", inside that folder you'll find your configured Auggie system profile, simply edit it (*.profile) with notepad and add the following code to it and save it. Restart Auggie and it should work. What you'll see is the green indicator to indicate active, make sure all the ones shown in picture are active in order for it to work properly.

[ScriptTypes]
Scripts=1
GCode=1
IO=1
System=1
Laser=0
Rasters=0
Peripherals=0
trurtu=1
Graphics=0
Wizards=0
NewType=0
Initialized=1


[ScriptLibs]
GCodeFunctions=0
Rasters=1
SpiralLib=0
Spiral=0
spiral2=0
MathFunctions=0
ArtsLib=0
spiral6=0
ArtLib=1
Art=1
TestLib=1
MotionIO=1
SystemCallBacks=1
FreeAxis=1
Polar=1
SystemKernal=1
Spirals_lib=1
Spirals=1
LCD=1
GCodeLib=1
IOIO=1
MyGlobals=1
Long_Lat=1
Dates=1
SpiroGraphs=1
AxisConfigs=1
LaserControls=1
SpindleLib-Frequency=0
SpindleLib-Laser=1
SpindleLib-RelayOnly=0
IO=1
Laser=1
System=1
GCode=1
SystemTest=0
test=0
trurtu=0
trurtuwqer=0
Clock=1
Patterns=1
ArtsLaser=1
ElecFreqCalc=0
DialogExample=1
Tutorials=1
ArtTest=0
Initialized=1




Anyhow hope this helps anyone using XP and stuck in the loop I was, and thanks to Art for his dedication to finding a solution.

Cheers
Bob
Gearotic Motion
Bob
BobL
Global Moderator
Global Moderator
Posts: 466
Joined: Sun Sep 05, 2010 7:18 am

Re: Realtime PWM mode added.

Post by BobL »

Here's a picture of the Lib when it works fine...

Cheers
Bob
Attachments
SSPX0277.jpg
Gearotic Motion
Bob
Post Reply

Who is online

Users browsing this forum: No registered users and 45 guests