Thanks guys, I now get the core concept of using an absolute value to ensure a positive signal.
I've dived into the [strike]danger zone[/strike] HAL file and had a crack at: tacking -abs onto the end of some spindle motion signals; and/or adding completely new lines in the spindle control signals section based on what I've read in similar posts. The results were as expected - spectacularly unsuccessful, varying from no effect, to crashing the program on start-up with a "motion.spindle-speed-out-rps-abs pin does not exist" error. (I did read in the basic HAL manual, that, "
If the signal does not exist net creates the new signal", so this adds to the confusion.)
The below text is the spindle section from the original HAL file before I started editing it. I am going to keep fiddling with it, but if anyone could point out the bleeding obvious to me it would be greatly appreciated.
Time for a quad-shot espresso,
Steve
# SPINDLE S
#*******************
# ---digital potentionmeter output signals/setup---
setp hm2_5i25.0.7i76.0.0.spinout-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-scalemax [SPINDLE_9]OUTPUT_SCALE
net spindle-vel-cmd => hm2_5i25.0.7i76.0.0.spinout
net machine-is-enabled => hm2_5i25.0.7i76.0.0.spinena
net spindle-ccw => hm2_5i25.0.7i76.0.0.spindir
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE
net spindle-revs <= hm2_5i25.0.encoder.00.position
net spindle-vel-fb <= hm2_5i25.0.encoder.00.velocity
net spindle-index-enable <=> hm2_5i25.0.encoder.00.index-enable
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd <= motion.spindle-speed-out
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---
sets spindle-at-speed true