loadrt abs names=abs_spindle_feedback
addf abs_spindle_feedback servo-thread

net spindle-speed-limited  =>  spindle.0.speed-out-rps => spindle.0.speed-in
net joint_4_pos joint.4.motor-pos-cmd => joint.4.motor-pos-fb

# the unlink pin commands are only used, because they are connected 
# in core_sim.hal and we use this file to simulate
unlinkp iocontrol.0.tool-change
unlinkp iocontrol.0.tool-changed
unlinkp iocontrol.0.tool-prep-number

net tool-change      hal_manualtoolchange.change   <=  iocontrol.0.tool-change 
net tool-changed     hal_manualtoolchange.changed  <=  iocontrol.0.tool-changed
net tool-prep-number hal_manualtoolchange.number   <=  iocontrol.0.tool-prep-number
# woodpecker.spindle-pause does not exist
#net spindle-pause    woodpecker.spindle-pause      <= spindle.0.inhibit

# ---setup spindle control signals---


net spindle-vel-cmd        =>  spindle.0.speed-out
net spindle-at-speed       =>  spindle.0.at-speed
net spindle-brake          <=  spindle.0.brake
net spindle-index-enable  <=>  spindle.0.index-enable

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

sets spindle-at-speed true



net spindle-vel-cmd => spindle.0.speed-out
net spindle-vel-cmd => woodpecker.lcdnumber

# external offset stuff
net eoffset_enable   woodpecker.eoffset-enable => axis.z.eoffset-enable
net eoffset_clear    woodpecker.eoffset-clear => axis.z.eoffset-clear
net eoffset_count    woodpecker.eoffset-count => axis.z.eoffset-counts
net eoffset          woodpecker.eoffset-value <= axis.z.eoffset
# woodpecker.led-eoffset-limit does not exist
#net limited          woodpecker.led-eoffset-limit <= motion.eoffset-limited
setp axis.z.eoffset-scale 1.0

net mpg-sig           axis.x.jog-counts       axis.y.jog-counts  axis.z.jog-counts  woodpecker.mpg-in  woodpecker.MPG-s  

net jogSelectx        axis.x.jog-enable      woodpecker.jog.wheel.x
net jogSelecty        axis.y.jog-enable      woodpecker.jog.wheel.y
net jogSelectz        axis.z.jog-enable      woodpecker.jog.wheel.z
net jogSelecta        axis.a.jog-enable     woodpecker.jog.wheel.a

net jogIncrement      woodpecker.jog.wheel.increment
net jogIncrement      axis.x.jog-scale       axis.y.jog-scale      axis.z.jog-scale

