Spindle Control using Chinese BOB with blue relay (solved)

More
6 years 5 months ago #169145 by Clive S
Using the standard Chinese BOB with the blue relay I have this working of sorts

Problem as the speed goes up the volts on the output 0-10v goes down .

How do I calibrate it for 2400 rpm spindle with vfd
What would be sane values for the scale, offset, pwm-freq etc.

I am imputing 22V + 5V with the ground connected


Code:
#### Spindle stuff ### net spindle-cmd-rpm => pwmgen.0.value net spindle-on <= spindle.0.on => pwmgen.0.enable net spindle-pwm <= pwmgen.0.pwm setp pwmgen.0.pwm-freq 100 setp pwmgen.0.scale 1000 setp pwmgen.0.offset 0.1 setp pwmgen.0.dither-pwm true net spindle-cmd-rpm <= spindle.0.speed-out net spindle-cmd-rpm-abs <= spindle.0.speed-out-abs net spindle-cmd-rps <= spindle.0.speed-out-rps net spindle-cmd-rps-abs <= spindle.0.speed-out-rps-abs net spindle-at-speed => spindle.0.at-speed net spindle-cw <= spindle.0.forward ### Parport Pins ### net spindle-pwm => parport.0.pin-01-out net spindle-cw => parport.0.pin-14-out net spindle-on => parport.0.pin-17-out

Please Log in to join the conversation.

More
6 years 5 months ago #169149 by Mike_Eitel
For your invertion:
I'm not sure but believe there is a way to invert the output. Try with negative scale

Second version is that you invert your output parport.0.pin-01-out via
See doc: parport.<p>.pin−<n>−out−invert (bit) Inverts an output pin.

Please Log in to join the conversation.

More
6 years 5 months ago #169151 by Clive S
Thanks I have tried putting the scale -ve I will try changing the parport pin.

Please Log in to join the conversation.

More
6 years 5 months ago #169214 by Clive S

Clive S wrote: Thanks I have tried putting the scale -ve I will try changing the parport pin.


Ok I have now tried net spindle-pwm => parport.0.pin-01-out-invert 1 that throws an error (it is shown in the 2.7 docs but not 2.8 that I can see)

Please see the first post for my problem

Please Log in to join the conversation.

More
6 years 5 months ago #169223 by tommylight
parallel port outputs are inverted using setp
so
setp parport.0.pin-01-out-invert 1

Please Log in to join the conversation.

More
6 years 5 months ago #169232 by Clive S

tommylight wrote: parallel port outputs are inverted using setp
so
setp parport.0.pin-01-out-invert 1


As above Tom that throws an error with pin does not exist it probably exists in 2.7 I am using 2.8

Edit My bad I was not using setp

Please Log in to join the conversation.

More
6 years 5 months ago #169233 by tommylight
setp parport.0.pin-01-out-invert 1
Works for me on 2.9
It has to be above the pin 1 in hal
like so
setp parport.0.pin-02-out-invert 1
net xstep => parport.0.pin-02-out

Please Log in to join the conversation.

More
6 years 5 months ago #169235 by Clive S

tommylight wrote: setp parport.0.pin-01-out-invert 1
Works for me on 2.9
It has to be above the pin 1 in hal
like so
setp parport.0.pin-02-out-invert 1
net xstep => parport.0.pin-02-out


sorry, sorry , sorry my bad I was trying spindle-pwm => parport.0.pin-01-out-invert 1
but I had to do setp parport.0.pin-01-out-invert 1 and missed it.

Now that get me the 0-10v going up as the speed change goes up :)

setp pwmgen.0.pwm-freq 100
setp pwmgen.0.scale 24000 setting this gets me the 24K on the vcp display :)
setp pwmgen.0.offset 0.1 What does this do

setp pwmgen.0.dither-pwm true

Please Log in to join the conversation.

More
6 years 5 months ago #169237 by tommylight

Clive S wrote: setp pwmgen.0.offset 0.1 What does this do

It just sets the output a bit higher than 0 , so when you start the spindle it does not start at 0RPM.

Please Log in to join the conversation.

Time to create page: 0.221 seconds
Powered by Kunena Forum