increases / decreases spindle speed
- dinkata
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 101
- Thank you received: 1
			
	
						24 Sep 2016 05:15				#80844
		by dinkata
	
	
		
			
	
			
			 		
													
	
				increases /  decreases spindle speed was created 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: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 ?
					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:
# --- 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.decreaseM3 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 or Create an account to join the conversation.
- BigJohnT
- 
				  
- Offline
- Administrator
- 
				  
		Less
		More
		
			
	
		- Posts: 3990
- Thank you received: 994
			
	
						24 Sep 2016 18:26				#80861
		by BigJohnT
	
	
		
			
	
			
			 		
													
	
				Replied by BigJohnT on topic increases /  decreases spindle speed			
			
				What version of LinuxCNC are you using?
JT
					JT
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 7230
- Thank you received: 2106
			
	
						24 Sep 2016 19:02				#80864
		by cmorley
	
	
		
			
	
	
			 		
													
	
				Replied by cmorley on topic increases /  decreases spindle speed			
			
				It is not configurable - other then changing the source code.
from command.c:
Chris M
					from command.c:
	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
		The following user(s) said Thank You: dinkata 	
			Please Log in or Create an account to join the conversation.
- dinkata
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 101
- Thank you received: 1
			
	
						25 Sep 2016 05:20				#80875
		by dinkata
	
	
		
			
				
DISPLAY=gmoccapy
					
	
			
			 		
													
	
				Replied by dinkata on topic increases /  decreases spindle speed			
			LinuxCNC 2.7.7What version of LinuxCNC are you using?
DISPLAY=gmoccapy
Please Log in or Create an account to join the conversation.
- dinkata
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 101
- Thank you received: 1
			
	
						25 Sep 2016 05:25				#80876
		by dinkata
	
	
		
			
	
			
			 		
													
	
				Replied by dinkata on topic increases /  decreases spindle speed			
			
				Chris M wrote :
How to edit ?
					Where is this ?from command.c:
How to edit ?
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 7230
- Thank you received: 2106
			
	
						25 Sep 2016 07:41				#80880
		by cmorley
	
	
		
			
	
			
			 		
													
	
				Replied by cmorley on topic increases /  decreases spindle speed			
			
				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
					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 or Create an account to join the conversation.
- dinkata
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 101
- Thank you received: 1
			
	
						25 Sep 2016 07:54				#80881
		by dinkata
	
	
		
			
				
www.linuxcnc.org/linuxcnc-2.7-wheezy.iso
Can I do something there ?
					
	
			
			 		
													
	
				Replied by dinkata on topic increases /  decreases spindle speed			
			I have installedsrc/emc/motion/command.c
www.linuxcnc.org/linuxcnc-2.7-wheezy.iso
Can I do something there ?
Please Log in or Create an account to join the conversation.
- dinkata
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 101
- Thank you received: 1
			
	
						25 Sep 2016 10:07		 -  25 Sep 2016 10:24		#80891
		by dinkata
	
	
		
			
	
	
			 		
													
	
				Replied by dinkata on topic increases /  decreases spindle speed			
			
				Am I wrong or is it a bug .
I use button halui.spindle-override.increase , halui.spindle-override.decrease
Spindle speed blink
			
					I use button halui.spindle-override.increase , halui.spindle-override.decrease
Spindle speed blink
		Last edit: 25 Sep 2016 10:24  by dinkata.			
			Please Log in or Create an account to join the conversation.
- pippin88
- Offline
- Elite Member
- 
				  
		Less
		More
		
			
	
		- Posts: 259
- Thank you received: 50
			
	
						26 Sep 2016 09:29		 -  26 Sep 2016 09:30		#80924
		by pippin88
	
	
		
			
				
Could spindle-override be used, which has a scale property?
I'm having issues with this at present in gmoccapy, but works in axis.
					
	
	
			 		
													
	
				Replied by pippin88 on topic increases /  decreases spindle speed			
			It is not configurable - other then changing the source code.
from command.c:
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?
# 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.decreaseI'm having issues with this at present in gmoccapy, but works in axis.
		Last edit: 26 Sep 2016 09:30  by pippin88.			
			Please Log in or Create an account to join the conversation.
		Moderators: newbynobi, HansU	
		Time to create page: 0.085 seconds	
