Sharp 90* turn in gcode becomes a large sweeping turn
- BobsGotCnc
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 12
- Thank you received: 0
			
	
						09 Mar 2020 02:40				#159554
		by BobsGotCnc
	
	
		
			
	
	
			
			 		
													
	
				Sharp 90* turn in gcode becomes a large sweeping turn was created by BobsGotCnc			
			
				Linux CNC seems to be taking the GCode for a 90* turn (attached) and make a rounded sweeping turn instead. See the screenshot below where you can see the red line of the path the CNC took. Notice the first corner (top right) is a nice 90*. Then on the bottom right and bottom left, that sharp 90* becomes a sweeping 90*. On the top left (no show in the image), a nice sharp 90* was taken.
Any ideas why the sharp turn is becoming a sweeping turn?
GCode for the bottom right corner, which should produce a sharp turn.			
					Any ideas why the sharp turn is becoming a sweeping turn?
GCode for the bottom right corner, which should produce a sharp turn.
N45 G0 X0. Y0.
N50 G43 Z0.6 H1
N55 G0 Z0.2
N60 G1 Z0. F39.37
N65 X0.0156 Y-0.0156 Z-0.0156 F60.37
N70 X11.9844
N75 Y-0.5
N80 Y-11.9844
N85 X0.0156Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 7230
- Thank you received: 2106
			
	
						09 Mar 2020 02:45				#159555
		by cmorley
	
	
		
			
	
	
			 		
													
	
				Replied by cmorley on topic Sharp 90* turn in gcode becomes a large sweeping turn			
			
					
		The following user(s) said Thank You: BobsGotCnc 	
			Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						09 Mar 2020 10:50				#159571
		by andypugh
	
	
		
			
				
