Joint following error on stepper system
- screwtop
- 
				 Topic Author Topic Author
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 18
- Thank you received: 1
			
	
						28 Apr 2019 23:38				#132206
		by screwtop
	
	
		
			
	
			
			 		
													
	
				Replied by screwtop on topic Joint following error on stepper system			
			
				That's an interesting suggestion, thanks. I hadn't considered changing the microstepping as 400 steps/mm is how it was configured from the factory (it's a Chinese-made router with 600 mm x 900 mm bed, stepper-driven leadscrews on all three axes). The 20,000 ns BASE_PERIOD was about as low as I could go reliably, so it might be good to have a bit more headroom there while still achieving good speeds and adequate precision and smoothness.
(As it happens, one of the main reasons for converting the machine to LinuxCNC control was that the original hand-held controller had similar problems with these engraving jobs, and also had annoying limits on the size of G-code it would run. I was impressed that LinuxCNC using PC parallel port could achieve higher step frequencies than the factory controller with DSP!)
					(As it happens, one of the main reasons for converting the machine to LinuxCNC control was that the original hand-held controller had similar problems with these engraving jobs, and also had annoying limits on the size of G-code it would run. I was impressed that LinuxCNC using PC parallel port could achieve higher step frequencies than the factory controller with DSP!)
Please Log in or Create an account to join the conversation.
- screwtop
- 
				 Topic Author Topic Author
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 18
- Thank you received: 1
			
	
						29 Apr 2019 02:57				#132234
		by screwtop
	
	
		
			
	
			
			 		
													
	
				Replied by screwtop on topic Joint following error on stepper system			
			
				Reflecting on increasing the following-error limits, I'd still like to leave them at some reasonable value, since the errors were pointing to a significant problem (even if it wasn't actually exceeding stepgen's frequency limits). I'm still not 100% sure what a "reasonable" value would be, though - it seems that the expected f-error increases with the speed of motion, and might depend on other variables too.			
					Please Log in or Create an account to join the conversation.
- pl7i92
- 
				  
- Offline
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 1872
- Thank you received: 358
			
	
						29 Apr 2019 06:26				#132242
		by pl7i92
	
	
		
			
	
			
			 		
													
	
				Replied by pl7i92 on topic Joint following error on stepper system			
			
				what values of speed are you using
40mm/sec following error 1 is ok
80mm/sec 2 is best
120mm/sec i go for 2.5
i got 120000 base period at 100Steps/mm SCALE
Nema24 4Nm steppers at 250kg Gantry Rack pinion
					40mm/sec following error 1 is ok
80mm/sec 2 is best
120mm/sec i go for 2.5
i got 120000 base period at 100Steps/mm SCALE
Nema24 4Nm steppers at 250kg Gantry Rack pinion
Please Log in or Create an account to join the conversation.
- smeet
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 10
- Thank you received: 0
			
	
						15 Mar 2023 07:18				#266727
		by smeet
	
	
		
			
	
	
			
			 		
													
	
				Replied by smeet on topic Joint following error on stepper system			
			
				i am not sure what worng i am doing i tried to setup a 5axis head head cnc here are my ini files and hal files
i get a joint following error on g code
G0 B90
Thankyou for your help
					i get a joint following error on g code
G0 B90
Thankyou for your help
Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						15 Mar 2023 12:29				#266746
		by andypugh
	
	
		
			
	
			
			 		
													
	
				Replied by andypugh on topic Joint following error on stepper system			
			
				You have resurrected a very old thread here. But the only reason that you can have a following-error with a stepper system is if the system simply can't emit enough steps to follow the requested velocity. This can be caused by step length too long or base thread  too slow (if you are using software stepping)
You have a base thread of 100,000 ns so can step at 10kHz
The G-code line that causes the problem is well within the B-axis limits, but which axis is the f-error on? My guess is that (because of the 5axis kinematics) the B-move is requiring a very rapid move of another axis (faster than the system can generate steps) and that is triggering the f-error.
Unfortunately LinuxCNC does not know how to limit the speed of an axis that is inside its limits to keep an axis that is moving separately as a result of kinematics inside its limits.
(If both axes are commanded to move in the same G-code line then it limits to the slowest)
You could either limit the B-move to a speed that the other axes can follow, or possibly add a move of the dependent axes to that move so that their position in real space (rather than in TCP space) remains approximately constant)
I have long wished to fix this, I even think I know how, but have never found the time when it was near enough the top of the pile.
					You have a base thread of 100,000 ns so can step at 10kHz
