All pastes #361008 Raw Edit

Anonymous

public text v1 · immutable
#361008 ·published 2007-02-17 21:37 UTC
rendered paste body
# HAL config file for Pico Systems USC board
#
# Connect motion controller I/Os
#

# connect the parport functions to threads
# there are no inputs, btw.
#  this may be unusual because most parport components
#  are connected to the base-thread. servo thread is called less
#  frequently

loadrt hal_parport cfg="0x9800"
addf parport.0.write servo-thread -1

# connect limit/home switch outputs to motion controller
newsig Xminlim bit
newsig Xmaxlim  bit
newsig Xhome bit
linksp Xminlim <= ppmc.0.din.01.in
linksp Xminlim => axis.0.neg-lim-sw-in
linksp Xmaxlim <= ppmc.0.din.02.in
linksp Xmaxlim => axis.0.pos-lim-sw-in
linksp Xhome <= ppmc.0.din.00.in
linksp Xhome => axis.0.home-sw-in

newsig Yminlim bit
newsig Ymaxlim  bit
newsig Yhome bit
linksp Yminlim <= ppmc.0.din.05.in
linksp Yminlim => axis.1.neg-lim-sw-in
linksp Ymaxlim <= ppmc.0.din.06.in
linksp Ymaxlim => axis.1.pos-lim-sw-in
linksp Yhome <= ppmc.0.din.04.in
linksp Yhome => axis.1.home-sw-in

newsig Zminlim bit
newsig Zmaxlim  bit
newsig Zhome bit
linksp Zminlim <= ppmc.0.din.09.in
linksp Zminlim => axis.2.neg-lim-sw-in
linksp Zmaxlim <= ppmc.0.din.10.in
linksp Zmaxlim => axis.2.pos-lim-sw-in
linksp Zhome <= ppmc.0.din.08.in
linksp Zhome => axis.2.home-sw-in

newsig Aminlim bit
newsig Amaxlim  bit
newsig Ahome bit
linksp Aminlim <= ppmc.0.din.12.in
linksp Aminlim => axis.3.neg-lim-sw-in
linksp Amaxlim <= ppmc.0.din.13.in
linksp Amaxlim => axis.3.pos-lim-sw-in
linksp Ahome <= ppmc.0.din.11.in
linksp Ahome => axis.3.home-sw-in


# connect index pulses to motion controller
# do these when index pulsing is figured out
# This has been commented out pending changes to the
# driver to work with the canonical encoder interface
#newsig Xindex bit
#newsig Yindex  bit
#newsig Zindex bit
#linksp Xindex <= ppmc.0.encoder.00.index
#linksp Xindex => axis.0.index-pulse-in
#linksp Yindex <= ppmc.0.encoder.01.index
#linksp Yindex => axis.1.index-pulse-in
#linksp Zindex <= ppmc.0.encoder.02.index
#linksp Zindex => axis.2.index-pulse-in

#
# Connect I/O controller I/Os
#

# connect e-stop write/sense to I/O controller
newsig EstopSense bit
newsig EstopWrite bit
linksp EstopSense <= ppmc.0.din.15.in
linksp EstopSense => iocontrol.0.emc-enable-in
linksp EstopWrite <= ppmc.0.dout.07.out
linksp EstopWrite => iocontrol.0.user-enable-out
#estop may need to be inverted

# connect spindle fwd/rev to I/O controller
newsig SpindleFwd bit
newsig SpindleRev bit
# Owen change 1
# linksp SpindleFwd <= ppmc.0.dout.00.out
linksp SpindleFwd <= ppmc.0.dout.02.out
linksp SpindleFwd => motion.spindle-forward

# owen deletion, we're taking control of ppmc.0.dout.01.out for ventilation
# linksp SpindleRev <= ppmc.0.dout.01.out
# linksp SpindleRev => motion.spindle-reverse

# owen addition
newsig ventilation bit
linksp ventilation <= motion.digital-out-00 

# connect spindle speed up/down to I/O controller
newsig SpindleUp bit
newsig SpindleDown bit
#linksp SpindleUp <= ppmc.0.dout.06.out
#linksp SpindleUp => motion.spindle-incr-speed
#linksp SpindleDown <= ppmc.0.dout.05.out
#linksp SpindleDown => motion.spindle-decr-speed

# connect spindle brake to I/O controller
# Owen change 2 :: comment out the following 3 lines
# newsig SpindleBrakeOn bit
# linksp SpindleBrakeOn <= ppmc.0.dout.02.out
# linksp SpindleBrakeOn => motion.spindle-brake

# LASER ENABLE
# connect mist/flood coolant to I/O controller
newsig MistOn bit
newsig FloodOn bit
linksp MistOn <= ppmc.0.dout.03.out
linksp MistOn => iocontrol.0.coolant-mist

linksp FloodOn <= ppmc.0.dout.04.out
linksp FloodOn => iocontrol.0.coolant-flood