Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBL Branch testing on ML2 FreeFab3d #4421

Closed
fr33dimension opened this issue Jul 27, 2016 · 76 comments
Closed

UBL Branch testing on ML2 FreeFab3d #4421

fr33dimension opened this issue Jul 27, 2016 · 76 comments

Comments

@fr33dimension
Copy link

I am new to mesh abl, but I am using save to Eeprom ABL for years now with a proximity sensor.
What I noticed after successfully flashing and running a G29 P1, that it doesn't appear to save the matrix to eeprom. What am I missing

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 27, 2016

You can do a G29 W to see what it says.

But the way the system is organized, you have a Mesh in memory. That is where you build and edit it. But it is in memory until you save it. Depending on the Mesh size you have declared, and how much EEPROM you have, you get to save more or less different Mesh's.

If you do a G29 P1 M and let it sample a few points, then stop it by holding the Encoder Wheel pressed. You can do a G29 M and see the Mesh at it's current state. Then do a G29 S 0 and it should save.
Reset your machine, and the last selected (saved) Mesh should be automatically loaded. Do a G29 M and you should see it in the same state as when you saved it (even though you reset the machine).

You can then continue on, and add more detail or refinement to your Mesh. Do a G29 M to see it in its current state. Then do a G29 S1 (which saves it at storage location 1). Reset the machine. Do a G29 M and you should see that it is automatically loaded and just as it was before you reset the machine.

As you build and refine your Mesh, save it occasionally. And make use of the multiple storage locations so if you change your mind or make a mistake, you can back up to a previous good point in time.

You want to get the whole Mesh populated with values, but not worry too much about them being exact. The G26 Mesh Validation tool (in combination with G29 P4 R M) will help you dial in any Mesh Points that are not super accurate.

@fr33dimension
Copy link
Author

fr33dimension commented Jul 27, 2016

G29 W
21:17:49.138 : Mesh invalidated.  Probing mesh.
21:25:23.482 : echo:Settings Stored (263 bytes)
21:27:37.146 : Unified Bed Leveling System Inactive.
21:27:37.187 : Mesh: FFFF Loaded.
21:27:37.191 : G29_Correction_Fade_Height : 10.00
21:27:37.334 : Free EEPROM space starts at: 0x0120
21:27:37.376 : end of EEPROM              : 0FFF
21:27:37.376 : z_value[][] size: 534  400
21:27:37.416 : EEPROM free for UBL: 0x0EDF
21:27:37.457 : EEPROM can hold 0x0009 meshes.
21:27:37.498 : sizeof(stat)     :0043
21:27:37.498 : MESH_NUM_X_POINTS  10
21:27:37.503 : MESH_NUM_Y_POINTS  10
21:27:37.503 : MESH_MIN_X         0
21:27:37.503 : MESH_MIN_Y         0
21:27:37.503 : MESH_MAX_X         195
21:27:37.503 : MESH_MAX_Y         200
21:27:37.507 : MESH_X_DIST        21.67
21:27:37.507 : MESH_Y_DIST        22.22
21:27:37.507 : z_offset           0.00
21:27:37.510 : Unified Bed Leveling sanity checks passed.
21:28:11.749 : Mesh saved at offset 0x0E2C
21:28:11.749 : Done.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 27, 2016

If you do a G29 M you can see what the current Mesh looks like in memory. But the Mesh: FFFF Loaded means you have never saved or loaded a Mesh. You have room to store 9 Mesh's. 0 through 8.

Just play with the different phases. And you can play with the Invalidate option and see how things work. Until you have a good Mesh defined, you don't have any Mesh data to protect.

@fr33dimension
Copy link
Author

fr33dimension commented Jul 27, 2016

Thanks Roxy, I get the info below when resetting and running a G29 W. G29 M has not effect.

07:51:20.616 : Unified Bed Leveling:
07:51:20.616 : echo:System is: Deactive
07:51:20.616 : Active Mesh Slot: 1
07:51:20.616 : EEPROM can hold 9 meshes.
07:51:20.616 : MESH_NUM_X_POINTS  10
07:51:20.620 : MESH_NUM_Y_POINTS  10
07:51:20.620 : MESH_MIN_X         0
07:51:20.620 : MESH_MIN_Y         0
07:51:20.620 : MESH_MAX_X         195
07:51:20.624 : MESH_MAX_Y         200
07:51:20.624 : MESH_X_DIST        21.67
07:51:20.624 : MESH_Y_DIST        22.22
07:51:20.625 : echo:Material heatup parameters:
07:51:20.628 : echo:  M145 S0 H180 B50 F0
07:51:20.628 : echo:  M145 S1 H240 B85 F0
07:51:20.628 : echo:PID settings:
07:51:20.633 : echo:  M301 P20.81 I1.34 D80.55 C100.00 L20
07:51:20.633 : echo:Filament settings: Disabled
07:51:20.633 : echo:  M200 D1.75
07:51:20.633 : echo:  M200 D0
07:51:20.636 : echo:Z-Probe Offset (mm):
07:51:20.636 : echo:  M851 Z-0.90
07:51:24.119 : echo:DEBUG:INFO,ERRORS

