Dollop of rubbish at start of print

Thoughts about Raise3D, 3D printing and making in general.
User avatar
Vagulus
Posts: 79
Joined: Mon Mar 25, 2019 5:27 am

Dollop of rubbish at start of print

Postby Vagulus » Fri May 31, 2019 3:20 am

When I start to print a model on my Pro2 my support nozzle extrudes a little filament (probably to purge the nozzle) then commences printing the Raft. When it moves to the start position is tends to drag a donkey-dollop of extruded filament to that start position. When the circumference of the Raft is completed the nozzle bumps into the donkey-dollop and two things are likely to happen:
1. the nozzle moves the donkey-dollop and the first few centimetre of the Raft Circumference out of position;
2. the nozzle rides over the donkey-dollop pasting it in position where it is gradually overwritten by successive layers.

Why does that donkey-dollop not drop clear of the nozzle before it moves to start position?
How can I make it drop clear?

I have attached a reasonably up-to-date copy of my printer settings.

Thanks
Attachments
105028-Template Images.pdf
(2.49 MiB) Downloaded 53 times
--------------------------------------------
God so loved the World that
He did not send a Committee

User avatar
Kfleck
Posts: 18
Joined: Thu Sep 27, 2018 5:22 pm

Re: Dollop of rubbish at start of print

Postby Kfleck » Fri May 31, 2019 2:50 pm

Mine did the same thing and it drove me nuts allways having to be there to wipe it as it starts. So i changed the startup GCode to put a line of each color before printing. Just copy and paste it in. this fixed my problem. Disclamer (Make changes to your GCode at your own risk) .

Start GCode when the number of extruders is 2
Capture.JPG


G21
G90
M82
M107
G28 X0 Y0
G28 Z0
G1 Z15.0 F{travel_xy_speed}
T1
G1 X5 Y5 Z0.2 F2000
G92 E0
G1 X100 E30 F600
G1 X120 E20.0 F5000
G1 Z5 F600
T0
G1 X5 Y8 F6000
G1 Z0.2 F1000
G92 E0
G1 X100 E30 F600
G1 X120 F5000
G92 E0
M117 Printing...




Start GCode when the number of extruders is 1


G21
G90
M82
M107
G28 X0 Y0
G28 Z0
G1 Z15.0 F{travel_xy_speed}
T0
G1 X5 Y5 F6000
G1 Z0.2 F1000
G92 E0
G1 X100 E30 F600
G1 X120 F5000
G92 E0
M117 Printing...
Raise 3d Pro 2, IdeaMaker

crimsonyoshi
Posts: 115
Joined: Mon Sep 24, 2018 6:17 pm
Location: Manitoba, Canada

Re: Dollop of rubbish at start of print

Postby crimsonyoshi » Fri May 31, 2019 4:11 pm

The above user's post will definitely work, and I'll second that disclaimer. I pretty much always will be nearby until the printer does actually start up and take the putty knife, small utensil or my fingers (if the plastic bit is long enough to not get burnt) to manually pull the initial purge away from the print nozzle. This not only ensures it's dealt with, but I also want to check and make sure my first few lines show good bed adhesion before I walk away from it.

Over time, the bed will need minor adjustments, and you don't want it to be because you missed the first few lines before a big print commences!

User avatar
Vagulus
Posts: 79
Joined: Mon Mar 25, 2019 5:27 am

Re: Dollop of rubbish at start of print

Postby Vagulus » Fri May 31, 2019 11:47 pm

Hi Kfleck

Printing a wipe line first sounds like a good idea but I don't speak GCODE.
Would you mind re-posting those code lines with your additions highlighted.
Thanks

Hi crimsonyoshi
I agree with your sentiment about seeing the first few 'toddler steps' at the start of a print. That's like a Turner being glued to the lathe for the first few seconds of a long cut. However, it is still nice to see the machine deal with the problem automatically and not having to intervene.
Thanks
--------------------------------------------
God so loved the World that
He did not send a Committee

