- Posts: 1850
- Thank you received: 127
Please Log in or Create an account to join the conversation.
rodw wrote: Have a look at lut5 as that gives you 5 bits of input.
Please Log in or Create an account to join the conversation.
andypugh wrote:
rodw wrote: Have a look at lut5 as that gives you 5 bits of input.
It is probably something you could do with a mux. You need 5 input bits so probably mux_generic using “ff32”
Please Log in or Create an account to join the conversation.
I might have done this if the hi/lo ratios could have been locked down to a simple multiple of the base ratio but that did not appear to be the case.
Please Log in or Create an account to join the conversation.
pin out float speed "speed in RPM";
#*******************
# 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
# ---Encoder feedback signals/setup---
setp hm2_7i76e.0.encoder.04.counter-mode 0
setp hm2_7i76e.0.encoder.04.filter 1
setp hm2_7i76e.0.encoder.04.index-invert 0
setp hm2_7i76e.0.encoder.04.index-mask 0
setp hm2_7i76e.0.encoder.04.index-mask-invert 0
# setp hm2_7i76e.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE
net spindle-revs <= hm2_7i76e.0.encoder.04.position
net spindle-vel-fb-rps <= hm2_7i76e.0.encoder.04.velocity
net spindle-index-enable <=> hm2_7i76e.0.encoder.04.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
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---
sets spindle-at-speed true
setp hm2_7i76e.0.7i76.0.0.spinout-scalemax 2400
setp hm2_7i76e.0.7i76.0.0.spinout-maxlim 2500
net spindle-enable hm2_7i76e.0.7i76.0.0.spinena
net spindle-vel-cmd-rpm-abs hm2_7i76e.0.7i76.0.0.spinout
net spindle-ccw hm2_7i76e.0.7i76.0.0.spindir
Please Log in or Create an account to join the conversation.
tecno wrote:
I might have done this if the hi/lo ratios could have been locked down to a simple multiple of the base ratio but that did not appear to be the case.
Lo is 50% of Hi or do I misunderstand this?
Please Log in or Create an account to join the conversation.