# HAL config file for Vital Systems MOTENC-100 PCI board # # Install driver. #loadrt hal_motenc # Classicladder for machine logic (load the realtime portion). # Just uncomment the following line if you want a Software PLC #loadrt classicladder_rt numRungs=4 numBits=16 numWords=4 numTimers=2 numMonostables=2 numPhysInputs=16 numPhysOutputs=8 numArithmExpr=4 numSections=1 # Invoke the user part of CL to silently load the program. # Just uncomment the following line if you want a Software PLC #loadusr -w classicladder --nogui ../configs/common/bridgeport.clp # Add I/O to servo thread so they will be evaluated # every servo period. # inputs get read at the beginning of the thread addf motenc.0.misc-update servo-thread 1 #addf motenc.0.adc-read servo-thread 1 addf motenc.0.digital-in-read servo-thread 1 #addf classicladder.0.refresh servo-thread 1 # outputs get refreshed at the end of the thread addf motenc.0.digital-out-write servo-thread -1 # # Connect motion controller I/Os # # Connect limit/home switch outputs to motion controller. newsig Xminlim bit newsig Xmaxlim bit newsig Xhome bit linksp Xminlim <= motenc.0.in-00 linksp Xminlim => axis.0.neg-lim-sw-in linksp Xmaxlim <= motenc.0.in-01 linksp Xmaxlim => axis.0.pos-lim-sw-in linksp Xhome <= motenc.0.in-02 linksp Xhome => axis.0.home-sw-in newsig Yminlim bit newsig Ymaxlim bit newsig Yhome bit linksp Yminlim <= motenc.0.in-04 linksp Yminlim => axis.1.neg-lim-sw-in linksp Ymaxlim <= motenc.0.in-05 linksp Ymaxlim => axis.1.pos-lim-sw-in linksp Yhome <= motenc.0.in-06 linksp Yhome => axis.1.home-sw-in newsig Zminlim bit newsig Zmaxlim bit newsig Zhome bit linksp Zminlim <= motenc.0.in-08 linksp Zminlim => axis.2.neg-lim-sw-in linksp Zmaxlim <= motenc.0.in-09 linksp Zmaxlim => axis.2.pos-lim-sw-in linksp Zhome <= motenc.0.in-10 linksp Zhome => axis.2.home-sw-in # Connect amp faults to motion controller. newsig Xfault bit newsig Yfault bit newsig Zfault bit linksp Xfault <= motenc.0.in-03 linksp Xfault => axis.0.amp-fault-in linksp Yfault <= motenc.0.in-07 linksp Yfault => axis.1.amp-fault-in linksp Zfault <= motenc.0.in-11 linksp Zfault => axis.2.amp-fault-in # Connect amp enables to motion controller. linksp Xenable => motenc.0.out-08 linksp Yenable => motenc.0.out-09 linksp Zenable => motenc.0.out-10 # Connect watchdog reset to mot ion controller. #newsig WatchdogRst bit #linksp WatchdogRst <= motenc.watchdog-reset #linksp WatchdogRst => motion.watchdog-reset-out # # Connect I/O controller I/Os # # Connect e-stop write/sense to I/O controller. # # The estop from the opto module should be jumpered to one of the # motenc estop pins. This will notify the moten of the estop condition # and it will zero the DACs and turn off all output even if the PC # has crashed. # newsig EstopSense bit newsig EstopWrite bit linksp EstopSense <= motenc.0.estop-in-not #linksp EstopSense <= motenc.0.in-15 linksp EstopSense => iocontrol.0.emc-enable-in linksp EstopWrite => motenc.0.out-07 linksp EstopWrite <= iocontrol.0.user-enable-out # ESTOP loopback, only use this for a simple machine without external ESTOP # you really SHOULDN'T use a servo machine without proper ESTOP #net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in # Connect spindle fwd/rev to I/O controller. newsig SpindleFwd bit newsig SpindleRev bit linksp SpindleFwd => motenc.0.out-00 linksp SpindleFwd <= motion.spindle-forward linksp SpindleRev => motenc.0.out-01 linksp SpindleRev <= motion.spindle-reverse # Connect spindle brake to I/O controller. newsig SpindleBrakeOn bit linksp SpindleBrakeOn => motenc.0.out-02 linksp SpindleBrakeOn <= motion.spindle-brake # Connect mist/flood coolant to I/O controller. newsig MistOn bit newsig FloodOn bit linksp MistOn => motenc.0.out-05 linksp MistOn <= iocontrol.0.coolant-mist linksp FloodOn => motenc.0.out-06 linksp FloodOn <= iocontrol.0.coolant-flood # Connect lube motor run to I/O controller. newsig LubeOn bit linksp LubeOn => motenc.0.out-12 linksp LubeOn <= iocontrol.0.lube # Connect lube level to I/O controller. newsig LubeLevel bit linksp LubeLevel <= motenc.0.in-14 linksp LubeLevel => iocontrol.0.lube_level