Page 5 of 6

Re: Realtime PWM mode added.

Posted: Mon May 16, 2016 2:08 am
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


Re: Realtime PWM mode added.

Posted: Mon May 16, 2016 2:39 am
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

Re: Realtime PWM mode added.

Posted: Mon May 16, 2016 1:33 pm
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

Re: Realtime PWM mode added.

Posted: Tue May 17, 2016 10:14 pm
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

Re: Realtime PWM mode added.

Posted: Wed May 18, 2016 12:04 am
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

Re: Realtime PWM mode added.

Posted: Thu Dec 01, 2016 12:11 am
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

Re: Realtime PWM mode added.

Posted: Thu Dec 01, 2016 1:05 am
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

Re: Realtime PWM mode added.

Posted: Thu Dec 01, 2016 6:53 pm
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

Re: Realtime PWM mode added.

Posted: Fri Dec 02, 2016 12:20 am
by DanL
Bob that's what I ended up doing The 57cnc manual has the 1.2 pinout

Re: Realtime PWM mode added.

Posted: Fri Dec 02, 2016 4:27 pm
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