increases / decreases spindle speed

More
10 years 1 month ago #80844 by dinkata
Configuration 5i25 + 7i77. The turnover of the spindle is adjusted by +/- 10V.
I want to use with external buttons:
halui.spindle.increase (bit, in) - increases spindle speed
halui.spindle.decrease (bit, in) - decreases spindle speed
in hal:
Code:
# --- SPNINCR --- net Spnincr <= hm2_5i25.0.gpio.026.in_not => halui.spindle.increase # --- SPNDECR --- net Spndecr <= hm2_5i25.0.gpio.027.in_not => halui.spindle.decrease
but change fixed at 100 rev / min, for example : I have
M3 S200 , increase adds 100 to each press button , and I want 20 or 50.
How to set up a step change from 100 to 50 or 20 or 30 ?

Please Log in to join the conversation.

More
10 years 1 month ago #80861 by BigJohnT
What version of LinuxCNC are you using?

JT

Please Log in to join the conversation.

More
10 years 1 month ago #80864 by cmorley
It is not configurable - other then changing the source code.

from command.c:
Code:
case EMCMOT_SPINDLE_INCREASE: rtapi_print_msg(RTAPI_MSG_DBG, "SPINDLE_INCREASE"); if (emcmotStatus->spindle.speed > 0) { emcmotStatus->spindle.speed += 100; //FIXME - make the step a HAL parameter } else if (emcmotStatus->spindle.speed < 0) { emcmotStatus->spindle.speed -= 100; } break; case EMCMOT_SPINDLE_DECREASE: rtapi_print_msg(RTAPI_MSG_DBG, "SPINDLE_DECREASE"); if (emcmotStatus->spindle.speed > 100) { emcmotStatus->spindle.speed -= 100; //FIXME - make the step a HAL parameter } else if (emcmotStatus->spindle.speed < -100) { emcmotStatus->spindle.speed += 100; } break;

Chris M

Please Log in to join the conversation.

More
10 years 1 month ago #80875 by dinkata

BigJohnT wrote: What version of LinuxCNC are you using?

LinuxCNC 2.7.7
DISPLAY=gmoccapy

Please Log in to join the conversation.

More
10 years 1 month ago #80876 by dinkata
Chris M wrote :

from command.c:

Where is this ?
How to edit ?

Please Log in to join the conversation.

More
10 years 1 month ago #80880 by cmorley
src/emc/motion/command.c

Most users don't compile the source code, they use the binaries.
You would need to get the source code, change the code and recompile.

this is an old explanation of how to build from source:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Instal..._or_8_04_from_source
hopefully someone else could suggest a more current guide.

Chris M

Please Log in to join the conversation.

More
10 years 1 month ago #80881 by dinkata

src/emc/motion/command.c

I have installed
www.linuxcnc.org/linuxcnc-2.7-wheezy.iso
Can I do something there ?

Please Log in to join the conversation.

More
10 years 1 month ago #80891 by dinkata
Am I wrong or is it a bug .
I use button halui.spindle-override.increase , halui.spindle-override.decrease
Spindle speed blink

Please Log in to join the conversation.

More
10 years 1 month ago #80924 by pippin88

cmorley wrote: It is not configurable - other then changing the source code.

from command.c:

Code:
case EMCMOT_SPINDLE_INCREASE: rtapi_print_msg(RTAPI_MSG_DBG, "SPINDLE_INCREASE"); if (emcmotStatus->spindle.speed > 0) { emcmotStatus->spindle.speed += 100; //FIXME - make the step a HAL parameter } else if (emcmotStatus->spindle.speed < 0) { emcmotStatus->spindle.speed -= 100; } break; case EMCMOT_SPINDLE_DECREASE: rtapi_print_msg(RTAPI_MSG_DBG, "SPINDLE_DECREASE"); if (emcmotStatus->spindle.speed > 100) { emcmotStatus->spindle.speed -= 100; //FIXME - make the step a HAL parameter } else if (emcmotStatus->spindle.speed < -100) { emcmotStatus->spindle.speed += 100; } break;

Chris M


Could spindle-override be used, which has a scale property?
Code:
# Spindle override #mux allows us to choose between the two values. mux2.n.out defaults to .in0 if mux2.n.sel is not called setp mux2.0.in0 0.1 setp mux2.0.in1 0.05 net spinshift mux2.0.sel <= hm2_7i43.0.7i76.0.0.input-02 #shift white net spinoverride halui.spindle-override.scale <= mux2.0.out net spinup <= hm2_7i43.0.7i76.0.0.input-00 #up orange net spindown <= hm2_7i43.0.7i76.0.0.input-01 #down blue net spinup => halui.spindle-override.increase net spindown => halui.spindle-override.decrease

I'm having issues with this at present in gmoccapy, but works in axis.

Please Log in to join the conversation.

Time to create page: 0.174 seconds
Powered by Kunena Forum