Page 14 of 20

Re: getting the 57cnc to work with G540

Posted: Sat Feb 27, 2016 7:32 pm
by ArtF
Dan:

Does it say in the log and on the toolpath screen

"Spindle was Turned on"

and

"Spindle was turned off"  ??

  Lets go from there...

Art

Re: getting the 57cnc to work with G540

Posted: Sat Feb 27, 2016 7:40 pm
by ArtF
Dan:

The Docs for the SuperPID seem to show it needs an opencollector drain to turn it on ..

Pin 45 may not be suitable. Id use either the relay.. OR OC1, just as the default spindle was set up for.
Youd connect your RUN wire from the super PID just to OC1 on the board. This also means youd see the LED to show
if its on or off...

Art

Re: getting the 57cnc to work with G540

Posted: Sat Feb 27, 2016 7:49 pm
by DanL
OK I will try that

Re: getting the 57cnc to work with G540

Posted: Sat Feb 27, 2016 9:38 pm
by DanL
it worked

Re: getting the 57cnc to work with G540

Posted: Sat Feb 27, 2016 9:57 pm
by DanL
it turn's on or off, but run's at full noise.

now for the pwm control on pin 20 pwm 2 do I put the changes into the Library MotionIO at the bottom it has Pokeys1.SetPWM( channel, duty); so channel will be 2 duty not sure.

and Pokeys1.SetPWM( period ); period would be 20ms

I got 20 from the pokeys config if I set 20ms in the pwm bit it has that it is  50.00 Hz

I will try this anyway and take a guess at what duty should be

Re: getting the 57cnc to work with G540

Posted: Sun Feb 28, 2016 5:49 am
by DanL
So i did do the changes the pwm 

also the pwm just stays at 5.02 vdc, with the spindle on or off, on oc1. I have read through all post's looking for where to set the pwm. I am a bit lost I will play more to see if I can find what to set, but I need help.

Re: getting the 57cnc to work with G540

Posted: Sun Feb 28, 2016 9:47 pm
by GlennD
Dan
After looking at the Super PID stuff you are going to need to follow several of the post I was working on.

You need to set up the circuit detailed here
GlennD wrote:
You can read up on the circuit here
That is where I got the schematic from.

You will also need to map the spindle speed to the PWM value not sure if Art has anything in place yet for that.
Click on the quote link for help with that
GlennD wrote:
I have been away for a few weeks trying to catch up now so please forgive me if this is covered some where else.

Glenn


Re: getting the 57cnc to work with G540

Posted: Sun Feb 28, 2016 11:30 pm
by DanL
I fixed the PWM being at 5vdc it was the - from OC1 I put it to common and that came good pwm is now working in pokeys.
spindle on/off works.
I will have a look at your stuff again, at a guess I would add it to the library where the spindle control is, or does it need it's own Library. I will just play and see how I get on.
making these mistakes and you boys just pointing and hinting, and Art or anyone giving the idea of how to do it is good

Re: getting the 57cnc to work with G540

Posted: Mon Feb 29, 2016 12:38 am
by GlennD
Can you post a rough sketch of what you did?
I am very interested in that.

Glenn

Re: getting the 57cnc to work with G540

Posted: Mon Feb 29, 2016 12:45 am
by DanL
I take a pic I have a HD camera