Results 21 to 30 of 89
-
04-28-2014, 08:09 PM #21
- Join Date
- Oct 2013
- Location
- South Australia
- Posts
- 50
I have an error on compiling.
Marlin_main.cpp: In function 'void run_z_probe()':
Marlin_main.cpp:921: error: 'do_blocking_move_relative' was not declared in this scope
Section of code.
static void run_z_probe() {
plan_bed_level_matrix.set_to_identity();
feedrate = homing_feedrate[Z_AXIS];
// move down until you find the bed
float zPosition = -10;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder);
st_synchronize();
current_position[Z_AXIS] = st_get_position_mm(Z_AXIS);
// make sure the planner knows where we are as it may be a bit different than we last said to move to
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
SERIAL_PROTOCOLLNPGM( "At end of run_z_probe() raising nozzle." );
do_blocking_move_relative( 0.0, 0.0, (float) Z_RAISE_BETWEEN_PROBINGS );
SERIAL_PROTOCOLLNPGM( "At end of run_z_probe() done raising nozzle." );
}
static void do_blocking_move_to(float x, float y, float z) {
float oldFeedRate = feedrate;
feedrate = XY_TRAVEL_SPEED;
current_position[X_AXIS] = x;
current_position[Y_AXIS] = y;
current_position[Z_AXIS] = z;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate/60, active_extruder);
st_synchronize();
feedrate = oldFeedRate;
}
static void do_blocking_move_relative(float offset_x, float offset_y, float offset_z) {
do_blocking_move_to(current_position[X_AXIS] + offset_x, current_position[Y_AXIS] + offset_y, current_position[Z_AXIS] + offset_z);
}
static void setup_for_endstop_move() {
saved_feedrate = feedrate;
saved_feedmultiply = feedmultiply;
feedmultiply = 100;
previous_millis_cmd = millis();
enable_endstops(true);
}
static void clean_up_after_endstop_move() {
#ifdef ENDSTOPS_ONLY_FOR_HOMING
enable_endstops(false);
#endif
feedrate = saved_feedrate;
feedmultiply = saved_feedmultiply;
previous_millis_cmd = millis();
}
-
04-28-2014, 10:15 PM #22
My bad...
But it isn't my fault. This is one of those times life isn't fair. Scroll down 5 or 6 lines... That is where the definition for do_blocking_move_relative() is. A simple quick fix would be to cut and past the do_blocking_move_relative() function up above run_z_probe(). Then it will be declared when run_z_probe() needs to reference it. Its a shame to mess up the order of things, but if you want to keep making forward progress... That will do it. (But I have to get some sleep!!!! I'll check back in the morning.)Last edited by Roxy; 04-28-2014 at 10:19 PM.
-
04-28-2014, 11:35 PM #23
- Join Date
- Oct 2013
- Location
- South Australia
- Posts
- 50
-
04-29-2014, 08:11 AM #24
Here is the 'right' way to fix that forward reference issue that is keeping it from compiling. It is literally a one line fix.
Make the declaration for run_z_probe() have the forward declaration for do_blocking_move_relative() just in front of it.
Usually there is a header file where this would go, but the best place to put this is just in front of the run_z_probe() function so it stays close to where it is needed. That way all the changes are together if you need to move your changes to a more current code base in the future. This time I actually changed my code to verify it would compile! (and then changed it back)
With these changes the run_z_probe() function knows everything about do_blocking_move() that it needs to know. It knows what type (and how many) parameters it takes and it knows what type (none) of value it returns. The compiler can generate a 'call' to the function even though it doesn't know what the function looks like yet.
#endif // AUTO_BED_LEVELING_GRID
static void do_blocking_move_relative(float , float , float ) ; // New line to fix forward reference issue
static void run_z_probe() {
plan_bed_level_matrix.set_to_identity();
feedrate = homing_feedrate[Z_AXIS];
Last edited by Roxy; 04-29-2014 at 08:32 AM.
-
04-29-2014, 10:06 AM #25
- Join Date
- Oct 2013
- Location
- South Australia
- Posts
- 50
OK, done that and tried it oiut.
Nozzle really lifts high now ha..ha..
Here is a printout of what appeared on the screen as it was working.
Printer is now online.
echo:Home X/Y before Z
At end of homeaxis(Z) raising nozzle.
At end of homeaxis(Z) done raising nozzle.
SENDING:G29
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
Bed x: 1.00 y: 1.00 z: 6.92
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
Bed x: 158.00 y: 1.00 z: 4.12
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
Bed x: 158.00 y: 160.00 z: 4.15
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
Bed x: 1.00 y: 160.00 z: 6.53
Eqn coefficients: a: -0.02 b: -0.00 d: 6.84
planeNormal x: 0.02 y: 0.00 z: 1.00
echo:endstops hit: Z:-3.47
I haven't tried a print yet, it is nearly 1.00 am here in Australia, so I am off to the shower and then to bed. Will have another look at it ion the morning (later in the morning)
Thanks for all your effort, much appreciated.
-
04-29-2014, 10:20 AM #26
OK... Well, that was intentional... I would wait until everything else checks out, but you can change that equate from 10mm to 1mm or 2mm when you are ready.
And I would leave them in for now, but eventually you will want to delete that extra chit-chat about where the code is executing and what it is doing. That just clutters up the display. That was in there just to help with debugging if the firmware went crazy.
If you got all the way through the G29 probes without an issue, we might be close. I just noticed, you have a 2.5 mm slope to your bed???? I'm guessing that is on purpose?
I'm sorry I was so tired last night. I couldn't stand to sit at my computer and try to get everything accurately typed in. This working back and forth across the globe really slows things down!
It may be we can handle the Z-Probe triggering during a print with just a few changes to the configuration.h file. I don't know about that yet. I guess the right thing to do is just wait until you print a part and see what happens ????
And once all that is taken care of... It would be good for you to visit this thread:
http://3dprintboard.com/showthread.p...2518#post12518
And add the M48 command to your Marlin_Main.CPP file. With that you will be able to measure the repeatability of your Z-Probe to know if the mechanics are working well. Probably you are going to get the best numbers we have seen so far.Last edited by Roxy; 04-29-2014 at 10:37 AM.
-
04-29-2014, 11:08 PM #27
- Join Date
- Oct 2013
- Location
- South Australia
- Posts
- 50
Tried it out and left all the messages in so could see what is happening.
SENDING:G1 Y0 F4000 X0 F4000
At end of homeaxis(Z) raising nozzle.
At end of homeaxis(Z) done raising nozzle.
SENDING:G1 Y0 F4000 X0 F4000
SENDING:M48
M48 Z-Probe Repeatability test. Version 1.85
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
At end of run_z_probe() raising nozzle.
At end of run_z_probe() done raising nozzle.
Mean: 11.120100
Standard Deviation: 0.005024
echo:endstops hit: Z:6.12
Should be better with the new setup that I haven't fitted yet. I thought of some other hardware design changes, so I am printing those while re-building.
Should have the new hardware all setup within a few days.
-
04-30-2014, 07:08 AM #28
We don't have a lot of numbers yet, but .005 is pretty good! You will get very good bed leveling with that number. Do you have a high quality micro switch installed? I don't know this for sure yet, but if you actually installed a Micro-Switch branded micro-switch, you probably get the best numbers you can get.
-
04-30-2014, 07:27 AM #29
- Join Date
- Oct 2013
- Location
- South Australia
- Posts
- 50
I just got a micro switch from ebay like you did. I have been looking at Farnell's they have a range of Honeywell switches and you can select the pressure that you need. I will see if I can find one that is very sensitive and affordable, because the price range goes from less than a dollar to several hundred dollars (go figure??)
Bed time again. can't stay up as late as I did last night, I really felt it today.
-
04-30-2014, 07:52 AM #30
Did you get through a print with the new setup? Any problems?
Ender 3v2 poor printing quality
10-28-2024, 09:08 AM in Tips, Tricks and Tech Help