DatenThielt
Posts: 6
Joined: Sun Jul 03, 2016 7:10 am

GCode not working as expected

Morning all.

I noticed recently that once a print had finished the fan would continue running at 100% until either told to print again or I stopped it manuall (On a i3 Duplicator)

To fix this I thought I would add a 2 minute wait and then shut the fan off. Unfortunately this does not seem to do anything at all. The following is my ending script GCode.

Code: Select all

G28 X0 ; home X-axis
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
M84 ; disable motors
G4 P120000 ; Wait 2 minuites
M246 ; dissable cooling fan
Am I doing something wrong? Any help would be appreciated. Thanks!
CompoundCarl
Posts: 2005
Joined: Wed Aug 05, 2015 7:23 am

Re: GCode not working as expected

That's a pretty large value. The firmware might not support a P-value that large. Try a smaller one and see if it works (like P2000). You may also be able to do G4 S2 if your firmware supports it (http://reprap.org/wiki/G-code#G4:_Dwell)
Heutinck
Posts: 77
Joined: Thu Mar 03, 2016 2:14 am

Re: GCode not working as expected

Carl is right. The processor in the Melzi board will only support 16 bit values. so depending on if that register is a signed or unsigned integer, it can only hold up to 32767 or 65535 respectively. you may have to do the timer twice.
DatenThielt
Posts: 6
Joined: Sun Jul 03, 2016 7:10 am

Re: GCode not working as expected

Thanks for the advise everyone. I have set it to one timer with a shorter intetger and will see what happens!

Return to “Troubleshooting and Bug Reports”