KS_Husker
Posts: 132
Joined: Thu Apr 26, 2018 2:32 am

Re: Dollop of rubbish at start of print

Postby KS_Husker » Sat Jun 01, 2019 12:11 am

Great job. I've been wanting to do this for a while but haven't spent the time to really think about the code needed. I will be implementing this as well. Thank you so much for your help!!

User avatar
Kfleck
Posts: 18
Joined: Thu Sep 27, 2018 5:22 pm

Re: Dollop of rubbish at start of print

Postby Kfleck » Mon Jun 03, 2019 6:43 pm

Hi Vagulus, I did that code over a year ago, I don't actually remember what all the changes were. but if you copy the whole thing from G21 to M117 printing... and use it to replace the existing code. one is for single extruder and the other is for dual. Hope that helps.
Raise 3d Pro 2, IdeaMaker

User avatar
Vagulus
Posts: 79
Joined: Mon Mar 25, 2019 5:27 am

Re: Dollop of rubbish at start of print

Postby Vagulus » Sun Jun 30, 2019 7:27 am

Hi Kfleck

I have made my first excursion into the wonderful world of GCode, an attempt to figure out what your code for the two lines of pre-extrusion actually does. I have come up with this:
G21 // millimetre units
G90 // absolute positioning
M82 // E absolute
M107 // Fan off
G28 X0 Y0 // auto home to x-0, y=0
G28 Z0 // auto home to z=0
G1 Z15.0 F{travel_xy_speed} // set height to 15 mm at std speed

/*
extrude a line of print using the right extruder
*/
T1 // select right extruder
G1 X5 Y5 Z0.2 F2000 // linear move to x=5, y-5,
// z=extrusion height at 2000 mm/min
G92 E0 // turn filament flow off
G1 X100 E30 F600 // linear move from current x (5) to x=100 using
// 30 mm of filament, moving at 600 mm/min
G1 X120 E20.0 F5000 // linear move from current x (100) to x=120
// using 20 mm of filament, moving at 5000 mm/min
G1 Z5 F600 // linear move from current z ((0.2) to z=5, moving
// at 600 mm/min

/*
extrude a line of print using the left extruder
*/
T0 // select left extruder
G1 X5 Y8 F6000 // linear move from current x (120) current y (5) to
// x=5 y=8
G1 Z0.2 F1000 // linear move from current z (5) to extrusion height
// at 1000 mm/min
G92 E0 // turn filament flow off
G1 X100 E30 F600 // linear move from current x (5) to x=100 using
// 30 mm of filament, moving at 600 mm/min
G1 X120 F5000 // linear move from current x (100) to x=120
// moving at 5000 mm/min

/*
carry on with rest of print job
*/
G92 E0 // turn filament flow off
M117 Printing... // set LCD message to "Printing..."


Would you be so kind as to tell me if this is correct.

Thanks
--------------------------------------------
God so loved the World that
He did not send a Committee

Jetguy
Posts: 2813
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: Dollop of rubbish at start of print

Postby Jetguy » Sun Jun 30, 2019 12:47 pm

No, that is incorrect in a few key areas.

#1 All Axis numbers are distances in millimeters. You mostly got that, but just wanted to make sure that's clear
#2 You really missed the G92 command. First think of everything as a state. You really have to think of this in terms as playing Simon says and the machine is blind.
When you start the printer or machine, it's current logical distance or position is assumed to be random. In other words, each axis could be 0 or 1000 or any number possible.

Homing is a 2 function thing. Homing is a command that moves the axis UNTIL it hits a limit switch. That would still lead to a random number since the assumed starting position is random. The 0 means it sets the logical current position to 0 when it's parked at the limit switch. You are marrying up a physical known position (parked at the limit switch) with a logical (I am here) at coordinate 0mm in the current position memory.

When you send a move command- it's parsed as a a "command" move from where I currently am in logical memory to this new logical coordinate. That results in a derived distance. If you are already at X100 Y100 Z10 and in Absolute mode you get a command G1 X200 Y200 X10 Then the move is a coordinated move- another hugely important concept VS an uncoordinated move and you'll also notice I left off a feedrate F value. That means it will use the previous last posted F value OR use a default value in the firmware. Point being, the line say 200, you actually only move 100 from 100 to 200mm. Then, that new derived move is sent to the motion planner, which takes the move and applies acceleration and deceleration at the start and end of the move, applies any firmware based feedrate limits, and then sends those timed pulse streams to the stepper drivers. The stepper drivers then commutate the current levels in the 2 coils according to the stepper indexer table the exact number of micro steps resulting in the magnetic field of the motor rotating that exact distance or position and we assume the rotor follows it, thus turning the pulleys and lead screw and key- the drive wheel of the extruder feeding the wire filament.

E is distance of incoming filament to be extruded. Just like any other axis, this is a distance, the same rules apply. The ONLY rule is we don't have a homing or limit switch on E- so instead of homing we use another command the G92 command to tell the axis logically to overwrite the logical "I am here" coordinate in memory to the new value we append in the G92 command. This works for all axis- G92 is a general command that can be used on any or all axis- but we have to use it on E because we cannot use homing without a switch.
Thus G92 E0 sets the logical "I am here" position of E axis to 0

Why does this matter? Well this is a huge concept. If you are in absolute mode on any axis and I tell you to move to a value, you literally move to that value in mm. In other words, no matter where you are, you move to logical and hopefully physical position 100mm assuming 100mm from where 0mm physically was. If you are at 200mm and I command 100mm, that's moving back towards 0. If you are at 50 and I tell you 100mm, that's forward more to 100m.

If you are in relative mode, then commands are read JUST AS THEY ARE. In other words, relative, doesn't care where you are, the move is now relative to where you are. So a G1 command to X50 means +50mm move from wherever you are. In some situations relative is easier to read what the command actually means, it's just as read. However, in the case of XYZ- relative moves causes massive issues and more math for a display like a gcode preview. That's why generally, we do not use relative mode. Absolute gcode shows you a target logical position in 4D (3D XYZ axis, plus a 4th linear dimension of how much linear filament is pushed into the extruder for that move). The giant hint here is relative mode is an easy way during an extrusion prime function to command a distance of filament to be extruded. Rather than having to play the game of knowing where you currently are, take the new value- subtract that from where you are to come at a derived distance value, in relative mode you just follow the value. E10 means extrude 10mm in relative mode. E10 in absolute mode could be a retraction if you are in absolute mode and currently at E12 in memory.

Couple of catch 22s now that we've defined a coordinate system, we've defined relative VS absolute. We have a couple of hints too. Example is, we use a corner 0 coordinate system. The build space is a giant cube or tall box on the Plus models, but the homing coordinate and logical coordinate starts at corner 0. There are other systems on other printers that use the center of the build plate as 0 such as Delta printers and Makerbot kind of started that mode on their printers. Again, we use corner 0, so that means ALL coordinates are positive values.
Now the important one- this means that the firmware MAY only accept positive values for gcode commands. In other words, in some gcode systems, you can have negative values. Example would be G1 X-10 Y10 Z0.2 E-0.2. The E-0.2 is a retraction move (assuming relative, but could be absolute given a previous G92 E0). Warning- our system does not like negative values. I discovered this during testing with the mosaic palette. So even in relative mode, in order to retract, you would have to have a negative value. I'm warning you now, on the N series and thus probably on the Pro2 series, a negative value might be ignored by the firmware. This can wreak havoc with modifying a priming sequence.

Jetguy
Posts: 2813
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: Dollop of rubbish at start of print

Postby Jetguy » Sun Jun 30, 2019 4:46 pm

Just to further concepts and danger points:
G92 is extremely powerful, but also dangerous.
Why? Well, there are things like depending on how a given firmware handles G92, some do not allow only a single axis to be overwritten. In other words, in some systems, you must, must, must define all 4 axis values (XYZE) in a G92 command. Luckily, ours does not work that way, but reading and writing custom gcode, something to be aware of.

So, to recap, let's say you are at logical E10. You want to retract 2mm. In absolute mode, you send G1 E8 because that's 2 less than the current value resulting in a 2mm retraction of filament.

If you wanted to do that in relative mode the positive only value rule presents a problem.
You are in relative extrusion or position mode (***Homework*** go look this up, there are commands to set a relative extrusion mode that does not affect XYZ position leaving it as absolute mode) for extrusion, either the above mentioned special mode or just general XYZE "relative" mode.
You are at E10
You want to retract 2mm
You try to send a G1 E-2 and this may or may not be executed by firmware.

Alternate absolute mode method.
Instead of you doing the math and taking current position of E10 and then sending E8, you instead reset to G92 E2.
Looks like this:
G92 E0
G1 E10 - extrudes 10mm
G92 E2 - Set current value to 2mm absolute
G1 E0 - results in a retract of 2mm
Net effect, current position is still logical E0 after the move.

Or,
You want to just use resets (Again, all in absolute mode prior to these lines)
G92 E0
G1 E10
G1 E8
G92 E0
*** end of priming gcode resets logical back to 0***
First line of print gcode
G0 X200 Y200 Z0.1 F12000 Travel move to start position
G1 X220 Y200 E2.8 F800 First line of extrusion, coordinated move, sets new feedrate, extrudes 2.8mm of filament while moving in X 20mmto the right
G1 X220 Y220 E5.6 Uses previous feedrate, extrudes another 2.8mm of filament while moving in Y towards the back
G1 E5.4 F2000 Retract filament 0.2mm at new feedrate

Ideamaker currently uses absolute extrusion for printing gcode, but since he starting gcode is user editable you can attempt to use relative modes, you just have to switch back to absolute before the end of the starting gcode sequence. Hence why you will always see E values rising throughout a print- it's absolute AKA the total distance of filament used to that point- thus easy calculation of how much filament a given print used.

Jetguy
Posts: 2813
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: Dollop of rubbish at start of print

Postby Jetguy » Sun Jun 30, 2019 5:15 pm

G21 // millimetre units
G90 // absolute positioning
M82 // E absolute
M107 // Fan off
G28 X0 Y0 // auto home to x-0, y=0
G28 Z0 // auto home to z=0
G1 Z15.0 F{travel_xy_speed} // set height to 15 mm at std speed

/*
extrude a line of print using the right extruder
*/
T1 // select right extruder
G1 X5 Y5 Z0.2 F2000 // linear move to x=5, y-5,
// z=extrusion height at 2000 mm/min
G92 E0 // turn filament flow off
G1 X100 E30 F600 // linear move from current x (5) to x=100 using
// 30 mm of filament, moving at 600 mm/min
G1 X120 E20.0 F5000 // linear move from current x (100) to x=120
// using 20 mm of filament, moving at 5000 mm/min


G21 // millimetre units
G90 // absolute positioning
M82 // E absolute AKA absolute extrusion values
M107 // Fan off
G28 X0 Y0 // auto home to x-0, y=0
G28 Z0 // auto home to z=0
G1 Z15.0 F{travel_xy_speed} // set height to 15 mm at std speed

/*
extrude a line of print using the right extruder
*/
T1 // select right extruder
G1 X5 Y5 Z0.2 F2000 // linear move to x=5, y-5,
// z=eNozzle height raised above the default already existing homing gap height, 2000 mm/min
G92 E0 // Reset logical extrusion filament distance position to 0mm
G1 X100 E30 F600 // linear move from current x (5) to x=100 using
// 30 mm of filament, moving at 600 mm/min
G1 X120 E20.0 F5000 // linear move from current x (100) to x=120
// Wrong, in absolute extrusion mode, this value is 10mm less than the previous line making this a massive 10mm retraction -Danger much more can unload filament out of the gears and then you will never extrude.

Going further, this starting gcode fails to reset the logical extrusion distance to 0 to reset any filament used in the purge. Because you already went to 30mm, anything less E value is negative AKA retraction values or distances. You primed the extruder only to unprime it via the next lines of incorrect gcode. You won't even extrude anything until your print gcode, starting with some positive first line value above 0mm actually reaches + 30mm.

First rule of gcode- always undo what you do so that your are at a known state.
Example if you set a flow rate at the start of a print- ENSURE your ending geode then sets flow rate (M221) back to 100. Ideamaker defaults screw this up massively and ending default gcode never corrects it.

User avatar
ocelot27
Posts: 118
Joined: Sat Feb 02, 2019 4:39 pm
Location: Malvern, PA

Re: Dollop of rubbish at start of print

Postby ocelot27 » Sun Jun 30, 2019 7:45 pm

This is a good resource - I assume the Pro2 uses the same gcode interpretation as Marlin since the N series printers use Marlin - could be wrong but haven't noticed any differences yet:

http://marlinfw.org/meta/gcode/

I keep text files of useful gcode scripts that I use for different printers - that way if I change something I can copy and paste it anywhere.

This is what I use for two extruders - I always think of G92 E0 as "zeroing the extruder"... I also like the bracket thingies that let you plug in values from the template - that way if you change something in the template it gets changed in the start/stop/other gcode scripts. This will print two start lines, retract then start printing.

Pro2 Dual extrusion start (you can comment out or delete the blue text for a left extruder only print - you could also move the left only print prime line closer to the zero of the Y axis...)

G21
G90
M82
M107
G28 X0 Y0
G28 Z0
G1 Z5.0 F{travel_z_speed}
T1
G92 E0
G1 X30 Y5 Z0.25 F{travel_xy_speed}
G1 X120 E25 F600
G92 E0
G1 F1800 E-{extruder_switch_retraction_amount1}
G1 X130 F{travel_xy_speed}

T0
G92 E0
G1 X5 Y10 Z0.25 F{travel_xy_speed}
G1 X95 E25 F600
G92 E0
G1 F1800 E-{retraction_amount1}
G1 X105 F{travel_xy_speed}

G1 F{travel_xy_speed}; this is redundant not sure why I left it there...
M117 Printing...

User avatar
Vagulus
Posts: 79
Joined: Mon Mar 25, 2019 5:27 am

Re: Dollop of rubbish at start of print

Postby Vagulus » Mon Jul 01, 2019 5:55 am

Hi Jetguy

Thanks again for a very detailed response. Until someone writes "3D Printing GCode for Dummies" I, and the zillions of people like me, will have to rely on the good nature and patience of people like you. Please be assured, all of you, that it is appreciated.

Here are some questions which have arisen from replies to my posting.

1. In the examples given, some parameters are given in integer and some in decimal. Apparently this is interchangeable. What is the significance of using one integer in one command call then decimal in the following call to the same command?

2. Does the call to "M82" simply tell the compiler that extrusion material calls are independent and not relative to (increasing on or decreasing from) the previous call?

3. These lines in the code I posted in puzzle me:
G28 X0 Y0 // auto home to x-0, y=0
G28 Z0 // auto home to z=0
Would not the simple call
"G28"
home the extruder head in all axes? Is there some hidden danger here?

4. ocelot27 writes this process as
G28 X0 Y0
G28 Z0
G1 Z5.0 F{travel_z_speed}
My programming training pushes me to
G28 X0 Y0 Z0.25
given his next call to the Z parameter.
Does the single line do the full job? Is it incorrect for some other reason?

5. What does "G92 E0" do? Marlin's documentation says that the "E" parameter refers to "New extruder position" not "distance of incoming filament to be extruded". What does that mean? Does it refer to making the extruder active? What alternatives to "E0" are there?

6. In programming I tend to use lots (and lots, and lots, and ...) of in-line documentation (comments). In my earlier posting I used "/* ... */" and "// ..." for block and end-of-line comments. Is this practice valid in GCode?

7. In the code I cited there is the sequence
G1 X100 E30 F600 // linear move from current x (5) to x=100 using
// 30 mm of filament, moving at 600 mm/min
G1 X120 E20.0 F5000 // linear move from current x (100) to x=120
// using 20 mm of filament, moving at 5000 mm/min
What is the object here? It appears to be consecutive extrusions, one of 30 mm of filament over 95 mm at 600 mm/min followed by another of 20 mm of filament over 20 mm at 5000 mm/min. I can't get my head around that!

8. What does the command "G28 Z0" do? Does it leave the nozzle touching the Print Platform or does it return it to the preset 0.2 mm standard clearance?

9. Another confusion about absolute and relative modes for extrusion. Jetguy (in his latest post) notes:
G1 X100 E30 F600 // linear move from current x (5) to x=100 using
// 30 mm of filament, moving at 600 mm/min
G1 X120 E20.0 F5000 // linear move from current x (100) to x=120
// Wrong, in absolute extrusion mode, this value is 10mm less than the previous line making this a massive 10mm retraction -Danger much more can unload filament out of the gears and then you will never extrude.

Surely, if the second of these commands is in absolute mode (and it is) then it is an absolute statement and pays no attention to the existing E-value in memory. Hence the first code line says "extrude 30 mm" and the second code line says "extrude 20 mm". Are you saying that they are sequential?

10. ocelot27, is there any significance in the ways you finish purging each extruder differing? For T1 you call:
G1 F1800 E-{extruder_switch_retraction_amount1}
G1 X130 F{travel_xy_speed}
and for T0 you call:
G1 F1800 E-{retraction_amount1}
G1 X105 F{travel_xy_speed}

I am thinking that
G1 E-{retraction_amount1}
would suffice in both cases.

I know that that is a lot of questions to ask at once, but I would wind up asking them at some stage anyway. It's like what my nurse said when she was taking off the plaster, "How would you like it? One loud shriek or a series of low groans?" :shock:

Thanks people
--------------------------------------------
God so loved the World that
He did not send a Committee

Jetguy
Posts: 2813
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: Dollop of rubbish at start of print

Postby Jetguy » Mon Jul 01, 2019 12:24 pm

I will answer each of your questions individually, but first let me just give you a starter reply while I have time this morning.

On homing. G28 and most commands, you still seem to not be getting this syntax.
The format generally is command number, Axis the command applies to, Values for each axis, Feedrate, any other switches or parameters.
In the case of homing, think about the mechanics. On feature of the N series that has both pros and cons to discuss another day is that the XY homed position of he nozzle actually clears over the edge of the bed surface when homed. So I ask you, why would one home XY first to park the nozzles out of the way over the bed, before commanding the bed to rise? Giant hint- that's why they are using separate commands.
So yes, G28 with no parameters specified homes all 3 axis (note again, exception, E axis does not have a limit switch so firmware knows G28 doesn't apply or work with E) and again, no parameter, we assume it also internally executes a G92 with X0 Y0 Z0.

Part 2 of that is, again, I stated how G28 actually works.
G28 is a command to move the axis to the limit switch and stop when it hits the limit switch. Depending on the firmware is how the second part of that action works. Because you start at a random unknown position anywhere along each axis, it's a random position number in logical "I am here" memory position. In some firmware, all g28 does is move the axis to the limit switch. In other firmware it assumes that limit switch is at a distance logical coordinate value so the firmware then basically applies a G92 "overwrite I am here with this new coordinate. As shown in the syntax statement, it's also possible to overwrite what a firmware action default might be by specifying a new value for the built in G92 function as the last step in the command. Example most of the time is G28 Z0. Technically you could make it G28 Z100 and the the printer thinks it's at Z100, not Z0.

However, no, you would not want to combine commands and no do not confuse a new movement G0 command or G1 command.

You still do not understand absolute VS relative and seem to have it backwards.
Absolute commands read a line of movement gcode as the value in the line is the logical 3D coordinate is absolute.
G1 X100 means I want to go to logical coordinate position X100

Let me see if I can add some word play to this:
I tell you to go to 3rd street VS I tell you to go to the 3rd street.
Absolute= go to 3rd street- a street named 3rd street, you are now at position 3rd street at the end of completing this command
Relative= go to the 3rd street relative to where you are now. You end up at whatever street you started from +3 at the end of this command

Relative command distance mode read the same line of gcode differently.
G1 X100 in relative mode means I move X+100 (because there isn't a minus sign in front of the value, relative to where I am now).

Put another way:
If I'm at position X100
I then give the command G1 X100
In absolute mode, I'm already at X100, the printer does nothing
In relative mode, it reads that same G1 command and moves an additional X+100mm from where it is currently.

To get to your example, let's again make sure we understand E axis AKA the extruder motor.
It's just like the other axis XYZ in that all movements are distances, but what we are moving is pushing or pushing the linear length of wire filament into or pulling is backwards out of the nozzle and hotend system and it's based on distance in mm just like every other axis. Yes, distance values can be integer or decimal. Again, all axis use MM unless the command to switch to other unit is specified in startup.

So back to your example, because you didn't understand absolute positioning commands you got tripped up.
G92 E0 tells the extruder E axis "I am here" logical distance position to be 0 (this assumes you have filament loaded in the gears and is currently pushed clear down to th nozzle (done before you ever started the print). Just trying to make sure you understand all basic parameters around this.
Next line is G1 E30. I can specify a feedrate or default, but we are focussing on understanding distance so again, E30 commands a forward feed of 30mm of filament pushed into the nozzle. Key understanding, at the end of this command, the firmware knows it's at position E=30mm
The next line was G1 E20 The problem with that line is 20 is less than the previous 30. We were at E=30mm we read this line as "go to distance position 20mm" in absolute mode. As such 20mm is less than 30mm the filament will move backwards up and out of the hotend.
Again, the firmware moves the filament to position 20mm, not 20mm more than the previous position.

Maybe I confused you with previous wording in my earlier reply. I am sorry if that aided your confusion. I used words like doesn't care, implying that the current position value could be any number, you are moving relative to that position.
Relative positioning
Absolute positioning

Relative- the line of gcode is a move relative to your current position.
Absolute- the line of gcode is read as "the" target coordinate being commanded AKA move to logical position X100
Last edited by Jetguy on Mon Jul 01, 2019 1:08 pm, edited 3 times in total.

Jetguy
Posts: 2813
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: Dollop of rubbish at start of print

Postby Jetguy » Mon Jul 01, 2019 12:50 pm

Also, as if that all wasn't confusing enough.

Conventions- they kill us, but that's the world we live in right?
Z0 should be the nozzle kissing the bed surface.
We mechanically adjust the limit AKA homing switch of Z axis to leave an approximate 0.2mm gap.
We still home and tell the coordinate system Z0 is Z0 however, there is a slight gap.
A movement command of Z axis moves the bed lower increasing the gap so anything greater than Z0 adds to the gap.

It's a minor discrepancy, but it's there.
Some slicers then put logical layer 1 at Z0
Other slicers know that layer 1 has thickness, so they include a z axis motion to raise the nozzle vs bed gap the layer height.

Hint- why Simplify 3D print files appear to be too high of a gap on first layer.....

User avatar
ocelot27
Posts: 118
Joined: Sat Feb 02, 2019 4:39 pm
Location: Malvern, PA

Re: Dollop of rubbish at start of print

Postby ocelot27 » Mon Jul 01, 2019 1:34 pm

The reason I added that little rise to 5mm is that there is often a bit of ooze from the warm up - this sticks to the bed during the Z axis zero command and then the nozzle lifts up away from it... most of the time. You could just as well leave it out - you have to watch the whole process, think about the commands and the sequence and make adjustments from there. You may want to shorten the prime line or increase the amt of filament that is extruded over that distance to make a wider line etc etc etc.

The actual part print starts with T0 so I just do a standard retraction as that's the first extruder that's going to be used. Retracting more on the right nozzle (T1) prevents it from oozing while the left (T0) nozzle is printing its first layer - you need to retract more because the nozzle is going to lift shortening the length of the filament path - this will effectively push the filament back into the nozzle and cause ooze with a short retraction like 1.5mm.

-john

Jetguy
Posts: 2813
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: Dollop of rubbish at start of print

Postby Jetguy » Mon Jul 01, 2019 1:40 pm

3. These lines in the code I posted in puzzle me:
G28 X0 Y0 // auto home to x-0, y=0
G28 Z0 // auto home to z=0
Would not the simple call
"G28"
home the extruder head in all axes? Is there some hidden danger here?

4. ocelot27 writes this process as
G28 X0 Y0
G28 Z0
G1 Z5.0 F{travel_z_speed}
My programming training pushes me to
G28 X0 Y0 Z0.25
given his next call to the Z parameter.
Does the single line do the full job? Is it incorrect for some other reason?


Again, the rules. A line of gcode is read one at a time and completes that command before the next line command is executed.
G28 XY only moves X and Y and leaves Z stopped at current position
The G28 Z command will not be executed until all actions of the previous command have completed.
You may also notice, the G28 command is complex motion- it moves relatively fast until it hits the limit switch, then backs up a known distance, then slowly hits the limit switch a second time. This is because when moving fast, between the board reacting to and stopping the after the limit switch was reached, the axis keeps moving for a short time past the initial limit switch contact point. As such, if the nozzle was in the middle of the bed, and you rapidly raise Z, and it overshoots the limit switch thus bumping the glass bed into the nozzle.
By first parking XY and thus the nozzles at X0 Y0, they mechanically are over the corner of the bed.
Then Z can rise and home and even if it overshoots ever so slightly, not bump the nozzles.

G28 X0 Y0
G28 Z0
G1 Z5.0 F{travel_z_speed}

VS
My programming training pushes me to
G28 X0 Y0 Z0.25


The two are totally different commands and resulting positions
We'll focus on the Z axis.
G28 Z0 // Home and move Z axis to the limit switch and call this logical position Z0
G1 Z5.0 F{travel_z_speed} //Move Z axis to logical position Z=5mm
You home to hit the limit switch, this parks the bed at the limit switch
Next line commands a Z move to Z=5mm thus moving the bed down 5mm from the nozzles and limit switch.

VS
My programming training pushes me to
G28 X0 Y0 Z0.25
Home all axis at the same time, potential for nozzle crash, coupled with instead of telling Z axis we are at 0mm when parked at the limit switch, we are actually at Z=0.25mm

Not the same thing. Not even close.

User avatar
Kfleck
Posts: 18
Joined: Thu Sep 27, 2018 5:22 pm

Re: Dollop of rubbish at start of print

Postby Kfleck » Mon Jul 22, 2019 9:47 pm

Thanks for the in-depth look.

"G1 X120 E20.0 F5000 // linear move from current x (100) to x=120
// Wrong, in absolute extrusion mode, this value is 10mm less than the previous line making this a massive 10mm retraction -Danger much more can unload filament out of the gears and then you will never extrude."

I put the 10mm of retraction because the right extruder was leaving a huge blob as it started it's first layer. 10mm seems to be the magic number for my printer to not leave that blob and start the first layer right. I didn't know you could put negative numbers in the code. I'll have to look into that.
Thanks
Raise 3d Pro 2, IdeaMaker


Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests