Advertisement
Guest User

Untitled

a guest
Feb 4th, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. # Include your customized HAL commands here
  2. # The commands in this file are run after the AXIS GUI (including PyVCP panel) starts
  3. loadrt or2 count=2
  4. loadrt mux4 count=1
  5. loadrt scale count=2
  6. addf or2.0 servo-thread
  7. addf or2.1 servo-thread
  8. addf mux4.0 servo-thread
  9. addf scale.0 servo-thread
  10. addf scale.1 servo-thread
  11. addf scale.2 servo-thread
  12.  
  13. # set the jog speed for the joypad again use numbers that make sense for your machine
  14. setp mux4.0.in0 0 # this one must be 0 to prevent motion unless a button is pressed
  15. setp mux4.0.in1 150
  16. setp mux4.0.in2 500
  17. setp mux4.0.in3 1500
  18. setp scale.0.gain -1
  19. setp scale.1.gain -1
  20. setp scale.2.gain -1
  21. # the following does the magic of setting the jog speeds
  22. net remote-speed-slow or2.0.in0 input.0.btn-x
  23. net remote-speed-medium or2.1.in0 input.0.btn-y
  24. net remote-speed-fast or2.0.in1 or2.1.in1 input.0.btn-b
  25. net joy-speed-1 mux4.0.sel0 <= or2.0.out
  26. net joy-speed-2 mux4.0.sel1 <= or2.1.out
  27. net joy-speed-final halui.jog-speed <= mux4.0.out
  28.  
  29. #6. Step 6 Set up the Axis
  30. #Add the following to your postgui.hal file
  31. net reverse-x scale.0.in <= input.0.abs-x-position
  32. net jog-x halui.jog.0.analog <= scale.0.out
  33. net reverse-y scale.1.in <= input.0.abs-y-position
  34. net jog-y halui.jog.0.analog <= scale.0.out
  35. net reverse-ry scale.2.in <= input.0.abs-ry-position
  36. net jog-ry halui.jog.0.analog <= scale.1.out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement