Forum Header

spindle speed backwards?

More
7 years 10 months ago #123135 by tonydiethelm
Edit: This was solved by inverting the Spindle PWM pin. No idea WHY that worked, as the output is a PWM signal to create an analog voltage, but... a'ight... working is working.

NOW I'm having problems with setting up the scaling. I really only need 0-2.5V on the output for my speed control. I'm setting up PWM1 to 0 and PWM2 to 0.25... but then I get nothing on the output, whereas I WAS getting 0-10V output with a test case.





Hello!

First... Thanks for LinuxCNC! I've been using it for years on homebrew machines. :dry:

I finally got around to getting a spindle instead of a router.

I wanted to test generic voltages out on my breakout board for spindle speed control. My spindle just needs an analog voltage for speed control. Cool. So...

I set speed 1 to 0, PWM 1 to 0.
I set speed 2 to 1000, PWM2 to 1.

Just like the documentation said to do.

S500, measures about 5v out on my breakout board, which should go 0-10v. Great!

When I increase the speed (s500, s600, s700) the voltage is going.... down?
When I decrease the speed (s400, s300, s200) the voltage is going up.

I am under the impression that this is supposed to be the other way around? Low voltage, low speed, high voltage, high speed.

What am I missing?

just for shitsngiggles, I reversed the order, trying to go from PWM1 of 1 to PWM2 of 0. That didn't work... :D

PWM rate is set to 100Hz, per documentation for the board.

Please Log in to join the conversation.

More
7 years 10 months ago #123195 by Mike_Eitel
Replied by Mike_Eitel on topic spindle speed backwards?
Easiest way.
SUM2 with negative maxvalue inverts inputvalue
Mike

Please Log in to join the conversation.

More
7 years 9 months ago #123251 by tonydiethelm
Uhh.... Can you... give just the slightest bit more context? :D

Please Log in to join the conversation.

More
7 years 9 months ago #123256 by Mike_Eitel
Replied by Mike_Eitel on topic spindle speed backwards?
Take your commanded value ( before input into probably into pwmgen.x.value) as input for
Setp sum2.x.in0 - 1
Setp mult2.x.in0 - 1
Net xxx1name (your signal) -> sum2.x.in1
Net xxx2name sum2.x.out -> mult2.x. in1
Net xxx3name mult2.x.out -> pwmgen.x.value

Mike

Please Log in to join the conversation.

More
7 years 9 months ago #123303 by tonydiethelm
Andypugh suggested "Try inverting the PWM pin".

That worked... heh. Thanks though!

Please Log in to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum