Mercurial > lasercutter
view graster/hacklab-engraver/hacklab-engraver3.hal @ 19:3b255dcd6c50
getting closer
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 30 Aug 2010 00:09:06 -0400 |
parents | f952052e37b7 |
children |
line wrap: on
line source
1 # Generated by stepconf at Sun Mar 8 21:32:59 20092 # If you make changes to this file, they will be3 # overwritten when you run stepconf again5 loadrt threads name1=mask-thread period1=1000007 loadrt trivkins8 loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]SERVO_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[TRAJ]AXES9 loadrt probe_parport10 loadrt hal_parport cfg=0x37811 setp parport.0.reset-time 10000012 loadrt stepgen step_type=0,0,0,013 loadrt charge_pump16 # Boring components that emc makes me load explicitly because it is a cunt17 loadrt comp names=comp-mask-lte,comp-discrete-z18 loadrt not names=not-mask-ffw,not-mask-not-empty19 loadrt xor2 names=xor2-mask-test20 loadrt and2 names=and2-mask-forward,and2-laser-mask,and2-laser-final21 loadrt or2 names=or2-mask-command-done,or2-mask-not-ffw,or2-mask-read,or2-laser-gcode,or2-laser-fine24 # Fast thread for generating signals25 addf parport.0.read base-thread26 addf stepgen.make-pulses base-thread27 addf parport.0.write base-thread28 addf parport.0.reset base-thread29 addf charge-pump base-thread31 # Slow thread for logic (more logic components are added further down)32 addf stepgen.capture-position servo-thread33 addf motion-command-handler servo-thread34 addf motion-controller servo-thread35 addf stepgen.update-freq servo-thread38 ###################################################################################39 # Raster Mask - stream in laser on/off commands behind AXIS's back40 # Input stream format: reset beam xop xarg41 # reset: 0=mask command 1=reset (begin mask sequence with "1 0 0 0", every other command starts with 0)42 # beam: 0=off 1=on43 # xop: X axis comparison operation 0=less-or-equal 1=greater44 # xarg: X axis comparison operand46 loadrt streamer depth=256 cfg="bbbf"47 net mask-reset <= streamer.0.pin.048 net mask-beam <= streamer.0.pin.149 net mask-xop <= streamer.0.pin.250 net mask-xarg <= streamer.0.pin.351 net mask-empty <= streamer.0.empty52 net mask-read => streamer.0.enable54 # hardware reported X axis position55 net motion-xpos-fb <= axis.0.joint-pos-fb57 # mask-lte <= motion-xpos-fb < mask-xarg58 addf comp-mask-lte mask-thread59 net motion-xpos-fb => comp-mask-lte.in060 net mask-xarg => comp-mask-lte.in161 net mask-lte <= comp-mask-lte.out63 # mask-test <= mask-xop ^ mask-lte64 addf xor2-mask-test mask-thread65 net mask-xop => xor2-mask-test.in066 net mask-lte => xor2-mask-test.in167 net mask-test <= xor2-mask-test.out69 # if job is running, read only if test is true or reset70 # if job is not running, read until reset71 # mask-read <= (laser-coarse && (mask-test || mask-reset)) || !(laser-coarse || mask-reset)73 addf or2-mask-command-done mask-thread74 net mask-test => or2-mask-command-done.in075 net mask-reset => or2-mask-command-done.in176 net mask-command-done <= or2-mask-command-done.out78 addf and2-mask-forward mask-thread79 net laser-coarse => and2-mask-forward.in080 net mask-command-done => and2-mask-forward.in181 net mask-forward <= and2-mask-forward.out83 addf or2-mask-not-ffw mask-thread84 net laser-coarse => or2-mask-not-ffw.in085 net mask-reset => or2-mask-not-ffw.in186 net mask-not-ffw <= or2-mask-not-ffw.out88 addf not-mask-ffw mask-thread89 net mask-not-ffw => not-mask-ffw.in90 net mask-ffw <= not-mask-ffw.out92 addf or2-mask-read mask-thread93 net mask-forward => or2-mask-read.in094 net mask-ffw => or2-mask-read.in195 net mask-read <= or2-mask-read.out97 # laser-mask <= mask-not-empty && mask-beam98 addf not-mask-not-empty mask-thread99 net mask-empty => not-mask-not-empty.in100 net mask-not-empty <= not-mask-not-empty.out102 addf and2-laser-mask mask-thread103 net mask-beam => and2-laser-mask.in0104 net mask-not-empty => and2-laser-mask.in1105 net laser-mask <= and2-laser-mask.out107 addf streamer.0 mask-thread109 # Raster Mask - end110 #######################################################################112 # coarse laser control, wired to spindle on/off (M3/M5), not realtime113 net laser-coarse <= motion.spindle-on115 # fine laser control, wired to digital output 0 (M62 P0/M63 P0), realtime116 net laser-gate <= motion.digital-out-00118 # legacy laser control, wired to Z < 0, can be used instead of M62/M63119 addf comp-discrete-z servo-thread120 net motion-zpos-fb <= axis.2.joint-pos-fb121 net motion-zpos-fb => comp-discrete-z.in0122 setp comp-discrete-z.in1 0123 net discrete-z <= comp-discrete-z.out125 # laser-final <= laser-coarse & (laser-gate | discrete-z | laser-mask)126 addf or2-laser-gcode mask-thread127 net laser-gate => or2-laser-gcode.in0128 net discrete-z => or2-laser-gcode.in1129 net laser-gcode <= or2-laser-gcode.out131 addf or2-laser-fine mask-thread132 net laser-gcode => or2-laser-fine.in0133 net laser-mask => or2-laser-fine.in1134 net laser-fine <= or2-laser-fine.out136 addf and2-laser-final mask-thread137 net laser-fine => and2-laser-final.in0138 net laser-coarse => and2-laser-final.in1139 net laser-final <= and2-laser-final.out141 # laser-final => hardware142 net laser-final => parport.0.pin-01-out144 # make Z and W axes always homed145 #setp axis.2.homed 1 # Z146 #setp axis.8.homed 1 # W148 net xdir => parport.0.pin-02-out149 net xstep => parport.0.pin-03-out150 setp parport.0.pin-03-out-reset 1151 net ydir => parport.0.pin-04-out152 net ystep => parport.0.pin-05-out153 setp parport.0.pin-05-out-reset 1154 net wdir => parport.0.pin-06-out155 net wstep => parport.0.pin-07-out156 setp parport.0.pin-07-out-reset 1158 # invert ydir159 #setp parport.0.pin-04-out-invert 1162 net xenable => parport.0.pin-14-out164 net home-x <= parport.0.pin-10-in165 net home-y <= parport.0.pin-12-in166 net estop-ext <= parport.0.pin-15-in168 setp stepgen.0.position-scale [AXIS_0]SCALE169 setp stepgen.0.steplen 15200170 setp stepgen.0.stepspace 15200171 setp stepgen.0.dirhold 15200172 setp stepgen.0.dirsetup 15200173 setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL174 net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd175 net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb176 net xstep <= stepgen.0.step177 net xdir <= stepgen.0.dir178 net xenable axis.0.amp-enable-out => stepgen.0.enable179 net home-x => axis.0.home-sw-in181 setp stepgen.1.position-scale [AXIS_1]SCALE182 setp stepgen.1.steplen 15200183 setp stepgen.1.stepspace 15200184 setp stepgen.1.dirhold 15200185 setp stepgen.1.dirsetup 15200186 setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL187 net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd188 net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb189 net ystep <= stepgen.1.step190 net ydir <= stepgen.1.dir191 net yenable axis.1.amp-enable-out => stepgen.1.enable192 net home-y => axis.1.home-sw-in194 setp stepgen.2.position-scale [AXIS_2]SCALE195 setp stepgen.2.steplen 1196 setp stepgen.2.stepspace 0197 setp stepgen.2.dirhold 15200198 setp stepgen.2.dirsetup 15200199 setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL200 net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd201 net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb202 net zstep <= stepgen.2.step203 net zdir <= stepgen.2.dir204 net zenable axis.2.amp-enable-out => stepgen.2.enable205 net home-z => axis.2.home-sw-in207 setp stepgen.3.position-scale [AXIS_8]SCALE208 setp stepgen.3.steplen 1209 setp stepgen.3.stepspace 0210 setp stepgen.3.dirhold 15200211 setp stepgen.3.dirsetup 15200212 setp stepgen.3.maxaccel [AXIS_8]STEPGEN_MAXACCEL213 net wpos-cmd axis.8.motor-pos-cmd => stepgen.3.position-cmd214 net wpos-fb stepgen.3.position-fb => axis.8.motor-pos-fb215 net wstep <= stepgen.3.step216 net wdir <= stepgen.3.dir217 net wenable axis.8.amp-enable-out => stepgen.3.enable218 net home-w => axis.8.home-sw-in220 net estop-out <= iocontrol.0.user-enable-out221 net estop-ext => iocontrol.0.emc-enable-in223 loadusr -W hal_manualtoolchange224 net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change225 net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed226 net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number227 net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared229 # connect the charge pump signal to an output230 net charge-pump <= charge-pump.out231 setp parport.0.pin-17-out-reset 1232 net charge-pump => parport.0.pin-17-out233 setp charge-pump.enable 1