The G-code line that causes the problem is well within the B-axis limits, but which axis is the f-error on? My guess is that (because of the 5axis kinematics) the B-move is requiring a very rapid move of another axis (faster than the system can generate steps) and that is triggering the f-error.
Unfortunately LinuxCNC does not know how to limit the speed of an axis that is inside its limits to keep an axis that is moving separately as a result of kinematics inside its limits.
(If both axes are commanded to move in the same G-code line then it limits to the slowest)
You could either limit the B-move to a speed that the other axes can follow, or possibly add a move of the dependent axes to that move so that their position in real space (rather than in TCP space) remains approximately constant)
I have long wished to fix this, I even think I know how, but have never found the time when it was near enough the top of the pile.
Please Log in or Create an account to join the conversation.
- smeet
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 10
- Thank you received: 0
			
	
						15 Mar 2023 12:46				#266747
		by smeet
	
	
		
			
	
			
			 		
													
	
				Replied by smeet on topic Joint following error on stepper system			
			
				it was on joint 0 following error			
					Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						15 Mar 2023 12:49				#266748
		by andypugh
	
	
		
			
	
			
			 		
													
	
				Replied by andypugh on topic Joint following error on stepper system			
			
				OK, so the X axis is trying to make a long, fast move to stay at the same position in TCP space, and can't quite follow fast enough.
If you convert that G0 to a high-feedrate G1 (or make the move with the tool closer to the work, if it is retracted) then it might work.
					If you convert that G0 to a high-feedrate G1 (or make the move with the tool closer to the work, if it is retracted) then it might work.
Please Log in or Create an account to join the conversation.
- smeet
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 10
- Thank you received: 0
			
	
						15 Mar 2023 17:42				#266770
		by smeet
	
	
		
			
	
			
			 		
													
	
				Replied by smeet on topic Joint following error on stepper system			
			
				in that case if i reduce the velocity of b axis and c axis it should work in that therory			
					Please Log in or Create an account to join the conversation.
- smeet
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 10
- Thank you received: 0
			
	
						16 Mar 2023 07:35				#266807
		by smeet
	
	
		
			
	
	
			
			 		
													
	
				Replied by smeet on topic Joint following error on stepper system			
			
				here i am attaching my files if someone can help me figure out what error i am making i am not sure whats wrong thankyou for you help			
					Please Log in or Create an account to join the conversation.
- Aciera
- 
				  
- Online
- Administrator
- 
				  
		Less
		More
		
			
	
		- Posts: 4554
- Thank you received: 2028
			
	
						16 Mar 2023 08:31		 -  16 Mar 2023 08:47		#266810
		by Aciera
	
	
		
			
	
	
			 		
													
	
				Replied by Aciera on topic Joint following error on stepper system			
			
				It's generally a good idea to give an update of what you have changed and what is (still) not working.
Looking at your hal and ini files it looks like you lowered the base thread and also lowered the angular joint maximum velocities. I presume you are still getting joint0 following errors when moving the B axis?. Also the pivot length setting seems to have disappeared?
Have you tried lowering the Baxis/joint velocities further?
You have set a max velocity of 25°/s for the angular B axis with a pivot length + tool length of say 100mm.
A command of G0 B25 will thus result in a TCP displacement in the x direction of tan(25)*100=46.6mm (ie the x-axis has a required velocity of at least 46.6mm/s )
This explains the joint0 following error since your joint0 has a max velocity of 25mm/s.
If your joint0 can really only go 25mm/s your B axis can only move as fast as:
0.8*atan(25/100)=11°/s (the factor 0.8 allows for 20% head room for step generation)
Note that this will decrease further if your pivot length + tool length is more than 100mm.
Similarly you would need to check the axis/joint max acceleration values.
[edit]
Of course the same goes for the other two (y,z) linear axis/joint velocities/accelerations and also the c angular axis/joint
					Looking at your hal and ini files it looks like you lowered the base thread and also lowered the angular joint maximum velocities. I presume you are still getting joint0 following errors when moving the B axis?. Also the pivot length setting seems to have disappeared?
Have you tried lowering the Baxis/joint velocities further?
You have set a max velocity of 25°/s for the angular B axis with a pivot length + tool length of say 100mm.
A command of G0 B25 will thus result in a TCP displacement in the x direction of tan(25)*100=46.6mm (ie the x-axis has a required velocity of at least 46.6mm/s )
This explains the joint0 following error since your joint0 has a max velocity of 25mm/s.
If your joint0 can really only go 25mm/s your B axis can only move as fast as:
0.8*atan(25/100)=11°/s (the factor 0.8 allows for 20% head room for step generation)
Note that this will decrease further if your pivot length + tool length is more than 100mm.
Similarly you would need to check the axis/joint max acceleration values.
[edit]
Of course the same goes for the other two (y,z) linear axis/joint velocities/accelerations and also the c angular axis/joint
		Last edit: 16 Mar 2023 08:47  by Aciera.			
			Please Log in or Create an account to join the conversation.
		Time to create page: 0.078 seconds	
