Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
motion-control [2017/01/25 22:48]
arthur
motion-control [2019/04/18 18:46]
wolfmanjm [Maximum speeds]
Line 1: Line 1:
-Acceleration+Motion control
  
 Smoothie reads G-code instructions,​ and converts those into movement, typically by turning motors. Smoothie reads G-code instructions,​ and converts those into movement, typically by turning motors.
Line 6: Line 6:
  
 This page explains how to configure the different motion control parameters you can tune in Smoothie. This page explains how to configure the different motion control parameters you can tune in Smoothie.
 +
 +~~CLEARFIX~~
 +
 +<callout type="​primary"​ icon="​true"​ title="​ NOTICE">​
 +
 +**NOTE** you **MUST** define at least alpha, beta and gamma in a valid config file, do not comment out gamma even if you are not using it.
 +
 +</​callout>​
  
 ~~CLEARFIX~~ ~~CLEARFIX~~
Line 23: Line 31:
 When you ask Smoothie to move a certain distance at a certain speed, it starts at a speed of 0 ( not moving ).  When you ask Smoothie to move a certain distance at a certain speed, it starts at a speed of 0 ( not moving ). 
  
-If it goes instantly to the requested speed, in most cases, that won't work : A motor can not go from a speed of 0 to several rotations per second instantly. It needs to accelerate to that speed.+If it goes instantly to the requested speed, in most cases, that won't work: motor can not go from a speed of 0 to several rotations per second instantly. It needs to accelerate to that speed.
  
 Similarly, the axis which is controlled itself has a given weight that needs to be moved. The faster you accelerate, the more force is required to accelerate the mass to the target speed. Similarly, the axis which is controlled itself has a given weight that needs to be moved. The faster you accelerate, the more force is required to accelerate the mass to the target speed.
Line 50: Line 58:
 <​kbd>​200</​kbd>​ is a common value for CNC mills or routers since they have much more mass to move, and have to apply forces to their tool. <​kbd>​200</​kbd>​ is a common value for CNC mills or routers since they have much more mass to move, and have to apply forces to their tool.
  
-There is no mathematical/​easy way of determining a perfect value : you ​are going to need to try values and find the one that works best for you.+There is no mathematical/​easy way of determining a perfect value: you are going to need to try values and find the one that works best for you.
  
  
-If you feel like your machine is too slow, you increase acceleration. If your machine starts ​loosing ​steps, ​loosing ​it's position, or shakes too much, you reduce acceleration.+If you feel like your machine is too slow, you increase acceleration. If your machine starts ​losing ​steps, ​losing ​it's position, or shakes too much, you reduce acceleration.
  
 Note that you do not need to reset your Smoothieboard to try new values. You can start a "​job",​ and while the job is executing, try new values using the <​kbd>​M204</​kbd>​ M-code. For example, <​kbd>​M204 S2000</​kbd>​ sets acceleration to 2000 ( it takes a few seconds for this to take effect after the command is sent ). Note that you do not need to reset your Smoothieboard to try new values. You can start a "​job",​ and while the job is executing, try new values using the <​kbd>​M204</​kbd>​ M-code. For example, <​kbd>​M204 S2000</​kbd>​ sets acceleration to 2000 ( it takes a few seconds for this to take effect after the command is sent ).
Line 61: Line 69:
 On some machines, your Z axis is very different from the others and has different requirements and capabilities. On some machines, your Z axis is very different from the others and has different requirements and capabilities.
  
-On those machines, you can set the acceleration for Z separately, by editing the <kbd>z_acceleration</​kbd>​ value.+On those machines, you can set the acceleration for Z separately, by editing the <kbd>gamma.acceleration</​kbd>​ value.
 </​callout>​ </​callout>​
  
Line 91: Line 99:
 <​kbd>​0.005</​kbd>​ is a typical value for a CNC mill or router, though for some machine you might need to go to smaller values like <​kbd>​0.001</​kbd>​. <​kbd>​0.005</​kbd>​ is a typical value for a CNC mill or router, though for some machine you might need to go to smaller values like <​kbd>​0.001</​kbd>​.
  
-== Maximum speeds.+== Maximum speeds
  
