Advertisement
floppydisk

gearchange question

Jan 21st, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1.  
  2. I'm trying to implement the gearchange hal component with the gs2 component to change the gearing and direction when I change gears on my supermax knee mill. I have hal files setup and I created 2 pyvcp toggle (checkboxes) buttons to toggle the gearchange select pin and the gearchange direction input pin:
  3.  
  4. net gearchange-select gearchange.0.sel
  5. net gearchange-select pyvcp.gchange-chkbtn
  6.  
  7. net gearchange-dir => gearchange.0.dir-in
  8. net gearchange-dir <= pyvcp.gch-dir-chkbtn
  9.  
  10. Also, I set the gearchange reverse to true (1):
  11. setp gearchange.0.reverse 1 #reverse direction in 2nd gear.
  12.  
  13. My question - is the gearchange reverse automatically 'done for me?' I guess I need some sort of hal network (like an or or mux) to change the following directions based on the gearchange.0.dir-out pin??:
  14. net gs2-fwd spindle-vfd.spindle-fwd <= motion.spindle-forward
  15. net gs2-rev spindle-vfd.spindle-rev <= motion.spindle-reverse
  16.  
  17. I've posted an abridged hal file here: http://pastebin.com/Qtb3AJMm
  18. Pictures of the pyvcp buttons: http://imgur.com/gallery/evN9K/
  19.  
  20. Links:
  21. http://linuxcnc.org/docs/html/man/man9/gearchange.9.html
  22. http://linuxcnc.org/docs/html/man/man9/motion.9.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement