# G Code Generation

• diegoroman17
• Offline
• 08 Oct 2012 14:05 #25126
Replied by diegoroman17 on topic Re:G Code Generation
Ok.

There is a possibility of bug in the examples of Section 1.4. The theory says that A is half of the maximum acceleration but the examples used without dividing the maximum acceleration for two

08 Oct 2012 17:05 #25131 by BigJohnT
Replied by BigJohnT on topic Re:G Code Generation

To keep up the feed rate, the move must be longer than the distance it takes to accelerate from 0 to the desired feed rate and then stop again. Using A as 1/2 the ini file MAX_ACCELERATION and F as the feed rate in units per second, the acceleration time is ta = F/A and the acceleration distance is da = F*ta/2. The deceleration time and distance are the same, making the critical distance d = da + dd = 2 * da = F2/A.

For example, for a feed rate of 1 inch per second and an acceleration of 10 inches/sec2, the critical distance is 12/10 = 1/10 = 0.1 inches.

For a feed rate of 0.5 inch per second, the critical distance is 52/100 = 25/10 = 0.025 inches.

So your saying the two examples from the manual I quoted above are wrong? What should the correct example be?

John

• diegoroman17
• Offline
• 08 Oct 2012 17:17 #25133
Replied by diegoroman17 on topic Re:G Code Generation
If A = (1/2)*MAX_ACCELERATION in the example 1:

F = 1 inch/sec
MAX_ACCELERATION = 10inches/sec2 then A = (1/2)*10

critical distance = F^2/A
critical distance = 1^2/ ((1/2)*10) = 0,2 inches