Chris Radek wrote: > On Wed, Apr 11, 2007 at 09:00:20PM -0600, d06 wrote: >> My machine uses stepgen (type > 1), and a parallel port. >> I would like to stop driving them (zero the port) when EMC exits. >> >> >> I found a reference to [HAL]SHUTDOWN ... >> I must have seen this on one of the IRC archives, however it is not in >> any of these files: >> EMC2_Developer_Manual.pdf >> EMC2_Integrator_Manual.pdf >> EMC2_User_Manual.pdf >> HAL_Documentation.pdf >> HAL_User_Manual.pdf > > Hi d06, we talked about this briefly on IRC and several ideas came to > mind. > > Hook axis.N.amp-enable-out to a pin and do the disabling in hardware > (I use this to turn my choppers on/off). But if you have 3 motors > and are doing winding activation, you've used all 12 outputs on your > port so this isn't going to work. > > Use "and2" blocks to gate the stepgen outputs to the parallel port > with axis.N.amp-enable-out as the gate signal. This is a little messy > but has the advantage of allowing you to turn the outputs on and off > while EMC is running (using estop and machine on/off). I don't know > whether you want that or not. > > Lastly I looked and found that we do have [HAL]SHUTDOWN support like > you found in the archives. I think it was put in to solve someone's > problem and promptly forgotten. It obviously didn't make it into the > docs; thanks for checking that and letting us know so we can fix it. > > In your shutdown hal file you'll just need something like > > unlinkp parport.0.pin-XX-out > setp parport.0.pin-XX-out 0 > > for each pin. >
I tried both this: [HAL] HALFILE = stepper_core.hal HALFILE = stepper_pinout.hal SHUTDOWN = stepper_shutdown.hal and this: [HAL] HALFILE = stepper_core.hal HALFILE = stepper_pinout.hal HALSHUTDOWN = stepper_shutdown.hal Accoring to emc stepper_shutdown.hal never runs... $ emc -v stepper_inch.ini Verbose mode on RUN_IN_PLACE=no EMC2_DIR= EMC2_BIN_DIR=/usr/bin EMC2_TCL_DIR=/usr/share/emc/tcl EMC2_SCRIPT_DIR= EMC2_RTLIB_DIR=/usr/realtime-2.6.15-magma/modules/emc2 EMC2_CONFIG_DIR= EMC2_LANG_DIR=/usr/share/emc/tcl/msgs INIVAR=/usr/bin/inivar HALCMD=/usr/bin/halcmd EMC2_EMCSH=/usr/bin/emcsh EMC2_IOSH=/usr/bin/iosh EMC2 - 2.1.0 Machine configuration directory is '/home/ubuntu/tmp4' Machine configuration file is 'stepper_inch.ini' INIFILE=/home/ubuntu/tmp4/stepper_inch.ini PARAMETER_FILE=stepper.var EMCMOT=motmod EMCIO=io TASK=milltask HALUI= DISPLAY=tkemc NML_FILE=emc.nml Starting EMC2... Starting EMC2 server program: emcsvr Loading Real Time OS, RTAPI, and HAL_LIB modules Starting EMC2 IO program: io Running HAL config file /home/ubuntu/tmp4/stepper_core.hal Running HAL config file /home/ubuntu/tmp4/stepper_pinout.hal Starting EMC2 TASK program: milltask Starting EMC2 DISPLAY program: tkemc Shutting down and cleaning up EMC2... Killing task emcsvr, PID=6321 Killing task milltask, PID=6381 Removing HAL_LIB, RTAPI, and Real Time OS modules Cleanup done What version of emc recognizes [HAL]SHUTDOWN ? ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Emc-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/emc-users
