Spindle reverse speed using parallel breakout board
- frayja2002
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 153
- Thank you received: 12
			
	
						05 Sep 2021 10:32				#219661
		by frayja2002
	
	
		
			
	
	
			
			 		
													
	
				Spindle reverse speed using parallel breakout board was created by frayja2002			
			
				Hi all
I am using a parallel port breakout board with linuxcnc using pwm on pin 1 to drive the vfd for the spindle.
When I tell it to turn on in the forward direction everything seems to work as expected. Pin 1 reads about 2.5v & the spindle run at about 50% of speed as expected.
If I then stop it & try to run it in reverse the spindle turns on in reverse but only runs at about 25% of speed (instead of the commanded 50%)
When I measure the voltage it is correspondingly lower.
This would seem to be something to do with the software rather than the hardware.
Does anyone have any ideas where to start?
Attached are some photos of my setup & components.
 			
					I am using a parallel port breakout board with linuxcnc using pwm on pin 1 to drive the vfd for the spindle.
When I tell it to turn on in the forward direction everything seems to work as expected. Pin 1 reads about 2.5v & the spindle run at about 50% of speed as expected.
If I then stop it & try to run it in reverse the spindle turns on in reverse but only runs at about 25% of speed (instead of the commanded 50%)
When I measure the voltage it is correspondingly lower.
This would seem to be something to do with the software rather than the hardware.
Does anyone have any ideas where to start?
Attached are some photos of my setup & components.
Please Log in or Create an account to join the conversation.
- frayja2002
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 153
- Thank you received: 12
			
	
						06 Sep 2021 22:48				#219800
		by frayja2002
	
	
		
			
	
			
			 		
													
	
				Replied by frayja2002 on topic Spindle reverse speed using parallel breakout board			
			
				Has no-one had this problem, or is it something I'm missing?
I should pint out that I am using the latest development version of linuxcnc
I have tried a different type of parallel BOB (& other user interfaces) and the it still seems to be the same.
Can anyone else verify what I am saying? Is this normal behaviour?
Thanks
					I should pint out that I am using the latest development version of linuxcnc
I have tried a different type of parallel BOB (& other user interfaces) and the it still seems to be the same.
Can anyone else verify what I am saying? Is this normal behaviour?
Thanks
Please Log in or Create an account to join the conversation.
- tommylight
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 20843
- Thank you received: 7106
			
	
						06 Sep 2021 23:51				#219804
		by tommylight
	
	
		
			
	
			
			 		
													
	
				Replied by tommylight on topic Spindle reverse speed using parallel breakout board			
			
				Might not like it but get rid of the BOB, use a 100 ohm resistor on pin 1 and test .			
					Please Log in or Create an account to join the conversation.
- frayja2002
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 153
- Thank you received: 12
			
	
						07 Sep 2021 01:25				#219807
		by frayja2002
	
	
		
			
	
	
			
			 		
													
	
				Replied by frayja2002 on topic Spindle reverse speed using parallel breakout board			
			
				I have tried what you suggested. 
I used a 200 ohm resistor between pin 1 & ground & measured the voltage across the resistor.
The results still look the same. A higher voltage in the forward direction than the reverse.
Please see attached photos.
 			
					I used a 200 ohm resistor between pin 1 & ground & measured the voltage across the resistor.
The results still look the same. A higher voltage in the forward direction than the reverse.
Please see attached photos.
Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17371
- Thank you received: 5064
			
	
						07 Sep 2021 01:42				#219809
		by PCW
	
	
		
			
	
			
			 		
													
	
				Replied by PCW on topic Spindle reverse speed using parallel breakout board			
			
				Is the PWMgen set to PWM/DIR (1) mode?
If not, negative spindle speeds will set the PWMgen
to the minimum PWM setting
					If not, negative spindle speeds will set the PWMgen
to the minimum PWM setting
Please Log in or Create an account to join the conversation.
- frayja2002
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 153
- Thank you received: 12
			
	
						07 Sep 2021 02:09				#219810
		by frayja2002
	
	
		
			
	
	
			
			 		
													
	
				Replied by frayja2002 on topic Spindle reverse speed using parallel breakout board			
			
				I'm not sure exactly how to check this but looking in the hal file this appears to be correct.
I have attached my hal & ini file.
 			
					I have attached my hal & ini file.
Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17371
- Thank you received: 5064
			
	
						07 Sep 2021 02:56				#219811
		by PCW
	
	
		
			
	
			
			 		
													
	
				Replied by PCW on topic Spindle reverse speed using parallel breakout board			
			
				Yes the mode is correct, but I think this statement will not do the
expected thing with negative numbers:
setp pwmgen.0.offset 0.11428571428571428
Probably the simplest fix is to change:
net spindle-cmd-rpm => pwmgen.0.value
to
net spindle-cmd-rpm-abs => pwmgen.0.value
					expected thing with negative numbers:
setp pwmgen.0.offset 0.11428571428571428
Probably the simplest fix is to change:
net spindle-cmd-rpm => pwmgen.0.value
to
net spindle-cmd-rpm-abs => pwmgen.0.value
Please Log in or Create an account to join the conversation.
- frayja2002
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 153
- Thank you received: 12
			
	
						07 Sep 2021 05:45				#219815
		by frayja2002
	
	
		
			
	
			
			 		
													
	
				Replied by frayja2002 on topic Spindle reverse speed using parallel breakout board			
			
				Just to let you know that I have done a quick test & That definitely looks like the fix I was after.
Something so simple!
Thanks for you help.
					Something so simple!
Thanks for you help.
Please Log in or Create an account to join the conversation.
		Time to create page: 0.086 seconds	
 
													 
	 
	 
	