Welcome! Log In Create A New Profile

Advanced

Error message when configuring auto bed leveling

Posted by Picodeguyoh 
Error message when configuring auto bed leveling
February 29, 2016 09:11AM
#elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION #error FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION.

exit status 1
missing binary operator before token "#"



No matter what I try I keep getting the same error Please someone explain before I loose my hair :-)
Re: Error message when configuring auto bed leveling
February 29, 2016 02:46PM
Fix the probe position for the front to be a lower value than what is for the rear. The probe offsets also affect this.

These are the defines that are causing the error:
#define FRONT_PROBE_BED_POSITION 10
#define BACK_PROBE_BED_POSITION 170

Adjust the values to keep the probe inside the bed. The numbers shown happen to be what I'm using.

Edited 1 time(s). Last edit at 02/29/2016 02:47PM by stephenrc.
Re: Error message when configuring auto bed leveling
March 01, 2016 08:03AM
Yeah...I have that setup..but still get the error. Ok, I am posting the complete error message then I will post up my settings and see if you can see whats wrong. Hopefully that will be helpful in resolving this problem.

Error message that I get:

In file included from sketch\Configuration_adv.h:601:0,

from sketch\Configuration.h:856,

from C:\Users\3D Printer\Downloads\Marlin-RC (2)\Marlin-RC\Marlin\Marlin.ino:33:

SanityCheck.h:174: error: missing binary operator before token "#"

#elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION #error FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION.

^

exit status 1
missing binary operator before token "#"

Ok, now for my settings:

//===========================================================================
//============================ Bed Auto Leveling ============================
//===========================================================================

// @section bedlevel

#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
//#define DEBUG_LEVELING_FEATURE
#define Z_MIN_PROBE_REPEATABILITY_TEST // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.

#if ENABLED(AUTO_BED_LEVELING_FEATURE)

// There are 2 different ways to specify probing locations:
//
// - "grid" mode
// Probe several points in a rectangular grid.
// You specify the rectangle and the density of sample points.
// This mode is preferred because there are more measurements.
//
// - "3-point" mode
// Probe 3 arbitrary points on the bed (that aren't colinear)
// You specify the XY coordinates of all 3 points.

// Enable this to sample the bed in a grid (least squares solution).
// Note: this feature generates 10KB extra code size.
#define AUTO_BED_LEVELING_GRID

#if ENABLED(AUTO_BED_LEVELING_GRID)

#define LEFT_PROBE_BED_POSITION 30
#define RIGHT_PROBE_BED_POSITION 140
#define BACK_PROBE_BED_POSITION 140
#define FRONT_PROBE_BED_POSITION 30

#define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.

// Set the number of grid points per dimension.
// You probably don't need more than 3 (squared=9).
#define AUTO_BED_LEVELING_GRID_POINTS 2

#else // !AUTO_BED_LEVELING_GRID

// Arbitrary points to probe.
// A simple cross-product is used to estimate the plane of the bed.
#define ABL_PROBE_PT_1_X 15
#define ABL_PROBE_PT_1_Y 180
#define ABL_PROBE_PT_2_X 15
#define ABL_PROBE_PT_2_Y 20
#define ABL_PROBE_PT_3_X 170
#define ABL_PROBE_PT_3_Y 20

#endif // AUTO_BED_LEVELING_GRID

// Offsets to the Z probe relative to the nozzle tip.
// X and Y offsets must be integers.
#define X_PROBE_OFFSET_FROM_EXTRUDER -24 // Z probe to nozzle X offset: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER 30 // Z probe to nozzle Y offset: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -5.1 // Z probe to nozzle Z offset: -below (always!)

#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
// Be sure you have this distance over your Z_MAX_POS in case.

#define XY_TRAVEL_SPEED 5000 // X and Y axis travel speed between probes, in mm/min.

#define Z_RAISE_BEFORE_PROBING 10 // How much the Z axis will be raised before traveling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 10 // How much the Z axis will be raised when traveling from between next probing points.
#define Z_RAISE_AFTER_PROBING 15 // How much the Z axis will be raised after the last probing point.

//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
// Useful to retract a deployable Z probe.

//#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.


//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!

#define Z_SAFE_HOMING // This feature is meant to avoid Z homing with Z 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 Z probe in a defined XY point before Z Homing when homing all axis (G28).
// - Block Z homing only when the Z probe is outside bed area.

#if ENABLED(Z_SAFE_HOMING)

#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).

#endif
Re: Error message when configuring auto bed leveling
March 01, 2016 12:00PM
I don't see any problems in the section you posted.

Looks like you may have a missing # somewhere. If you download a fresh copy of Marlin, does it compile fine? If it does, uncomment just the auto bed level and try again. If it works, then do the other settings you need. Checking to see if it compiles after a change or two. Compiler errors can be a pain since errors always result in errors from errors.
Re: Error message when configuring auto bed leveling
March 01, 2016 09:14PM
The # in preprocessor macros has double meaning. First it is used in #include #if etc. It is also string concatenation.
Are you sure your SanityCheck.h has line 174

#elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION #error FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION.

It should be (from github):
#elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION
#error FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION.

Take the newline off and write it again to be sure there isn't any fancy UTF-8 or non native newlines. or add another just to be sure. But I really don't see either why that would fail.
Re: Error message when configuring auto bed leveling
March 01, 2016 11:44PM
Thanks guys! Started with a new Marlin download and just put my settings in it and it loaded just fine. The only thing I can think of is maybe I accidentally deleted the "#" and did not see that I did. Thanks again for all your help. I now have a working dual extruder 3D printer. thumbs up
Sorry, only registered users may post in this forum.

Click here to login