Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ***7i76.hal
- loadrt trivkins
- loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
- loadrt hostmot2
- loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
- setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 10000000
- addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
- addf motion-command-handler servo-thread
- addf motion-controller servo-thread
- addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
- addf hm2_[HOSTMOT2](BOARD).0.pet_watchdog servo-thread
- # X [0] Axis
- net emcmot.00.enable axis.0.amp-enable-out hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable hm2_5i25.0.7i76.0.0.output-02
- net emcmot.00.pos-cmd axis.0.motor-pos-cmd hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-cmd
- net motor.00.pos-fb hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb axis.0.motor-pos-fb
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirhold [AXIS_0]DIRHOLD
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.steplen [AXIS_0]STEPLEN
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.stepspace [AXIS_0]STEPSPACE
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-scale [AXIS_0]SCALE
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAX_VEL
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAX_ACC
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
- setp axis.0.jog-vel-mode 1
- # Y [1] Axis
- net emcmot.01.enable axis.1.amp-enable-out hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable hm2_5i25.0.7i76.0.0.output-05
- net emcmot.01.pos-cmd axis.1.motor-pos-cmd hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-cmd
- net motor.01.pos-fb hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb axis.1.motor-pos-fb
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirhold [AXIS_1]DIRHOLD
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.steplen [AXIS_1]STEPLEN
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.stepspace [AXIS_1]STEPSPACE
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-scale [AXIS_1]SCALE
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAX_ACC
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
- setp axis.1.jog-vel-mode 1
- # Z [2] Axis
- net emcmot.02.enable axis.2.amp-enable-out hm2_[HOSTMOT2](BOARD).0.stepgen.02.enable hm2_5i25.0.7i76.0.0.output-08
- net emcmot.02.pos-cmd axis.2.motor-pos-cmd hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd
- net motor.02.pos-fb hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb axis.2.motor-pos-fb
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirsetup [AXIS_2]DIRSETUP
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirhold [AXIS_2]DIRHOLD
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.steplen [AXIS_2]STEPLEN
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.stepspace [AXIS_2]STEPSPACE
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-scale [AXIS_2]SCALE
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxvel [AXIS_2]STEPGEN_MAX_VEL
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxaccel [AXIS_2]STEPGEN_MAX_ACC
- setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.step_type 0
- setp axis.2.jog-vel-mode 1
- #connect prox switches to limit and home inputs
- net Xprox hm2_5i25.0.7i76.0.0.input-08 axis.0.pos-lim-sw-in axis.0.neg-lim-sw-in axis.0.home-sw-in
- net Yprox hm2_5i25.0.7i76.0.0.input-09 axis.1.pos-lim-sw-in axis.1.neg-lim-sw-in axis.1.home-sw-in
- net Zprox hm2_5i25.0.7i76.0.0.input-10 axis.2.pos-lim-sw-in axis.2.neg-lim-sw-in axis.2.home-sw-in
- # Spindle Control
- net Sfwd motion.spindle-forward hm2_5i25.0.7i76.0.0.output-00
- setp hm2_5i25.0.7i76.0.0.spinout-minlim 0
- setp hm2_5i25.0.7i76.0.0.spinout-maxlim 20000
- setp hm2_5i25.0.7i76.0.0.spinout-scalemax 20000
- net Scmd motion.spindle-speed-out hm2_5i25.0.7i76.0.0.spinout
- # Safety Relay Monitoring Contacts
- net estop-enable hm2_5i25.0.7i76.0.0.input-00 iocontrol.0.emc-enable-in hm2_5i25.0.7i76.0.0.spinena
- net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
- net tool-change-loop iocontrol.0.tool-change => iocontrol.0.tool-changed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement