Prints hanging at same GCode line with Teacup + Gen7 July 07, 2011 03:55PM |
Registered: 16 years ago Posts: 15 |
gcode_process.c: In function 'process_gcode_command': gcode_process.c:758: error: 'DDA' has no member named 'c' gcode_process.c:762: error: 'DDA' has no member named 'c'
STEPS_PER_MM_X = 10.186 STEPS_PER_MM_Y = 10.186 STEPS_PER_MM_Z = 200 STEPS_PER_MM_E = 65.423 MAXIMUM_FEEDRATE_X = 6000 MAXIMUM_FEEDRATE_Y = 6000 MAXIMUM_FEEDRATE_Z = 540 MAXIMUM_FEEDRATE_E = 240
G1 X43.76 Y74.52 Z0.3 F1800.0 E0.018 G1 X29.45 Y60.22 Z0.3 F1800.0 E0.46 G1 X29.6 Y.59.72 Z0.3 F1800.0 E0.012 G1 X29.54 Y59.67 Z0.3 F1800.0 E0.002 <--Last line completed (1017) G1 F240.0 G1 E-1.5 G1 F1800.0 ;M103 G1 X29.37 Y60.77 Z0.3 F2700.0
G1 X78.06 Y36.73 Z0.3 F1800.0 E0.537 G1 X77.93 Y60.36 Z0.3 F1800.0 E0.537 G1 X96.5 Y75.0 Z0.3 F1800.0 E0.537 G1 X77.93 Y89.64 Z0.3 F1800.0 E0.537 G1 X78.06 Y113.27 Z0.3 F1800.0 E0.537 G1 X55.05 Y107.89 Z0.3 F1800.0 E0.537 G1 X36.65 Y122.73 Z0.3 F1800.0 E0.537 <-- Last line completed (160) G1 X26.51 Y101.37 Z0.3 F1800.0 E0.537 G1 X3.44 Y96.24 Z0.3 F1800.0 E0.537 G1 X13.81 Y75.0 Z0.3 F1800.0 E0.537 ...etc
Re: Prints hanging at same GCode line with Teacup + Gen7 July 07, 2011 06:45PM |
Registered: 16 years ago Posts: 1,094 |
Re: Prints hanging at same GCode line with Teacup + Gen7 July 08, 2011 03:26AM |
Registered: 13 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Prints hanging at same GCode line with Teacup + Gen7 July 08, 2011 06:22AM |
Registered: 16 years ago Posts: 1,094 |
Re: Prints hanging at same GCode line with Teacup + Gen7 July 08, 2011 11:08AM |
Registered: 13 years ago Posts: 113 |
Re: Prints hanging at same GCode line with Teacup + Gen7 July 08, 2011 01:07PM |
Registered: 16 years ago Posts: 15 |
Re: Prints hanging at same GCode line with Teacup + Gen7 July 08, 2011 08:11PM |
Registered: 16 years ago Posts: 1,094 |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 20, 2012 04:28AM |
Registered: 12 years ago Posts: 13 |
... > G1 X69.029 Y50.572 Z4.67 F1800.0 E566.8152 < {DDA_CREATE: [212,742,0,18] [ts:30,ds:792] } < Q7/6F < ok > G1 X68.92 Y49.933 Z4.67 F1800.0 E566.8302 < {DDA_CREATE: [-521,9,0,12] [ts:21,ds:516] } < Q0/7F < ok > G1 X68.035 Y50.109 Z4.67 F1800.0 E566.851 < {DDA_CREATE: [-109,-639,0,15] [ts:26,ds:650] } < Q1/0F < ok > G1 X68.499 Y50.572 Z4.67 F1800.0 E566.8661 < {DDA_CREATE: [-885,176,0,21] [ts:36,ds:912] } < Q2/1F < ok > G1 X67.969 Y50.572 Z4.67 F1800.0 E566.8783 < {DDA_CREATE: [464,463,0,15] [ts:19,ds:638] } < Q3/2F < ok > G1 X67.391 Y49.995 Z4.67 F1800.0 E566.8971 < {DDA_CREATE: [-530,0,0,12] [ts:21,ds:521] } < Q4/3F < Pos: 69.956,50.433,4.670,-559.358,1800 < Dst: 69.656,49.608,4.670,566.776,1800 < Q4/3F < Pos: 69.956,50.433,4.670,-557.131,1800 < Dst: 69.656,49.608,4.670,566.776,1800 < Q4/3F < Pos: 69.956,50.433,4.670,-555.960,1800 < Dst: 69.656,49.608,4.670,566.776,1800 < Q4/3F < Pos: 69.956,50.433,4.670,-555.036,1800 < Dst: 69.656,49.608,4.670,566.776,1800 < Q4/3F ...
Re: Prints hanging at same GCode line with Teacup + Gen7 April 20, 2012 07:39AM |
Registered: 13 years ago Posts: 7,616 |
Quote
So I decided to try and debug the thing.
< Pos: 69.956,50.433,4.670,-555.960,1800 < Dst: 69.656,49.608,4.670,566.776,1800More than 1000 mm to go for the E axis. Doesn't look quite right.
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 20, 2012 12:03PM |
Registered: 12 years ago Posts: 13 |
Quote
Traumflug
< Pos: 69.956,50.433,4.670,-555.960,1800 < Dst: 69.656,49.608,4.670,566.776,1800More than 1000 mm to go for the E axis. Doesn't look quite right.
Re: Prints hanging at same GCode line with Teacup + Gen7 April 21, 2012 07:41AM |
Registered: 13 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 21, 2012 03:17PM |
Registered: 12 years ago Posts: 13 |
... 70886 > G1 X70.347 Y50.299 Z4.67 F1800.0 E566.7464 70887 < {DDA_CREATE: [-266,264,0,8] [ts:11,ds:365] } 70888 < Q2/1F 70889 < ok 70890 > G1 X69.972 Y50.454 Z4.67 F1800.0 E566.7558 70891 < {DDA_CREATE: [-629,432,0,18] [ts:25,ds:780] } 70892 < Q3/2F 70893 < ok 70894 > G1 X69.656 Y49.608 Z4.67 F1800.0 E566.7766 70895 < {DDA_CREATE: [-375,155,0,9] [ts:15,ds:421] } 70896 < Q4/3F 70897 < ok 70898 > G1 X69.338 Y49.821 Z4.67 F1800.0 E566.7854 70899 < {DDA_CREATE: [-316,-846,0,21] [ts:429487,ds:935] } <--------- CRAZY ts 70900 < Q5/4F 70901 < ok 70902 > G1 X69.55 Y50.563 Z4.67 F1800.0 E566.8032 70903 < {DDA_CREATE: [-318,213,0,9] [ts:12,ds:392] } ...
um_to_steps_e(steps, target->E);Turns out the value of 566776 is critical for target->E, because target->E is signed int (only couple billions one way) and overflows when is multiplied by (STEPS_PER_M_E/100L), my STEPS_PER_M_E = 378900
Re: Prints hanging at same GCode line with Teacup + Gen7 April 22, 2012 06:40AM |
Registered: 13 years ago Posts: 7,616 |
Quote
I am not quite familiar with the overall firmware.
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 22, 2012 03:22PM |
Registered: 12 years ago Posts: 13 |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 22, 2012 05:21PM |
Registered: 13 years ago Posts: 7,616 |
gcc overflow.c -o overflow && ./overflow
Quote
Do I need to send a patch or should I create my own branch in the git tree and someone will merge it in master later?
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 25, 2012 06:00PM |
Registered: 12 years ago Posts: 13 |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 26, 2012 05:25AM |
Registered: 13 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 26, 2012 05:39AM |
Admin Registered: 12 years ago Posts: 2,569 |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 26, 2012 07:18AM |
Registered: 12 years ago Posts: 13 |
Quote
Traumflug
- What is this __attribute__((hot)) ? Looks like some caching hint, but ATmegas have no cache.
Quote
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
hot
The hot attribute is used to inform the compiler that a function is a hot spot of the compiled program. The function is optimized more aggressively and on many target it is placed into special subsection of the text section so all hot functions appears close together improving locality.
Quote
Traumflug
- What is this business with the remainder?
Re: Prints hanging at same GCode line with Teacup + Gen7 April 26, 2012 07:58AM |
Registered: 12 years ago Posts: 13 |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 27, 2012 06:59AM |
Registered: 13 years ago Posts: 7,616 |
Quote
2. muldiv MUST have first parameter and return type as signed int
Quote
there as well: approx_distance, approx_distance_3,
//INT32_MIN will remain to be INT32_MIN event after negation!!! if (multiplicand == INT32_MIN) multiplicand = INT32_MAX; elseThe comment is true, but it widens the valid range by just one micrometer.
return negative_flag == 0 ? quotient : -quotient;should be replaced by
return negative_flag == 0 ? (int32_t)quotient : -((int32_t)quotient);
Quote
3. The second and third parameters of muldiv are always the same (within one axis), so their ratios (/ and %) are the same too. And it seems to me to be an unjustified waste of processor time to calculate these ratios every time muldiv is called (division is expensive).
int32_t muldiv(int32_t multiplicand, uint32_t multiplier, uint32_t divisor) { muldivQR(multiplicand, multiplier / divisor, multiplier % divisor, divisor); } int32_t muldivQR(int32_t multiplicand, uint32_t qn, uint32_t rn, uint32_t divisor) { ...
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Prints hanging at same GCode line with Teacup + Gen7 April 27, 2012 07:43AM |
Registered: 12 years ago Posts: 13 |
Quote
Traumflug
I think you can drop this part:
//INT32_MIN will remain to be INT32_MIN event after negation!!! if (multiplicand == INT32_MIN) multiplicand = INT32_MAX; elseThe comment is true, but it widens the valid range by just one micrometer.
Only if you promise not to forget to do soQuote
Traumflug
Also true. Can be done in future commits.
True! And I was thinking may be declaring quotient as int32_t would be even better?Quote
Traumflug
should be replaced by
return negative_flag == 0 ? (int32_t)quotient : -((int32_t)quotient);
Re: Prints hanging at same GCode line with Teacup + Gen7 May 08, 2012 04:54AM |
Registered: 12 years ago Posts: 13 |
Re: Prints hanging at same GCode line with Teacup + Gen7 May 08, 2012 08:53AM |
Registered: 13 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Prints hanging at same GCode line with Teacup + Gen7 May 10, 2012 04:53AM |
Registered: 12 years ago Posts: 13 |
Re: Prints hanging at same GCode line with Teacup + Gen7 June 15, 2012 06:01AM |
Registered: 13 years ago Posts: 352 |
Re: Prints hanging at same GCode line with Teacup + Gen7 July 02, 2012 01:14PM |
Registered: 13 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Prints hanging at same GCode line with Teacup + Gen7 July 07, 2012 01:12PM |
Registered: 13 years ago Posts: 352 |
Re: Prints hanging at same GCode line with Teacup + Gen7 July 08, 2012 06:23AM |
Registered: 13 years ago Posts: 7,616 |
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Prints hanging at same GCode line with Teacup + Gen7 July 08, 2012 09:46AM |
Registered: 13 years ago Posts: 352 |