The unhelpful answer is "because that is what you have told LinuxCNC your machine is capable of"
During the configuration of LinuxCNC you set up the velocity and acceleration limits for the machine axes. If you configure with a high maximum speed but a relatively low acceleration then you are telling the machine that it can't do tight turns. (Though it might not be immediately obvious that this is what it means)
By default LinuxCNC tries to maintain the best speed it can inside the vel / acc limits whilst still touching every line segment.
(For some reason I can't get to www.linuxcnc.org from work, but I can get to forum.linuxcnc.org, so this url is hand-typed and might be wrong) www.linuxcnc.org/docs/2.7/html/user/user-concepts.html describes this in a bit more detail.
You can change this behaviour with G64, but you probably need to re-visit the axis acceleration limits too. With a currently-working-config it is probably easiest to directly edit the numbers in the INI file. Note that you probably need to edit both MAX_ACCEL and STEPGEN_MAX_ACCEL
					
	
			
			 		
													
	
				Replied by andypugh on topic Sharp 90* turn in gcode becomes a large sweeping turn			
			Any ideas why the sharp turn is becoming a sweeping turn?
The unhelpful answer is "because that is what you have told LinuxCNC your machine is capable of"
During the configuration of LinuxCNC you set up the velocity and acceleration limits for the machine axes. If you configure with a high maximum speed but a relatively low acceleration then you are telling the machine that it can't do tight turns. (Though it might not be immediately obvious that this is what it means)
By default LinuxCNC tries to maintain the best speed it can inside the vel / acc limits whilst still touching every line segment.
(For some reason I can't get to www.linuxcnc.org from work, but I can get to forum.linuxcnc.org, so this url is hand-typed and might be wrong) www.linuxcnc.org/docs/2.7/html/user/user-concepts.html describes this in a bit more detail.
You can change this behaviour with G64, but you probably need to re-visit the axis acceleration limits too. With a currently-working-config it is probably easiest to directly edit the numbers in the INI file. Note that you probably need to edit both MAX_ACCEL and STEPGEN_MAX_ACCEL
Please Log in or Create an account to join the conversation.
- BobsGotCnc
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 12
- Thank you received: 0
			
	
						09 Mar 2020 14:36		 -  09 Mar 2020 14:36		#159576
		by BobsGotCnc
	
	
		
			
	
	
			 		
													
	
				Replied by BobsGotCnc on topic Sharp 90* turn in gcode becomes a large sweeping turn			
			
				Am I understanding this correctly in saying that the CNC is moving too fast to make a tight turn? That surprises me because when it hits turn one it does a 90*, turns two and three it does the sweep, and turn four it does the 90*. I do not believe the velocity would have been different for turns one and four versus two and three. Additionally later on in this same operation a second large square is engraved (inset about .75” from this square) and all four corners are tight 90*s.
I have had the CNC (Joe’s 4x4 Hybrid, HobbyCNC pro Chopper controller, nema 23s) 3 month’s and this is the first time I have seen a tool path translated into a physical movement that does not actually match the tool path.
					I have had the CNC (Joe’s 4x4 Hybrid, HobbyCNC pro Chopper controller, nema 23s) 3 month’s and this is the first time I have seen a tool path translated into a physical movement that does not actually match the tool path.
		Last edit: 09 Mar 2020 14:36  by BobsGotCnc.			
			Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						09 Mar 2020 15:12				#159578
		by andypugh
	
	
		
			
	
			
			 		
													
	
				Replied by andypugh on topic Sharp 90* turn in gcode becomes a large sweeping turn			
			
				If I had to guess I would say that the change of feed rate on some lines might affect the degree of path blending.			
					Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17371
- Thank you received: 5064
			
	
						09 Mar 2020 15:35		 -  09 Mar 2020 15:51		#159580
		by PCW
	
	
		
			
				
Yes, that is the exact issue and explained in the documentation cmorley linked
Unless you tell it otherwise (with G64 PXX or G61) LinuxCNCs default blending is plain G64
which basically means move as fast as you can to match the requested feedrate and hit the
endpoints. This will mean path deviations and those deviations can be significant on low
acceleration machines. The solution is what cmorely suggested (G64 Pxx) or if you dont mind
stopping and possible overcutting of corners, G61 = exact stop mode. There is always a
compromise between keeping a constant feedrate and acceptable path deviation
Edit:
I suspect reason there is less rounding in the first corner is an oddment in the gcode at line N70
which breaks the Y side of the square into 2 segments.
					
	
	
			 		
													
	
				Replied by PCW on topic Sharp 90* turn in gcode becomes a large sweeping turn			
			Am I understanding this correctly in saying that the CNC is moving too fast to make a tight turn?
Yes, that is the exact issue and explained in the documentation cmorley linked
Unless you tell it otherwise (with G64 PXX or G61) LinuxCNCs default blending is plain G64
which basically means move as fast as you can to match the requested feedrate and hit the
endpoints. This will mean path deviations and those deviations can be significant on low
acceleration machines. The solution is what cmorely suggested (G64 Pxx) or if you dont mind
stopping and possible overcutting of corners, G61 = exact stop mode. There is always a
compromise between keeping a constant feedrate and acceptable path deviation
Edit:
I suspect reason there is less rounding in the first corner is an oddment in the gcode at line N70
which breaks the Y side of the square into 2 segments.
		Last edit: 09 Mar 2020 15:51  by PCW.			
			Please Log in or Create an account to join the conversation.
- lumberjack_jeff
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 14
- Thank you received: 0
			
	
						09 Mar 2020 18:28		 -  09 Mar 2020 18:35		#159591
		by lumberjack_jeff
	
	
		
			
	
	
	
			 		
													
	
				Replied by lumberjack_jeff on topic Sharp 90* turn in gcode becomes a large sweeping turn			
			
				I am having a similar problem on my 4x8 gantry router. The part in the attached photo was cut using G64 P0.001 in the gcode. Obviously the interpreter didn't respect that tolerance.
The only change I recently made to my configuration is to comment out the lines on backlash compensation.
I suspect my issue is related to acceleration values, but I'd like some advice. Assuming machine units of inches, what are typical acceleration values? From memory, I think I'm at max_acceleration = 12 and stepgen_maxaccel = 18. From reading the documentation, it looks like my maxaccel should be reduced or acceleration be increased.
					The only change I recently made to my configuration is to comment out the lines on backlash compensation.
I suspect my issue is related to acceleration values, but I'd like some advice. Assuming machine units of inches, what are typical acceleration values? From memory, I think I'm at max_acceleration = 12 and stepgen_maxaccel = 18. From reading the documentation, it looks like my maxaccel should be reduced or acceleration be increased.
		Last edit: 09 Mar 2020 18:35  by lumberjack_jeff.			
			Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17371
- Thank you received: 5064
			
	
						09 Mar 2020 18:39				#159592
		by PCW
	
	
		
			
	
			
			 		
													
	
				Replied by PCW on topic Sharp 90* turn in gcode becomes a large sweeping turn			
			
				If you have g64 p .001 this should not be possible without some other errors
Are you sure you dont have another g64 command embedded in your gcode?
another possibility is some hal/ini setup error that is generating a large following error
Can you post you hal/ini files?
BTW 12 ips/s is _very_ slow acceleration for a router = .0313 G
					Are you sure you dont have another g64 command embedded in your gcode?
another possibility is some hal/ini setup error that is generating a large following error
Can you post you hal/ini files?
BTW 12 ips/s is _very_ slow acceleration for a router = .0313 G
Please Log in or Create an account to join the conversation.
- lumberjack_jeff
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 14
- Thank you received: 0
			
	
						09 Mar 2020 19:06				#159596
		by lumberjack_jeff
	
	
		
			
	
	
			
			 		
													
	
				Replied by lumberjack_jeff on topic Sharp 90* turn in gcode becomes a large sweeping turn			
			
				There is only one g64 command and no g61 in the code.			
					Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17371
- Thank you received: 5064
			
	
						09 Mar 2020 19:51				#159597
		by PCW
	
	
		
			
	
			
			 		
													
	
				Replied by PCW on topic Sharp 90* turn in gcode becomes a large sweeping turn			
			
				What version of LinuxCNC?			
					Please Log in or Create an account to join the conversation.
		Time to create page: 0.090 seconds	
 
													 
	 
	