# Generated by stepconf at Sun Jun 12 11:27:51 2011 # If you make changes to this file, they will be # overwritten when you run stepconf again # COMMENT THE RESETS loadrt trivkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES loadrt probe_parport #loadrt hal_parport cfg=" 0x378 out " #loadrt hal_parport cfg="0x378 out 0x1008 in " loadrt hal_parport cfg="0x1018 out 0x1008 in " setp parport.0.reset-time 1000 loadrt stepgen step_type=0,0,0 loadrt charge_pump # net estop-out charge-pump.enable iocontrol.0.user-enable-out net charge-pump <= charge-pump.out loadrt pwmgen output_type=0 loadrt classicladder_rt numPhysInputs=15 numPhysOutputs=15 numS32in=10 numS32out=10 numFloatIn=10 numFloatOut=10 addf parport.0.read base-thread addf parport.1.read base-thread addf stepgen.make-pulses base-thread addf charge-pump base-thread addf pwmgen.make-pulses base-thread addf parport.0.write base-thread addf parport.1.write base-thread addf stepgen.capture-position servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf classicladder.0.refresh servo-thread addf stepgen.update-freq servo-thread addf pwmgen.update servo-thread # Let's pick up a signal to turn on the lube pump # Original code work by Matt Schaver # Add a comparator component loadrt comp count=1 # set the hysteresis to a small value to # allow for very slow movements before turning on the pump setp comp.0.hyst .01 # The first input to the comparator is zero. setp comp.0.in0 0.0 # The other input to the comparator is the # current axis movement velocity net moving comp.0.in1 motion.current-vel # This signal is the output. It needs to be connected # to an output bit setp parport.1.pin-16-out-invert 1 net pump comp.0.equal => parport.1.pin-16-out # We need to run the comparator periodically addf comp.0 servo-thread net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value net spindle-enable <= motion.spindle-on => pwmgen.0.enable net spindle-pwm <= pwmgen.0.pwm setp pwmgen.0.pwm-freq 100.0 setp pwmgen.0.scale 1166.66666667 setp pwmgen.0.offset 0.114285714286 setp pwmgen.0.dither-pwm true net coolant-mist <= iocontrol.0.coolant-mist net coolant-flood <= iocontrol.0.coolant-flood net coolant-mist => parport.1.pin-01-out # net coolant-mist => parport.0.pin-01-out net xdir => parport.0.pin-02-out setp parport.0.pin-02-out-reset 1 net xstep => parport.0.pin-03-out net ydir => parport.0.pin-04-out setp parport.0.pin-04-out-reset 1 net ystep => parport.0.pin-05-out net zdir => parport.0.pin-06-out setp parport.0.pin-06-out-reset 1 net zstep => parport.0.pin-07-out net adir => parport.0.pin-08-out setp parport.0.pin-08-out-reset 1 net astep => parport.0.pin-09-out setp parport.1.pin-14-out 1 net coolant-flood => parport.1.pin-14-out setp parport.0.pin-16-out-invert 1 net spindle-pwm => parport.0.pin-16-out setp parport.0.pin-17-out-invert 1 net charge-pump => parport.0.pin-17-out net estop-ext <= parport.0.pin-10-in-not setp stepgen.0.position-scale [AXIS_0]SCALE setp stepgen.0.steplen 1 setp stepgen.0.stepspace 0 setp stepgen.0.dirhold 11200 setp stepgen.0.dirsetup 11200 setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb net xstep <= stepgen.0.step net xdir <= stepgen.0.dir net xenable axis.0.amp-enable-out => stepgen.0.enable setp stepgen.1.position-scale [AXIS_1]SCALE setp stepgen.1.steplen 1 setp stepgen.1.stepspace 0 setp stepgen.1.dirhold 11200 setp stepgen.1.dirsetup 11200 setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb net ystep <= stepgen.1.step net ydir <= stepgen.1.dir net yenable axis.1.amp-enable-out => stepgen.1.enable setp stepgen.2.position-scale [AXIS_2]SCALE setp stepgen.2.steplen 1 setp stepgen.2.stepspace 0 setp stepgen.2.dirhold 11200 setp stepgen.2.dirsetup 11200 setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb net zstep <= stepgen.2.step net zdir <= stepgen.2.dir net zenable axis.2.amp-enable-out => stepgen.2.enable #net estop-out <= iocontrol.0.user-enable-out #net estop-ext => iocontrol.0.emc-enable-in #Andy Pugh's replacement code net e-stop iocontrol.0.user-enable-out <=> iocontrol.0.emc-enable-in #limit switches code by matt #net lim1 axis.0.neg-lim-sw-in parport.1.pin-10-in #net lim1 axis.0.pos-lim-sw-in parport.1.pin-10-in #net lim1 axis.1.neg-lim-sw-in parport.1.pin-11-in #net lim1 axis.1.pos-lim-sw-in parport.1.pin-11-in #home & limit switches from stepconf net both-home-x <= parport.0.pin-11-in # net both-home-y <= parport.0.pin-12-in # net min-z <= parport.0.pin-13-in # net max-home-z <= parport.0.pin-15-in loadusr -W hal_manualtoolchange net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared # Load Classicladder without GUI (can reload LADDER GUI in AXIS GUI loadusr classicladder --nogui custom.clp