Spindle PID 5i25+7i77

More
10 years 2 months ago #79046 by dinkata
LinuxCNC 2.7.6 , configuration 5i25+7i77 Lathe X,Z ,spindle encoder. with PnCConf Wizard :
Code:
#******************* # 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 => pid.s.command net spindle-vel-fb-rpm => pid.s.feedback net spindle-output <= pid.s.output # ---PWM Generator signals/setup--- setp hm2_5i25.0.7i77.0.1.analogout5-scalemax [SPINDLE_9]OUTPUT_SCALE setp hm2_5i25.0.7i77.0.1.analogout5-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT setp hm2_5i25.0.7i77.0.1.analogout5-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT net spindle-output => hm2_5i25.0.7i77.0.1.analogout5 net spindle-enable => hm2_5i25.0.7i77.0.1.spinena # ---Encoder feedback signals/setup--- setp hm2_5i25.0.encoder.02.counter-mode 0 setp hm2_5i25.0.encoder.02.filter 1 setp hm2_5i25.0.encoder.02.index-invert 0 setp hm2_5i25.0.encoder.02.index-mask 0 setp hm2_5i25.0.encoder.02.index-mask-invert 0 setp hm2_5i25.0.encoder.02.scale [SPINDLE_9]ENCODER_SCALE net spindle-revs <= hm2_5i25.0.encoder.02.position net spindle-vel-fb-rps <= hm2_5i25.0.encoder.02.velocity net spindle-index-enable <=> hm2_5i25.0.encoder.02.index-enable # ---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 => parport.0.pin-01-out 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 # ---Setup spindle at speed signals--- net spindle-vel-cmd-rps => near.0.in1 net spindle-vel-fb-rps => near.0.in2 net spindle-at-speed <= near.0.out setp near.0.scale 1.000000 setp near.0.difference 20.00

net spindle-vel-fb-rps <= hm2_5i25.0.encoder.02.velocity #### ???

net spindle-vel-fb-rpm => pid.s.feedback ##### ?????

net spindle-vel-fb-rpm ### Where can i find it

Please Log in to join the conversation.

More
10 years 2 months ago #79076 by andypugh
Replied by andypugh on topic Spindle PID 5i25+7i77

dinkata wrote: net spindle-vel-fb-rpm ### Where can i find it


It's a signal. Signal names have no special meaning, you can use any names you want. (feel free to use your native language for them, for example).

However, as this is a PnCConf config, the names have not been chosen by you.

I don't know why PnCConf has configured things that way. The PID component ought to work perfectly with both command and feedback using the -rps signal.

Is there a "scale" component created anywhere in the HAL?

Please Log in to join the conversation.

More
10 years 2 months ago #79079 by dinkata
Replied by dinkata on topic Spindle PID 5i25+7i77

Is there a "scale" component created anywhere in the HAL?

aha ,I remembered PnCConf in Linuxcnc2.7.3
Code:
loadrt scale names=scale.spindle addf scale.spindle servo-thread setp scale.spindle.gain 60 ........................
maybe this will help :
Code:
loadrt scale names=scale.spindle addf scale.spindle servo-thread setp scale.spindle.gain 60 net spindle-vel-fb-rps <= hm2_5i25.0.encoder.02.velocity => scale.spindle.in net spindle-fb-rpm <= scale.spindle.out => pid.s.feedback

Please Log in to join the conversation.

Time to create page: 0.288 seconds
Powered by Kunena Forum