G-Code commands not executing ? and a newbie hello !

Discussion of ANY 3D printing topic you desire!
Post Reply
glowingturnip
Reactions:
Posts: 2
Joined: September 11th, 2017, 5:38 am
3D Printer(s): don't know !

G-Code commands not executing ? and a newbie hello !

Post by glowingturnip » September 11th, 2017, 6:03 am

Hi all,

I'm Stuart, I've been 3D printing at home for about 2 years now, though I couldn't even tell you what kind of printer I have - it was a Chinese kit from Amazon, since discontinued - I've had to start from pretty much first principals, upgrading bits and bobs, calibrating it all etc, but it works pretty well now - an excellent learning experience !

Anyway, I've noticed that sometimes I get G-Code that doesn't execute.

I use Slicr, and as you know, it has two blocks of automatically inserted startup g-code and lets you insert your own custom code in the middle. The code I want to run looks like the following:

Code: Select all

M107
M190 S80 ; set bed temperature
M104 S200 ; set temperature
; above 3 commands are slicr-generated
; below  is my custom code
G21 ; set units to mm (slicr adds later, but am moving bed, so do here)
G90 ; set absolute coords (ditto)
G92 X0 Y-15 Z0 ; adjusts so (0,0) is on the bed, adjust to suit
G1 Z3 F3000 ; lift nozzle
G1 X0 Y0 F4800 ; home x and y
; and from here on is slicr-generated
M109 S200 ; wait for temperature to be reached
G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
as you can see, my custom code moves the (x,y) origin so that it is on the bed (the home position is slightly in front of the bed, probably a good thing or I'd get a clot of dribbled plastic on the bed). My code also lifts the nozzle.

The trouble I have is that sometimes my code doesn't execute when I'm running from an SD card - the printer doesn't move but just goes straight from bed heating to nozzle heating. Worse still, the hardware seems to think it has raised the z axis by 3mm when it actually hasn't, so when it starts printing, it ploughs a furrow through my blue tape.

I suspect it's something to do with the M190 command, 'set bed temp and wait', I'm guessing that the 'wait' part confuses the processor so that it skips the following commands - if I start the print job when bed and nozzle are already spot on temperature then the code executes fine and the nozzle moves. I don't have the problem if i run the code tethered to the laptop instead of from SD card.

Any ideas what causes this, and how I could fix it ?

Cheers,

Stuart


(I don't really have my bed at 80 degrees in case you're wondering, my bed sensor is wrong, reads in the 40's at room temperature !)

User avatar
LePaul
Reactions:
Posts: 3023
Joined: February 7th, 2016, 10:26 pm
Location: Bangor, Maine USA
3D Printer(s): Ultimaker 2+, FT-5, CR-10, CR-10S, Tevo Tornado
Contact:

Re: G-Code commands not executing ? and a newbie hello !

Post by LePaul » September 11th, 2017, 9:12 am

On one of your print gcodes, what do the first couple of lines look like? Is the cut/paste you showed here showing in the gcode for the file, too?

glowingturnip
Reactions:
Posts: 2
Joined: September 11th, 2017, 5:38 am
3D Printer(s): don't know !

Re: G-Code commands not executing ? and a newbie hello !

Post by glowingturnip » September 11th, 2017, 9:41 am

Yes, that's the full cut and paste from a text-view of a gcode file I've printed.

So the first lines, which slicr puts in, are the m107, m190, m104. Then comes my code, g21, g90, g92 etc, then slicr's again starting with m109

Post Reply

Return to “General 3D Printing Conversation”

Who is online

Users browsing this forum: No registered users and 1 guest