Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Include your customized HAL commands here
- # The commands in this file are run after the AXIS GUI (including PyVCP panel) starts
- loadrt or2 count=2
- loadrt mux4 count=1
- loadrt scale count=2
- addf or2.0 servo-thread
- addf or2.1 servo-thread
- addf mux4.0 servo-thread
- addf scale.0 servo-thread
- addf scale.1 servo-thread
- # set the jog speed for the joypad again use numbers that make sense for your machine
- setp mux4.0.in0 0 # this one must be 0 to prevent motion unless a button is pressed
- setp mux4.0.in1 150
- setp mux4.0.in2 500
- setp mux4.0.in3 1500
- setp scale.0.gain -1
- setp scale.1.gain -1
- # the following does the magic of setting the jog speeds
- net remote-speed-slow or2.0.in0 input.0.btn-x
- net remote-speed-medium or2.1.in0 input.0.btn-y
- net remote-speed-fast or2.0.in1 or2.1.in1 input.0.btn-b
- net joy-speed-1 mux4.0.sel0 <= or2.0.out
- net joy-speed-2 mux4.0.sel1 <= or2.1.out
- net joy-speed-final halui.jog-speed <= mux4.0.out
- #6. Step 6 Set up the Axis
- #Add the following to your postgui.hal file
- net reverse-x scale.0.in <= input.0.abs-x-position
- net jog-x halui.jog.0.analog <= scale.0.out
- net reverse-y scale.0.in <= input.0.abs-y-position
- net jog-y halui.jog.0.analog <= scale.0.out
- net reverse-ry scale.1.in <= input.0.abs-ry-position
- net jog-ry halui.jog.0.analog <= scale.1.out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement