configuring gearchange

More
11 Jun 2013 00:11 #35496 by andypugh
Replied by andypugh on topic configuring gearchange

Have you tryed constant surface speed? Does it automaticaly gear change?


Does your lathe support gear changes under load?

I think you probably need to choose the appropriate gear in the G-code then let the VFD handle the CSS as best it can in the selected gear.

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

More
11 Jun 2013 00:32 #35499 by LAIR82
Replied by LAIR82 on topic configuring gearchange
I didn't set it up to automatically change gears, and yes we do use CSS.

It would be pretty violent if we did a gearchange under load.

I use M41 for low range and M42 for hi range, with 20-500 rpms for low end and 50-3000 on the high end set in my hal file.

That was the "norm" for Cincinnati Milacron, of which we have a shop full.


Thanks

Rick

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

More
13 Jun 2013 00:47 #35572 by viski
Replied by viski on topic configuring gearchange
#*******************
# SPINDLE S
#*******************

# pid feedback spindle
setp pid.s.Pgain 0.0
setp pid.s.Igain 0.0
setp pid.s.Dgain 0.0
setp pid.s.bias 0
setp pid.s.FF0 4.8
setp pid.s.FF1 0
setp pid.s.FF2 0
setp pid.s.deadband 1.0
setp pid.s.maxoutput 1200

net s-output => pid.s.output
net s-pos-cmd => pid.s.command <= motion.spindle-speed-out
net s-vel-fb => pid.s.command-deriv


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


setp hm2_5i20.0.pwmgen.03.output-type 3
setp hm2_5i20.0.pwmgen.03.scale [SPINDLE_9]OUTPUT_SCALE


net s-output => hm2_5i20.0.pwmgen.03.value

net machine-is-enabled => hm2_5i20.0.pwmgen.03.enable pid.s.enable

# ---Encoder feedback signals/setup---

setp hm2_5i20.0.encoder.03.counter-mode 1
setp hm2_5i20.0.encoder.03.filter 1
setp hm2_5i20.0.encoder.03.index-invert 0
setp hm2_5i20.0.encoder.03.index-mask 0
setp hm2_5i20.0.encoder.03.index-mask-invert 0
setp hm2_5i20.0.encoder.03.scale [SPINDLE_9]ENCODER_SCALE


net spindle-revs <= hm2_5i20.0.encoder.03.position
net spindle-vel-fb <= hm2_5i20.0.encoder.03.velocity
net spindle-index-enable <=> hm2_5i20.0.encoder.03.index-enable

# ---setup spindle control signals---

net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-on <= 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 => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable

# ---Setup spindle at speed signals---

net s-pos-cmd => near.0.in1
net spindle-fb-filtered-abs-rpm => near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.000000
setp near.0.difference 5.333333

# Use ACTUAL spindle velocity from spindle encoder
# spindle-velocity bounces around so we filter it with lowpass
# spindle-velocity is signed so we use absolute component to remove sign
# ACTUAL velocity is in RPS not RPM so we scale it.

setp scale.spindle.gain 60
setp lowpass.spindle.gain 1.000000
net spindle-vel-fb => lowpass.spindle.in
net spindle-fb-filtered-rps lowpass.spindle.out => abs.spindle.in
net spindle-fb-filtered-abs-rps abs.spindle.out => scale.spindle.in
net spindle-fb-filtered-abs-rpm scale.spindle.out <= pid.s.feedback



Where should i link gearchange.0.speed-in ? ( encoder or commanded )
Where should i link gearchange.0.speed-out ?

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

More
13 Jun 2013 01:45 #35573 by LAIR82
Replied by LAIR82 on topic configuring gearchange
You should have a "motion.spindle-speed-out", connect that to the "gearchange.0.speed-in ", then for the "gearchange.0.speed-out" connect that to "spindle-vel-cmd ===> hm2_5i23.0.pwmgen.00.value".

Here is my hal data,

net spindle-junk <=== motion.spindle-speed-out
net spindle-junk ===> gearchange.0.speed-in

net spindle-vel-cmd ===> hm2_5i23.0.pwmgen.00.value
net spindle-vel-cmd <=== gearchange.0.speed-out


Thanks

Rick

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

More
02 Jul 2013 02:08 #36211 by viski
Replied by viski on topic configuring gearchange
I tryed this code but i get error message because i have already linked it to pid. How to fix problem?

net s-output => pid.s.output => hm2_5i20.0.pwmgen.03.value
net s-output <= gearchange.0.speed-out ( linked to pid out ??? )
net s-pos-cmd => pid.s.command <= motion.spindle-speed-out
net s-pos-cmd => gearchange.0.speed-in ( linked to motion.spindle-speed-out ??? )
net s-vel-fb => pid.s.command-deriv

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

More
02 Jul 2013 18:34 #36230 by andypugh
Replied by andypugh on topic configuring gearchange

I tryed this code but i get error message because i have already linked it to pid. How to fix problem?


Don't link the pid anywhere else in the HAL.
The following user(s) said Thank You: viski

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

More
03 Jul 2013 04:19 #36249 by viski
Replied by viski on topic configuring gearchange
what should i do then with gearchange.0.speed-out and speed-in ?

do i have to use another scale component ??

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

More
03 Jul 2013 04:39 #36250 by andypugh
Replied by andypugh on topic configuring gearchange

what should i do then with gearchange.0.speed-out and speed-in ?
do i have to use another scale component ??


If you are running a closed-loop spindle then gearchange _probably_ just wants to change the FF0 value

A complication here is that the FF0 pin (and all the similar gain pins) are IO pins, not inputs, and the gearchange pins are plain output (or input).
You can get round this with the "tristate_float" component.
www.linuxcnc.org/docs/html/man/man9/tristate_float.9.html

However, if you have a closed-loop spindle you might not even need the "gearchange" component. It's not a very useful component, as it only handles 2 gears.

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

More
03 Jul 2013 04:42 #36251 by andypugh
Replied by andypugh on topic configuring gearchange

However, if you have a closed-loop spindle you might not even need the "gearchange" component. It's not a very useful component, as it only handles 2 gears.


In fact, reading back, it sounds like you want to automatically change gear, and I don't think that "gearchange" does that at all. All that it is meant to do is to change the VFD rpm to volt scaling when it detects that high gear is manually selected.

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

Time to create page: 0.368 seconds
Powered by Kunena Forum