@fr33dimension
Copy link
Author

fr33dimension commented Jul 27, 2016

Ran another G29 P1, then saved G29 S 0, reset machine and got this with G29 W (G29 M does nothing)

08:05:25.364 : Unified Bed Leveling System Inactive.
08:05:25.405 : Mesh: 0000 Loaded.
08:05:25.409 : G29_Correction_Fade_Height : 10.00
08:05:25.552 : Free EEPROM space starts at: 0x0120
08:05:25.593 : end of EEPROM              : 0FFF
08:05:25.593 : z_value[][] size: 534  400
08:05:25.634 : EEPROM free for UBL: 0x0EDF
08:05:25.675 : EEPROM can hold 0x0009 meshes.
08:05:25.716 : sizeof(stat)     :0043
08:05:25.716 : MESH_NUM_X_POINTS  10
08:05:25.721 : MESH_NUM_Y_POINTS  10
08:05:25.721 : MESH_MIN_X         0
08:05:25.721 : MESH_MIN_Y         0
08:05:25.721 : MESH_MAX_X         195
08:05:25.721 : MESH_MAX_Y         200
08:05:25.725 : MESH_X_DIST        21.67
08:05:25.725 : MESH_Y_DIST        22.22
08:05:25.725 : z_offset           0.00
08:05:25.728 : Unified Bed Leveling sanity checks passed.

@fr33dimension
Copy link
Author

Actually, G29 M makes the board freeze, I have to reset to get control again.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 27, 2016

That doesn't make any sense. (I believe it is happening. I just have never seen anything like that.)

The 'M' option says to print a Map of the bed's current Mesh Topology. It can be added to most parameters or G29 commands. And I just loaded the most recent code on my printer to make sure the 'M' map option still works. It does.

Let me check the code and see if I can find something... But try adding an M to some other G29 commands and see what it does. Does it do the commands and then lock up? Does it lock up before doing anything? That would be helpful to know to isolate what the failure is. It would be particularly interesting to know what does a G29 P1 M do? Do you get points probed and can you see the map get printed with each probed point?

@fr33dimension
Copy link
Author

No I cannot see the map printed at each point, I can't see anything of that nature. I tried G29 P1 M, it prints TEST12ok

@fr33dimension
Copy link
Author

G29 P0 M freezes the board.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 27, 2016

I don't understand what you mean it prints TEST12ok. Are you talking about the test patterns? Are you saying you can print a map of the test patterns?

When you do a G29 M does it print out anything? One of the first things the Map code does is print a title: SERIAL_PROTOCOLLNPGM("Bed Topography Report:\n"); Do you see the Bed Topography Report: title show up on your PronterFace screen?

One thing we can do very quickly is see how far into the G29 code it is getting before it hangs. We can do a G29 Q 99 and see if it complains. Then a G29 P 99 and see if it complains. Then a G29 L 99 and see if it complains. And then a G29 S 99 to see if it complains.

The next thing in the code after the 'S' (save) parameter is the M parameter.

We might need to add some debug code to see where it is getting to.

@fr33dimension
Copy link
Author

I will try this next. When I said print I meant that it displayed TEST12ok, did not see anything other than that.
test12ok

@fr33dimension
Copy link
Author

Here is what the G29 Q99, -P99, -L99, -S99 did generate

12:11:15.784 : Invalid Test_Pattern value. (0-4)
12:11:51.093 : Invalid Phase value. (0-4)
12:12:08.992 : ?EEPROM storage not available for use.
12:12:30.214 : ?EEPROM storage not available for use.

@fr33dimension
Copy link
Author

This is what caught my eye earlier, it says system deactive

10:47:42.179 : Unified Bed Leveling:
10:47:42.179 : echo:System is: Deactive
10:47:42.179 : Active Mesh Slot: 0
10:47:42.179 : EEPROM can hold 9 meshes.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 27, 2016

Yes, but even with the system deactivated, the Mesh Map should be printable.

And I reviewed the code to display the Mesh Map. There is nothing fancy in it. Did you see this question:

When you do a G29 M does it print out anything? One of the first things the Map code does is print a title: SERIAL_PROTOCOLLNPGM("Bed Topography Report:\n"); Do you see the Bed Topography Report: title show up on your PronterFace screen?

@fr33dimension
Copy link
Author

No, nothing like a topography report
12:25:40.847 : 0B42
12:25:40.847 : Mesh invalidated. Probing mesh.
12:33:36.731 : Mesh saved at offset 0x0C9C
12:33:36.731 : Done.
This is what I see in the log during and after the G29 P 1 and G29 S 1

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 27, 2016

And G29 P1 M locks up the machine????

@fr33dimension
Copy link
Author

No G29 M does, G29 P1 M displays "TEST12ok"

@fr33dimension
Copy link
Author

And G29 M P1 after reset does Home all then displays "Mesh zeroed"

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 27, 2016

It almost sounds like the firmware did not get flashed correctly. What kind of board (and processor) do you have? Can you download the latest code and put your current configuration.h and configuration_adv.h file with it and flash the board again?

Something else is going on here. I don't know what is causing the problem but the Map code is very straight forward and should not be causing problems. Can you also paste your Configuration.h file into a post here and I'll take a closer look at it.

@fr33dimension
Copy link
Author

I will try that later today. It's a Getech Chinese rambo clone usually works alright, not sure of the chip.
I have other machines, but I have work on them right now.

Configuration H.txt
Configuration_adv H.txt

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 27, 2016

Did you see that at line 1005 the discount RepRap LCD controller is turned on?
That doesn't seem compatible with Viki controller.

#define REPRAP_DISCOUNT_SMART_CONTROLLER

@fr33dimension
Copy link
Author

That must have been selected before, the viki is not working right with RC6 yet. I will change that too .
Thanks

@fr33dimension
Copy link
Author

Didn't make any difference...FYI.....So I downloaded this file again https://github.com/MarlinFirmware/Marlin/tree/devel-ubl and flashed it, same thing. It's is probing again now in if I have some new developments I will post them.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 27, 2016

I loaded your Configuration.h and Configuration_adv.h file into the build directory and I sent it to my RAMPS board. I could not duplicate the hang. But I did almost melt my nozzle off of the machine. Apparently, the Rambo board does something to lock on the pin that RAMPS uses for the first nozzle.

I then changed the Rambo to RAMPS and left everything else the way you had it. It seems to work fine and the 'M' option does not cause any issues. I don't know what we are fighting. Do you have another machine with different boards and such we could try it on?

@fr33dimension
Copy link
Author

I will try it on a ramps board tomorrow.

@thinkyhead
Copy link
Member

I then changed the Rambo to RAMPS

You flashed a RAMPS board with MOTHERBOARD set to BOARD_RAMBO? D'oh!

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 28, 2016

You flashed a RAMPS board with MOTHERBOARD set to BOARD_RAMBO? D'oh!

Well, I knew it wouldn't work. I didn't expect it to turn on the heaters at full blast and keep them on. Live and learn. But my intentions were good. I wanted the generated firmware to be identical to what he had so I could see if I could reduplicate the problem.

@fr33dimension
Copy link
Author

I just noticed when flashing the ramps board that the UBL requires and LCD. I don't have one on the machine with the ramps board but just turned on the reprap discount lcd and was able to flash. The viki that I have on the ML2, doesn't work right with the UBL firmware and RC6. It displays the info screen, but the menus don't even come on when the encoder wheel is pushed. Could this be part of the issue?

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 28, 2016

In the ReadMe file for UBL, I put this text:

The System was developed on a Prusa i3 machine with a 20x4 LCD display. The closer you are to the development system, the less likely you are to have issues.

If you have an i3 type machine with a REPRAP_DISCOUNT_SMART_CONTROLLER, I expect the software will come up with no problems. If you want to get it running on a different type of machine I'll help you as much as I can, but it is very difficult to debug these kind of things without hardware.

Do you have an i3 machine and a Discount 20x4 controller available? Even if you really want this on a different machine, bringing it up on a system where it is known to work first is helpful because you will see how everything is setup and functions.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 29, 2016

If you copy the settings in the Roxy folder's Configuration.h file... That definitely works with the Discount 20x4 display. I'm certainly not an expert at LCD Displays and all the different versions. But there are 'Discount' versions of both the Graphics LCD Panel and the 20x4 LCD Panel. I'm not sure if 'Discount' means it has less features. I think that terminology just means it is after market and somebody else cloned the design and is selling it. It would be good if somebody that knew the answer jumped in and explained the 'Discount' term to us.

