Page 3 of 6

Re: Realtime PWM mode added.

Posted: Mon Apr 25, 2016 4:16 pm
by ArtF
J:

Looks good. As to the pot,  the center tap being connected to the pwm means it shoudl see from 0 - 5 as pwm goes up.
The 0volt line of the pot is connected to pokeys ground just to give it a referance for the pwm.. You do need to remove the pot
though.  You sould then be able to measure form 0-5 volts as you slide the pwm slider on the pokeys software..

If so, your good to go, we're runnign tests, so we'll tell you what to look for as we find weaknesses in setting up..

Art


Re: Realtime PWM mode added.

Posted: Tue Apr 26, 2016 12:23 am
by GlennD
I only unhooked/hooked the TTL line and the PWN line (sorry for the dark blurry photo).
I did that to just test it out.
I still have to hook in the water pressure switch and a door switch but it runs.
I am pulling the 24v off of this power supply to run the Pokeys as well.
The blue wire labeled 2 goes to the Relay OC1
The black wire with the label is using Pin20 for PWM(PWM2).  I have it run through a small 3.3v to 5v booster circuit.
I used encoder connector since it had a smaller foot print.

The bob I am using is shown as well.

I will post a picture, I got off of the google K40 site, over in the laser stories side.
It looks reasonable.

Glenn
Edit was removing some possible confusion with the pin number P20 is PWM Pin2 not pin2

Re: Realtime PWM mode added.

Posted: Tue Apr 26, 2016 12:28 am
by ArtF
Thx Glen:

  Looks like its all coming together..
  :)

Art

Re: Realtime PWM mode added.

Posted: Wed Apr 27, 2016 4:15 am
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.

Re: Realtime PWM mode added.

Posted: Wed Apr 27, 2016 10:37 am
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



Re: Realtime PWM mode added.

Posted: Wed Apr 27, 2016 1:08 pm
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.

Re: Realtime PWM mode added.

Posted: Wed Apr 27, 2016 1:23 pm
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

Re: Realtime PWM mode added.

Posted: Wed Apr 27, 2016 5:09 pm
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

Re: Realtime PWM mode added.

Posted: Wed Apr 27, 2016 5:44 pm
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

Re: Realtime PWM mode added.

Posted: Wed Apr 27, 2016 10:56 pm
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