7180+7i77 Spindle Problems

More
24 Jun 2016 00:52 #76525 by CanadianNC
Hi,

I'm most of the way through a huge retrofit of a machine and the last thing to get up and running is the spindle. I have it connected to the CW and CCW outputs as well as analogout05 on the 7i77 card but all that happens when I turn on the spindle is that it goes to the minimum VFD speed and stays there. No voltage is present across analogout05. I did a bunch of searches on this and I keep seeing people talk about using:

net spindle-vel-cmd-rpm-abs => hm2_7i80.0.7i77.0.1.spinout

but when I use that instead of analogout05 Linuxcnc won't even load and it says that that line can't be loaded. My spindle doesn't have an encoder so no PID but I'm not sure which lines I need and which ones I don't so I left them all in there.
#*******************
#  SPINDLE S
#*******************

setp   pid.s.Pgain     [SPINDLE_9]P
setp   pid.s.Igain     [SPINDLE_9]I
setp   pid.s.Dgain     [SPINDLE_9]D
setp   pid.s.bias      [SPINDLE_9]BIAS
setp   pid.s.FF0       [SPINDLE_9]FF0
setp   pid.s.FF1       [SPINDLE_9]FF1
setp   pid.s.FF2       [SPINDLE_9]FF2
setp   pid.s.deadband  [SPINDLE_9]DEADBAND
setp   pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
setp   pid.s.error-previous-target true

net spindle-index-enable  <=> pid.s.index-enable
net spindle-enable        =>  pid.s.enable
net spindle-vel-cmd-rpm-abs     => pid.s.command
net spindle-vel-fb-rpm-abs      => pid.s.feedback
net spindle-output        =>  pid.s.output

# ---PWM Generator signals/setup---

setp   hm2_7i80.0.7i77.0.1.analogout5-scalemax  [SPINDLE_9]OUTPUT_SCALE
setp   hm2_7i80.0.7i77.0.1.analogout5-minlim    [SPINDLE_9]OUTPUT_MIN_LIMIT
setp   hm2_7i80.0.7i77.0.1.analogout5-maxlim    [SPINDLE_9]OUTPUT_MAX_LIMIT

net spindle-vel-cmd-rpm-abs    => hm2_7i80.0.7i77.0.1.analogout5
net spindle-enable     hm2_7i80.0.7i77.0.1.spinena

# ---setup spindle control signals---

net spindle-vel-cmd-rps        <=  motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs    <=  motion.spindle-speed-out-rps-abs
net spindle-vel-cmd-rpm        <=  motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs    <=  motion.spindle-speed-out-abs
net spindle-enable             <=  motion.spindle-on
net spindle-cw                 <=  motion.spindle-forward
net spindle-ccw                <=  motion.spindle-reverse
net spindle-brake              <=  motion.spindle-brake
net spindle-revs               =>  motion.spindle-revs
net spindle-at-speed           =>  motion.spindle-at-speed
net spindle-vel-fb-rps         =>  motion.spindle-speed-in
net spindle-index-enable      <=>  motion.spindle-index-enable
#********************
# Spindle 
#********************
[SPINDLE_9]
P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 17500
OUTPUT_SCALE = 17500
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 10

Can anyone give me some pointers on how to get this stuff up and running?

Thanks!

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

More
24 Jun 2016 01:32 #76527 by PCW
Replied by PCW on topic 7180+7i77 Spindle Problems
Try setting your OUTPUT_MAX_LIMIT limit to 17500

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

More
24 Jun 2016 01:49 #76530 by CanadianNC
I already tried that change but I still didn't measure anything on the analog output. How does Linuxcnc know that it's a 0-10V analog vs 0-5 or something like that if I make that change?

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

More
24 Jun 2016 04:19 #76535 by PCW
Replied by PCW on topic 7180+7i77 Spindle Problems
That change is necessary but maybe not sufficient (there may be additional errors)
The analog outputs are +-10V full scale

if you change the OUTPUT_SCALE value you must change the limits

if you have a output scale of 17500 RPM and a limit of 10 RPM you will have a
maximum output voltage of ~.0006V (10/17500)

So there may well be other issues with the spindle control but the analog output limits were too low

Can you post your complete hal and ini files here?

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

More
24 Jun 2016 12:21 #76544 by CanadianNC
Here are my INI and HAL files.

Would you mind giving me a quick explanation of the parameters, because I don't quite understand why there's a Max_output AND a output_max_limit parameter, they seem like they would do the same thing.

MAX_OUTPUT = 17500
OUTPUT_MAX_LIMIT = 10

Thanks!
Attachments:

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

More
24 Jun 2016 12:51 - 24 Jun 2016 12:52 #76547 by PCW
Replied by PCW on topic 7180+7i77 Spindle Problems
They do similar things, MAX_OUTPUT bounds the PID output (the spindle PID is setup but currently unused)
and OUTPUT_MAX_LIMIT bounds the actual _scaled_ analog output

As I said before OUTPUT_MAX_LIMIT must be 17500 or you will have a .6 mV maximum output if your scaling is 17500 RPM full scale

Here are the relevant statements in the hal file (unimportant statements deleled for clarity)

#*******************
# SPINDLE S
#*******************
setp pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
(note that the spindle PID loop is setup but not used so MAX_OUTPUT is dont-care)

setp hm2_7i80.0.7i77.0.1.analogout5-scalemax [SPINDLE_9]OUTPUT_SCALE
This sets the analog out full scale value (so 17500 = 10V analog out)

setp hm2_7i80.0.7i77.0.1.analogout5-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
this sets the scaled analog output minimum value
setp hm2_7i80.0.7i77.0.1.analogout5-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
This sets the scaled analog output maximum value

net spindle-vel-cmd-rpm-abs => hm2_7i80.0.7i77.0.1.analogout5
net spindle-enable hm2_7i80.0.7i77.0.1.spinena
net spindle-enable <= motion.spindle-on
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
Last edit: 24 Jun 2016 12:52 by PCW.
The following user(s) said Thank You: CanadianNC

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

More
24 Jun 2016 13:28 #76553 by CanadianNC
Thanks! That was a very helpful explanation.

So correct me if I'm wrong but it seems like the only thing wrong with my files was having 10 instead of 17500 for the output_max_limit?

I guess this points to my VFD maybe not looking for an external signal to set the speed... I'll have to look into that.

Thanks again!

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

More
24 Jun 2016 13:35 - 24 Jun 2016 14:01 #76555 by PCW
Replied by PCW on topic 7180+7i77 Spindle Problems
Its the only thing that i noticed being wrong in the spindle setup
Last edit: 24 Jun 2016 14:01 by PCW. Reason: sp
The following user(s) said Thank You: CanadianNC

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

More
24 Jun 2016 16:05 #76582 by CanadianNC
Thanks for all of your help, the spindle is now working under machine controlled speed. A combination of the settings in the VFD and the number I had wrong in the INI file seemed to be the root of everything.

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

Time to create page: 0.248 seconds
Powered by Kunena Forum