@fr33dimension
Copy link
Author

fr33dimension commented Jul 29, 2016

Okay, I got the a full graphic LCD installed and it's doing the same thing. G29 M or G29 P1 M freezes the board. Evert (t)hing else seams to work.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 29, 2016

Was that a 'Full Graphics LCD' in the picture that AdamFilip posted? Or is that a 'Discount Full Graphics LCD' ? I don't understand why the 20x4 display doesn't work either. That is very strange. At worst case, in 5 or 6 days, I'll have a Graphics LCD plugged into my printer and I'll be able to figure out what is causing trouble. It can't be much to fix, if we just knew what was getting it sick.

@fr33dimension
Copy link
Author

Roxy, as you mentioned earlier they are very similar, the Discount Full Graphic LCD is kind of square and displays graphics while the Discount Smart LCD is rectangular. They have two different selections in config.h, but they did not make a change at all in my case. LCD can be somewhat tricky to install since they need some pins to be adjusted and they can be plugged in wrong. Mine where both working with my normal firmware, but did not with the UBL. I am not sure and willl dig deeper but here is what I got working. G29 P1 probes, G29 P2 lets me adjust. I can print G26. What I cannot get is the G29 P1 M to work and G29 M freezes the board. I will try some more tomorrow.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 29, 2016

G29 P2 uses the Encoder Wheel to move the nozzle down to the bed. That is working? Because that is a lot of interaction with the LCD Panel to do that. And what about a G29 P4 ??? Do the display and Encoder Wheel work?

The reason I'm asking is the 'M' option doesn't even use the LCD Panel. It sends a lot of text to PronterFace (or the host program) via SERIAL_PROTOCOL() and SERIAL_ECHO() calls. But no where in the display_map() function does it touch the LCD Panel. And I've looked at the few places where display_map() is called and the LCD Panel isn't touched as part of the setup to call it. It just doesn't make sense that calling that function should cause problems. And it also doesn't make sense that you don't even see the 'Topology Report:' title come out. When we figure it out, I'm sure it will all make sense. But right now, this doesn't make any sense.

@fr33dimension
Copy link
Author

Yes, both (reprap discount)LCD's work fine. The Viki does not. I thought that the M has nothing to do with the LCD, actually this firmware would work without LCD, you just cannot adjust the off bed points.
I didn't try the P4 yet.
I am using repetier, which displays the same things as pronterface, but no, I am not even getting the title.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 30, 2016

Yes, both (reprap discount)LCD's work fine.

Can you tell me this: Ignoring the Bed Leveling System, can you use the Encoder Wheel to move around on the LCD Menu and Select items?

@fr33dimension
Copy link
Author

Yes, on both reprap discount LCD's.

@fr33dimension
Copy link
Author

With G29 P4 I get the mesh point editor on the LCD so everything works, besides the M command.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 30, 2016

OK... Is it accurate to say the problem with the 'M' option on G29 is not tied to a LCD Panel? I'm trying to connect the bad behavior of the 'M' option with the LCD Controller not working correctly. But I think I'm hearing you say the LCD Panel problems are gone if you are using the 'right' LCD Panel. However you still have the problem with the Map option hanging the machine.

@fr33dimension
Copy link
Author

Roxy,
I switched over to Printrun and the M command works fine, it doesn't work in Repetier. Hopefully this can be fixed.

Bed Topography Report:
(0,9) (9,9)
(0,164) (186,164)
. . . . . . . . . .

   .                 .                 .                 .                 .                 .                 .                 .                 .                 .

0.18250 0.08250 0.01000 -0.08000 -0.09750 -0.19250 -0.19000 -0.23000 . .

0.25000 0.14250 0.08250 -0.01250 -0.02000 -0.12000 [-0.13000] -0.13750 . .

0.29500 0.20000 0.13000 0.05500 0.02500 -0.06250 -0.06500 -0.08750 . .

0.36500 0.27250 0.21250 0.11250 0.09250 0.01250 0.00000 -0.01750 . .

0.42750 0.34250 0.30750 0.19000 0.14500 0.16000 0.06500 0.03500 . .

0.50000 0.43500 0.38750 0.27000 0.23500 0.16750 0.14750 0.12750 . .

0.55500 0.47500 0.44000 0.33250 0.31000 0.24750 0.23000 0.20250 . .

0.64000 0.57000 0.45500 0.43000 0.41750 0.39250 0.33250 0.32250 . .
(0,0) (186,0)
(0,0) (9,0)