-Where speeds are concerned, Smoothie makes the distinction between two very important things : axes and actuators.+Where speeds are concerned, Smoothie makes the distinction between two very important things: axes and actuators.
  
 An actuator and an axis are two different things. An actuator is the thing that the motor causes to move directly. The axes are pretty much the coordinate system for the "​tool",​ and the system the Gcode uses. An actuator and an axis are two different things. An actuator is the thing that the motor causes to move directly. The axes are pretty much the coordinate system for the "​tool",​ and the system the Gcode uses.
Line 105: Line 113:
 Setting a maximum speed ensures that Smoothie will never go higher than that speed for that axis or actuator. This is useful if the machine would "​skip"​ steps or have other problems if a too high speed was required, which is the case in most machines. Setting a maximum speed ensures that Smoothie will never go higher than that speed for that axis or actuator. This is useful if the machine would "​skip"​ steps or have other problems if a too high speed was required, which is the case in most machines.
  
-To set the maximum speed for an axis, edit the <​kbd>​max_speed</​kbd>​ configuration option for that axis : +To set the maximum speed for an axis, edit the <​kbd>​max_speed</​kbd>​ configuration option for that axis : 
  
 <​code>​ <​code>​
Line 113: Line 121:
 The units for the speed limit is millimeters per minute. The units for the speed limit is millimeters per minute.
  
-To limit the speed for an actuator, set the <​kbd>​max_rate</​kbd>​ for that actuator : +To limit the speed for an actuator, set the <​kbd>​max_rate</​kbd>​ for that actuator : 
  
 <​code>​ <​code>​
Line 120: Line 128:
  
 <callout type="​success"​ icon="​true"​ title="​ Acceleration">​ <callout type="​success"​ icon="​true"​ title="​ Acceleration">​
-Note that decreasing ​acceleration allows reaching higher maximum speeds, in general.+Note that increasing ​acceleration allows reaching higher maximum speeds, in general.
  
 But decreasing acceleration also decreases the average movement speed over a whole G-code file. But decreasing acceleration also decreases the average movement speed over a whole G-code file.
Line 126: Line 134:
 This is because of physics and inertia. This is because of physics and inertia.
 </​callout>​ </​callout>​
 +
 +== Adjusting Z once printing starts (sometimes called babysteps)
 +You can adjust the Z while it is printing by using the WCS offsets.
 +For instance to raise the head 0.1mm..
 +1. G10 P0 L2 Z0.1 # this will set the Z WCS to 0.1mm higher, however it will NOT move the head immediately as it only takes effect on the next G1 that has a Z in it
 +2. G0 Znnn # this will move the Z after the last received g code to nnn, you will need to make sure that nnn is the actual z height you want right now (usually the Z it is currently at, as 0.1mm will be added to that due to step 1)
 +
  
 == All options == All options
Line 131: Line 146:
 There are all the options related to motion control There are all the options related to motion control
  
-||~ Option ​||~ Example value ||~ Explanation ​||+Option ​Example value Explanation ​^
 {{page>​motion-control-options}} {{page>​motion-control-options}}
  
Line 138: Line 153:
 <callout type="​primary"​ icon="​true"​ title="​ Under the hood">​ <callout type="​primary"​ icon="​true"​ title="​ Under the hood">​
  
-Smoothie'​s main job is to convert Gcode into movement. Motion control modules ( in the source code [[https://​github.com/​arthurwolf/​Smoothie/​tree/​edge/​src/​modules/​robot|src/​modules/​robot]] ) are the various steps in that process. ​ For more on that process, see [[Howitworks]],​ for general use and configuration documentation on Smoothie'​s motion control, see bellow ​: +Smoothie'​s main job is to convert Gcode into movement. Motion control modules ( in the source code [[https://​github.com/​arthurwolf/​Smoothie/​tree/​edge/​src/​modules/​robot|src/​modules/​robot]] ) are the various steps in that process. ​ For more on that process, see [[Howitworks]],​ for general use and configuration documentation on Smoothie'​s motion control, see below :
 </​callout>​ </​callout>​
  
-== External ​ressources+== External ​resources
  
 === Video about maximum speeds === Video about maximum speeds
  
-[[html]]+<html>
 <iframe width="​100%"​ height="​720"​ src="​https://​www.youtube.com/​embed/​7HsIZuj9vOs"​ frameborder="​0"​ allowfullscreen></​iframe>​ <iframe width="​100%"​ height="​720"​ src="​https://​www.youtube.com/​embed/​7HsIZuj9vOs"​ frameborder="​0"​ allowfullscreen></​iframe>​
-[[/html]]+</html>