Spindle Setup Encoder on motor gear change

More
26 May 2011 19:07 #10096 by fabworx
im having problems figuring out how to write the hal for my spindle set up. my encoder is mounted to the motor. i have a 2 speed spindle so i need two scales for the rpm and i need a button in axis so i can tell emc which scale to use preferably a button or check box to select between hi and low gears. right now im usindg a pid loop and i dont need to, nor want to. also i only have it setup for one scale, hi gear. i have looked in the git sample configs and cant find anything close enough to my set up, everything i have found the encoder is mounted to the spindle and they are scaling the pmw not the encoder. thanx in advance.

Please Log in or Create an account to join the conversation.

More
26 May 2011 19:17 #10099 by andypugh
You probably want this component:
www.linuxcnc.org/docview/html/man/man9/gearchange.9.html

There is a sample file (for a Tormach) here:
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...5f9002afbc9f82cf9d9a
(Line 49 is where the gearchange HAL starts)

Please Log in or Create an account to join the conversation.

More
26 May 2011 19:29 #10100 by fabworx
thanx andy that helps. how does one add a couple check boxes to axis, preferably under the spindle section for high or low gear. cause as of right now the machine has no way of knowing which gear it is in.

Please Log in or Create an account to join the conversation.

More
26 May 2011 20:11 - 26 May 2011 20:31 #10101 by andypugh
Adding buttons to the left-side pane is not very easy (only possibly by editing the Axis source code).
You can add buttons etc to the right with pyvcp:
linuxcnc.org/docs/html/hal_pyvcp.html
(it probably makes sense to have a spindle speed readout too, just to fill up the space a bit)
Last edit: 26 May 2011 20:31 by andypugh.

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum