Welcome! Log In Create A New Profile

Advanced

Error message while compiling Marlin for auto-leveling

Posted by dtiger1138 
Error message while compiling Marlin for auto-leveling
August 03, 2015 11:28PM
I've just put an autoleveling rig on my printer. I had been following ZenmasterM's guides on youtube, Part 3 of Guide. Part 3 is where you figure out what the offset is for the switch and the nozzel, then enter it into Marlin's cofiguration.h file. I did this and got a "floating constant in preprossor expression" error. I followed all the directions in the guide, and I'm unsure of what to do now. I am using the most recent version of Marlin, and Arduino IDE. The 2 screen grabs below show:
the error while trying to verify and compile,


and what the offset was determined as in Ponterface.


Any suggestions on how to correct this issue will be greatly appreciated. I don't want to have to change everything back to doing the manual bed leveling.

Thank you
dtiger
Re: Error message while compiling Marlin for auto-leveling
August 04, 2015 06:48PM
There is no way your probe could be Y -.10 mm from your hot end.

I suggest you revisit how you came by that number.

it is the position of the probe in relation to the nozzle tip.

So, usually you mount the probe to the side, and in front or back of the nozzle.
Re: Error message while compiling Marlin for auto-leveling
August 04, 2015 08:12PM
Sure it can! Directly to the right or left of the nozzle in line with it is X=+/-number, Y=0.

- Tim

Edited 1 time(s). Last edit at 08/04/2015 08:12PM by tadawson.
Re: Error message while compiling Marlin for auto-leveling
August 10, 2015 12:16PM
Quote
thetazzbot
There is no way your probe could be Y -.10 mm from your hot end.

I suggest you revisit how you came by that number.

it is the position of the probe in relation to the nozzle tip.

So, usually you mount the probe to the side, and in front or back of the nozzle.

I used E3D V6 Wowden mount with servo to mount my set up. That's where the switch ended up. I just got back from a vacation and I was planning on trying to use -0.0 to see if that would work.

Thank you
Re: Error message while compiling Marlin for auto-leveling
August 10, 2015 12:35PM
is your hotend 0.1mm behind the nozzle, just make it 0, and if you get problem with x, make that 30, the decibel can be your problem, it was in my case, only on z it will accept decibel, mine is 0.7mm, I just made it 1 and all works well. also if you get problem with it printing in mid air, comment out #define Z_RAISE_AFTER_PROBING, in the slicer g-code, whichever you using, instead of having just G28, make it

G28 X0 Y0; Home extruder

then add these under it, leave the rest if you have no other changes you want to make to the start g-code
G28 Z0
G29
G1 X0 Y0 F4000
G1 Z.2

Edited 2 time(s). Last edit at 08/10/2015 12:38PM by deaconfrost.
Re: Error message while compiling Marlin for auto-leveling
August 13, 2015 01:13PM
Quote
deaconfrost
is your hotend 0.1mm behind the nozzle, just make it 0, and if you get problem with x, make that 30, the decibel can be your problem, it was in my case, only on z it will accept decibel, mine is 0.7mm, I just made it 1 and all works well. also if you get problem with it printing in mid air, comment out #define Z_RAISE_AFTER_PROBING, in the slicer g-code, whichever you using, instead of having just G28, make it

G28 X0 Y0; Home extruder

then add these under it, leave the rest if you have no other changes you want to make to the start g-code
G28 Z0
G29
G1 X0 Y0 F4000
G1 Z.2

Thank you for the input. I did have to remove the decimals for the X and Y. But when I tried a print, it was to high. I looked for the #define Z_RAISE_AFTER_PROBING, and couldn't find it. It wasn't in the g-code or marlin. Also, this is what is in Slic3r for the start g-code:
G28 ; home all axes
G29 ; auto level
G1 Z10 F1000 ; lift nozzle

I have tried the settings you recommended, and the hot end is lower then the 1st try, but it is still to far from the bed.

Edit 2: I tried it with the G1 Z.2 setting at G1 Z0 and everything went down hill. When it went to do be bed leveling, the arm with the switch dropped, then went back up, and moved up wards on the Z axis. It did the same thing with a G28 command. I tried a G28 in Ponterface with the same result. I'm totally lost here.

Thank you

Edited 2 time(s). Last edit at 08/13/2015 03:24PM by dtiger1138.
Re: Error message while compiling Marlin for auto-leveling
August 13, 2015 07:37PM
which marlin you using? I'm using 1.1

maybe try 1.1 I tried other version this is the only one worked best for me

here's my config you can maybe you find something useful, or attached your configuration.h and I have a look for you

Configuration.h

Edited 1 time(s). Last edit at 08/13/2015 07:37PM by deaconfrost.
Re: Error message while compiling Marlin for auto-leveling
August 13, 2015 09:16PM
I've been using the most recent marlin or what I thought was the most recent from their github, 1.0.2. I've attached the configuration.h file.
Now this gets annoying. I just turned it all on, and ran a G28 through ponterface, and it worked. Going to try another print, I use repiter for that and slic3r. Using the recent versions of those, 1.5.4 and 1.2.9 respectively.

Thank you
Attachments:
open | download - Configuration.h (35 KB)
Re: Error message while compiling Marlin for auto-leveling
August 13, 2015 09:46PM
your config looks fine, 1.0.2 don't have #define Z_RAISE_AFTER_PROBING, I tried it before I use 1.1, I use repiter and slic3r aswell, I was using cura first but slic3r seems to do a better job on my prints, in sli3r here's my G-code for ABS

G21
G90
M82
G28 X0 Y0
G28 Z0
G29
G1 X0 Y0 F4000
G1 Z.2
M104 T0 S100
M109 T0 S230

if you still have trouble, I would say give 1.1 a try, all settings same as you have it now, just comment out #define Z_RAISE_AFTER_PROBING, that should work for you everytime, it works for me every time anyway, and I've never printed anything as smooth as I can now before as my acrylic y carriage just gone too soft and bends itself instead of pulling the bed down

p.s. you may want to just do a manual G29 or G28 X0 Y0 then G20 Z0 then G1 Z.1 and check it with a piece of paper, then adjust z offset in firmware if needed, I did a couple times and all good after that.

one last thing is, if you notice the Z isn't moving down after probing, you may want to change
you usually hear the Z motors making humming sound but not moving

#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 25} // (mm/sec)

to

#define DEFAULT_MAX_FEEDRATE {500, 500, 3, 25} // (mm/sec)

Edited 4 time(s). Last edit at 08/13/2015 09:54PM by deaconfrost.
Re: Error message while compiling Marlin for auto-leveling
August 14, 2015 01:18AM
I'm about ready to bang my head against the wall. What's happening now is that I do a G29 or a G20 Z0 command, and nothing moves. I've recompiled marlin, and uploaded it. I even tried Marlin 1.1 and had the same result. Almost seriously considering going back to manually doing things. It worked once I had gotten it set up, as in it would do the commands, but now, it doesn't.

Update:
In Ponterface - G29 results in echo:Home X/Y before Z
So I do a G28 X0 Y0, and it works. But then get the same response from a G29 again, or nothing with a G20 Z0. And I haven't changed anything in the configuration.h file from when I first had it working.

Ideas?

Edited 1 time(s). Last edit at 08/14/2015 01:26AM by dtiger1138.
Re: Error message while compiling Marlin for auto-leveling
August 14, 2015 02:01AM
G20 is wrong, it was a typo a few answers back
I guess using G28 instead will work.
-Olaf
Re: Error message while compiling Marlin for auto-leveling
August 14, 2015 06:33AM
Oh crap I'm sorry I did have a type on G20 instead of G28 on my last reply on one count. But still doesn't make sense that nothing moves..... But there should be no problem if you home X Y then G29...

Just a note though, yesterday morning, my custom G-code in sli3r dissappeared on its own.... When I click start, it didn't auto level, went to check the problem and found the custom start code was emptied.... No idea what happened but I put them back in and been working again since.

What happens if you click the home all button in repetier instead of individual homing?

Edited 1 time(s). Last edit at 08/14/2015 06:39AM by deaconfrost.
Re: Error message while compiling Marlin for auto-leveling
August 14, 2015 01:05PM
Quote
deaconfrost
What happens if you click the home all button in repetier instead of individual homing?

I actually tried that yesterday. One of the last things I did. It tried to home Z with out the servo and endstop, as if it was mounted on the rail without the auto leveling set up. Pushed the nozzel into the bed. Gonna give it a try again today, I'll update this with what happens

Update:
Weird things happening. Try G29, nothing, then home the x and y, Then g29 works. Do a G1 Z.1, fails the paper test. ok that was in repiter. try ponterface, G29 - nothing, do a G28 x0 y0, and it homes all 3 axis (x, y, z) Ok... do the g1 z.1, same result, move back to repiter, and I get nothing for anything that involves the z axis (switched back to this due to the finer controls on axis movement). Ok, back to ponterface and did this (notes on the side):

>>>G29 The G29 failed so I tried to do Home the X and Y.
SENDING:G29
echo:Home X/Y before Z
>>>G28 X0 Y0
SENDING:G28 X0 Y0 This worked.
>>>G28 Z0 Try to home the Z and got this error, wtf?
SENDING:G28 Z0
echo:Z probe out. bed
>>>G29 What the hell, try a G29. and it worked. Huh?
SENDING:G29
Bed x: 50.00 y: 50.00 z: 4.06
Bed x: 150.00 y: 50.00 z: 4.31
Bed x: 150.00 y: 150.00 z: 4.31
Bed x: 50.00 y: 150.00 z: 4.13
Eqn coefficients: a: 0.00 b: 0.00 d: 3.95
planeNormal x: -0.00 y: -0.00 z: 1.00
echo:endstops hit: Z:4.13
>>>G29 Had to do it again, because I had a peice of paper on the bed.
SENDING:G29
Bed x: 50.00 y: 50.00 z: 4.18
Bed x: 150.00 y: 50.00 z: 4.51
Bed x: 150.00 y: 150.00 z: 4.59
Bed x: 50.00 y: 150.00 z: 4.28
Eqn coefficients: a: 0.00 b: 0.00 d: 3.98
planeNormal x: -0.00 y: -0.00 z: 1.00
echo:endstops hit: Z:4.28
>>>G1 Z.1 Did this and failed the paper test, moved the bed and did again, same result. Wanted to confirm that the gap was the same.
SENDING:G1 Z.1
>>>G1 Z.1
SENDING:G1 Z.1

In ponterface, I had to move the Z from +0.1 to -0.3. So that's a difference of 0.4, in otherwords the nozzel is 0.4mm higher then the printer thinks it is. My current offset is at 4.26, so I need to change this to 4.66. Well that's what I plan on trying at least. seems to make sense, Just trying to confirm the logic

Edited 1 time(s). Last edit at 08/14/2015 02:12PM by dtiger1138.
Re: Error message while compiling Marlin for auto-leveling
August 14, 2015 04:54PM
yep thats what I did to get my nozzle right at the bed after probing, adjust in z offset

Z probe out. bed means your offset is set wrong, either x or y
Re: Error message while compiling Marlin for auto-leveling
August 14, 2015 05:04PM
Well, did a test print and it worked fine. only thing was I didn't make sure to extrude some filament before running, but it still came out fine.

When I ran just a normal G28, it worked fine. everything moved to the center of the bed to 0 the Z. But when I got that error, it was right after 0ing the X and Y. Might that be the reason?

This was all with marlin 1.0.2. Just gonna make sure this working right, then I'll try 1.1. Want to make sure I have something to fall back on.

Thanks for all the help.
Re: Error message while compiling Marlin for auto-leveling
August 14, 2015 06:17PM
you should be able to do home x y first then 0 Z at 0 position or anywhere you move the z after x y been home, I can drop the z anywhere I like once I home x y first then move it around and drop wherever, but at least you got t to print that's good news

Edited 1 time(s). Last edit at 08/14/2015 06:18PM by deaconfrost.
Re: Error message while compiling Marlin for auto-leveling
August 15, 2015 02:02AM
in configuration.h :
#define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
                          // When defined, it will:
                          // - Allow Z homing only after X and Y homing AND stepper drivers still enabled
                          // - If stepper drivers timeout, it will need X and Y homing again before Z homing
                          // - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
                          // - Block Z homing only when the probe is outside bed area.

in configuration_adv.h :
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing

Check these settings, they may be responsible for the " z-probe out of bed" error you got. Chances are, marlin doesn´t know the X0-Y0 is in the center of the bed.
-Olaf

PS: regarding Marlin 1.1: I tried to find this branch on github, but only found a directory called 1.1 where v1.03 was found?

Edited 1 time(s). Last edit at 08/15/2015 02:04AM by o_lampe.
Re: Error message while compiling Marlin for auto-leveling
August 15, 2015 06:19AM
I'll attach 1.1 when I get to my laptop
Re: Error message while compiling Marlin for auto-leveling
August 15, 2015 11:04AM
I ended up changing the G-code for start up to include a standard G28, and it homed all axis fine. I'll check those settings. Thank you o_lampe.

I did a test print to calibrate my steppers for the axis. Then on the 2nd print, got a nozzel jam. Now they are sitting in the acetone.

Deaconfrost, I tried to beat you too it. Marlin 1.1 zip is a little to big. 1.03 is the last official release, 1.1 is in development. I tried to find the link, but must go to work.

Thanks guys.
Re: Error message while compiling Marlin for auto-leveling
August 15, 2015 05:38PM
heres 1.1 I configured for Folger Tech i3 smiling smiley

its not that big smiling smiley

Marlin 1.1 Folger Tech i3
Re: Error message while compiling Marlin for auto-leveling
August 17, 2015 08:32AM
It's telling you that you can't use a decimal for the Y value offset, it needs to be a whole number. Just make it 0.
Sorry, only registered users may post in this forum.

Click here to login