@fr33dimension
Copy link
Author

Yes you are correct. The M command has nothing to do with the LCD. The LCD is just needed to change the nozzle bed ratio, that's all.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 30, 2016

Ah!!!! Great!!!! I did not see how the Map option could be caused by the firmware. OK, let's get some assistance and get this fixed.

@repetier The 'M' (Map) option in the UBL Development branch does do a lot of serial output. Can you give me a hint what is causing a problem on your side, and what I should do to not cause the problem?

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 30, 2016

@fr33dimension If you do a G29 A to activate the system, do you see it adjust the Z-Axis as you move the nozzle around the bed?

@fr33dimension
Copy link
Author

Yes

@fr33dimension
Copy link
Author

I spoke to soon, no it is not compensating. It works though when I print.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 30, 2016

The back side of your bed is sloping downward slightly. If you just position the nozzle back there and do a G29 M you will see brackets around the Mesh point where you are. You can issue a G29 P3 R4 C0.123 type command to load 4 of those points with a constant. And then repeat that a few times to get everything populated.

Because the back side of your bed is tilting downward, it is safe to extend the last values into the 'unknown' area. If you do that, you can run a G26 and use that to very quickly edit your Mesh to perfection. (It might take several iterations, but it lets you get the Mesh fine tuned very easily.)

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 30, 2016

You might want to issue a G29 A and a G29 S 1 to activate the system and save your mesh too.

@fr33dimension
Copy link
Author

Okay thanks so much. I will try that as soon as I can and get back.

@fr33dimension
Copy link
Author

One thing I don't understand is when I am doing the P2, in may places the probe is on the bed and could have done it automatically. My y stop switch is in the back at Y max.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 30, 2016

The P2 is painful to do. Just do it in a couple places so you know there are not any crazy changes in height. The G29 P1 assumes the nozzle can not go off the bed. As a result of that, if you have any X_PROBE_OFFSET_FROM_EXTRUDER or Y_PROBE_OFFSET_FROM_EXTRUDER there will be parts of the bed that can not be reached by your probe.

That assumption may not be valid on your machine. But for most users, that assumption is true. And it really doesn't matter because if you fill the un-probed areas of the Mesh with a 'reasonable and safe' number, you can quickly edit them once you have the G26 Mesh Validation Print done.

@fr33dimension
Copy link
Author

Okay sounds good.

@fr33dimension
Copy link
Author

Really nice work Roxy, I like it. I had a few bumps on the way but it's working now. I have a couple of jobs on this machine and have to run them now, but will do an G26 once done and finalize the mesh. I just entered approx values for now to get it to print. Basically, you don't need an LCD at all to do the mesh setup and entering. I'm looking forward to hear from Repetier what causes the freeze, btw, I am sure it's not the board, it's actually repetier loosing connection to the printer. Pretty much like when you send the G29 P2, it is then controlled by the LCD and you cannot move an axis or so in Repetier.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 30, 2016

Thanks! You are over the hard part. The G26 is what makes this so nice and easy to use. Once you can see where the Mesh is defective, it is easy to adjust things.

@fr33dimension
Copy link
Author

Roxy,
I had several long prints today and I am not sure, but does the UBL stop after several layers? That would actually be good for appearance, but not for size.

@Roxy-3D
Copy link
Member

Roxy-3D commented Jul 31, 2016

Do a G29 W There is a lot of clutter in that report and most of it is going away. But right now, for debug reasons, all that clutter is in there. Look for the line that says G29_Correction_Fade_Height. If you did nothing to change it, it defaults to 10mm. As you get closer and closer to 10mm, the correction gets less and less. At 10mm, there is no correction applied. On the first layer, you get 100% (actually... ( (10.0-.2)/10.0)=98% of the correction defined by the Mesh.

It is documented as:

      F #   Fade      Fade the amount of Mesh Based Compensation over a specified height.  At the specified height, 
                  no correction is applied and natural printer kenimatics take over.  If no number is specified 
              for the command, 10mm is assummed to be reasonable.

You can set it as large (actually, right now it is limited at 100.0 mm but we can change that if you want) or small as you want. But it really won't affect your dimensions much. The max amount it will affect your dimensions by is what ever the largest Mesh Point is that you have defined. And it could be argued that if the part is taller than the Fade Height, the dimensions of the part are not affected at all. In that case, the bottom of the part has some indented places to compensate for high points in the Mesh.

@fr33dimension
Copy link
Author

Genius! Thanks

@github-actions
Copy link

github-actions bot commented Apr 4, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants