Spindle Control using Chinese BOB with blue relay (solved)

More
27 May 2020 19:31 - 28 May 2020 17:35 #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


####  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
Last edit: 28 May 2020 17:35 by Clive S.

Please Log in or Create an account to join the conversation.

More
27 May 2020 20:11 #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.
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

More
27 May 2020 20:28 #169151 by Clive S
Thanks I have tried putting the scale -ve I will try changing the parport pin.

Please Log in or Create an account to join the conversation.

More
28 May 2020 11:16 #169214 by Clive S

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 or Create an account to join the conversation.

More
28 May 2020 12:27 #169223 by tommylight
parallel port outputs are inverted using setp
so
setp parport.0.pin-01-out-invert 1

Please Log in or Create an account to join the conversation.

More
28 May 2020 13:52 - 28 May 2020 14:27 #169232 by Clive S

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
Last edit: 28 May 2020 14:27 by Clive S. Reason: added text

Please Log in or Create an account to join the conversation.

More
28 May 2020 14:02 #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
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

More
28 May 2020 14:26 #169235 by Clive S

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 or Create an account to join the conversation.

More
28 May 2020 15:56 #169237 by tommylight

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.
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

Time to create page: 0.213 seconds
Powered by Kunena Forum