Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 "
- setp parport.0.reset-time 5000
- loadrt stepgen step_type=0,0,0,0 ctrl_type=p,v,p,p
- loadrt charge_pump
- ###############NEW#################
- loadrt and2 count=2
- loadrt xor3 count=2
- loadrt or2 count=2
- ###################################
- net charge-pump <= charge-pump.out
- addf parport.0.read base-thread
- addf stepgen.make-pulses base-thread
- addf parport.0.write base-thread
- addf parport.0.reset base-thread
- addf charge-pump base-thread
- ###############NEW##############
- addf and2.0 servo-thread
- addf and2.1 servo-thread
- addf xor2.0 servo-thread
- addf xor2.1 servo-thread
- addf or2.0 servo-thread
- addf or2.1 servo-thread
- ###############################
- addf stepgen.capture-position servo-thread
- addf motion-command-handler servo-thread
- addf motion-controller servo-thread
- addf stepgen.update-freq servo-thread
- net estop-out <= iocontrol.0.user-enable-out
- net estop-ext <= parport.0.pin-10-in
- net estop-ext => iocontrol.0.emc-enable-in
- net charge-pump => parport.0.pin-09-out
- net xstep => parport.0.pin-02-out
- setp parport.0.pin-02-out-reset 1
- net xdir => parport.0.pin-03-out
- net zstep => parport.0.pin-04-out
- setp parport.0.pin-04-out-reset 1
- net zdir => parport.0.pin-05-out
- net astep => parport.0.pin-06-out
- setp parport.0.pin-06-out-reset 1
- net adir => parport.0.pin-07-out
- setp parport.0.pin-17-out-invert 1
- net xenable => parport.0.pin-17-out
- setp stepgen.0.position-scale [AXIS_0]SCALE
- setp stepgen.0.steplen 1
- setp stepgen.0.stepspace 0
- setp stepgen.0.dirhold 35000
- setp stepgen.0.dirsetup 35000
- 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
- addf scale.0 servo-thread
- net spindle-cmd-rpm <= motion.spindle-speed-out => scale.1.in
- setp scale.1.gain 0.01666667
- net spindle-cmd-rps <= scale.1.out => stepgen.1.velocity-cmd
- setp stepgen.1.position-scale 200
- setp stepgen.1.maxvel 5
- setp stepgen.1.maxaccel 2
- ##############NEW######################
- net spindle-step <= stepgen.1.step => and2.0.in0
- net spindle-dir <= stepgen.1.dir => and2.1.in0
- #######################################
- setp stepgen.2.position-scale [AXIS_2]SCALE
- setp stepgen.2.steplen 1
- setp stepgen.2.stepspace 0
- setp stepgen.2.dirhold 35000
- setp stepgen.2.dirsetup 35000
- 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
- setp stepgen.3.position-scale [AXIS_3]SCALE
- setp stepgen.3.steplen 1
- setp stepgen.3.stepspace 0
- setp stepgen.3.dirhold 35000
- setp stepgen.3.dirsetup 35000
- setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
- net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
- net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb
- #############NEW#####################
- net astep <= stepgen.3.step => xor2.0.in0
- net adir <= stepgen.3.dir => xor2.1.in0
- #####################################
- net aenable axis.3.amp-enable-out => stepgen.3.enable
- #######NEW LOGIC STUFF##################
- net spindle_on <= motion.spindle-on => stepgen.1.enable and2.0.in1 and2.1.in1 xor2.0.in1 xor2.1.in1
- net masked-spindle-step and2.0.out => or2.0.in0
- net masked-spindle-dir and2.1.out => or2.1.in0
- net masked-astep xor2.0.out => or2.0in1
- net masked-adir xor2.1.out => or2.1.in1
- net chosen-step or2.0.out => parport.0.pin-14-out
- net chosen-dir or2.1.out => parport.0.pin-16-out
- ###########################################
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement