bigtreetech / BIGTREETECH-TouchScreenFirmware

support TFT35 V1.0/V1.1/V1.2/V2.0/V3.0, TFT28, TFT24 V1.1, TFT43, TFT50, TFT70
GNU General Public License v3.0
1.31k stars 1.65k forks source link

ABL Buttons Missing with RRF #2537

Closed Wombat37 closed 2 years ago

Wombat37 commented 2 years ago

After updating to recent firmware on my E3 RRF/TFT35 E3 V3 system, I seem to have lost the ABL buttons on the TFT. Has something changed so that these buttons are now disabled?

Wombat37 commented 2 years ago

OK, I'm not seeing any feedback - perhaps I need to provide more details.

Following latest update, TFT displays firmware version as V27.x April 9 2022

Movement screen now appears as follows:

image

Note the missing Bed Level icon

I installed a later firmware version V27.x May 30 2022 and still the Bed Level icon was missing

I reinstalled the earlier version TFT35_E3_V3.0.27x Sep 13 2021 and the Bed Level icon reappeared as seen below:

image

This gives me access to the various ABL functions:

image

On each occasion, I'm updating the BIN file, the renamed config_rrf.ini file and the TFT35 folder.

All I'm doing is just changing the firmware and ABL appears with older versions but not the newer versions. No other changes are being made. Hence my original question. Am I missing something here, is this a bug or a deliberate change?

Thanks for any guidance anyone can give me.

kisslorand commented 2 years ago

Is your BLTouch enabled?

radek8 commented 2 years ago

@Wombat37 September 13 icon is fine, May 30 is missing. This is a very long time. Can you try FW from another date in this section to find out when it broke? Thank you.

radek8 commented 2 years ago

@Wombat37 Can you enter the RRF system response to M115 and M503 here? I think the change was September 22 in #2179 in the setings.c file.

Wombat37 commented 2 years ago

Thank you for your help.

I'll try and answer your questions:

  1. Is BL Touch Enabled? My understanding is that the TFT firmware will automatically detect the BLTouch - presumably from the RRF configuration. I have configured a Type 9 probe and ABL in my RRF config.g file:

; Z-Probe Bltouch M950 S0 C"servo0" ; create servo pin 0 for BLTouch M558 P9 C"^probe" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X-44.36 Y-4.27 Z0.800 ; set Z probe trigger value, offset and trigger height

;Define ABL mesh grid M557 X20:200 Y20:220 P4:4 ;Use number of points**

  1. Long time between updates I was very happy with the Sep 13 2021 version and so I felt that if it's working, don't fix it. However I kept getting into a mess with the z-offset after using baby-stepping that when I saw the bug fix for this, I updated. The z-offset problems went away but so did the bed leveling control :)

  2. Try interim versions I will do that - probably will start with @radek8's suggestion of the Sep 22 release. I'll post results shortly.

  3. RRF M115 response

M115 FIRMWARE_NAME: RepRapFirmware for STM32F4 based Boards FIRMWARE_VERSION: 3.3.0_9 ELECTRONICS: STM32F4 FIRMWARE_DATE: 2021-09-19 11:51:46

  1. M503 Response

M503 ; Configuration file for BTT-E3-RRF (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.1.10+4-LPC on Tue Jan 19 2021 17:25:01 GMT+0800 (中国标准时间)

; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves ;M550 P"BTT-E3-RRF" ; set printer name M550 P"andys3dprinter" ; set printer name

; Network M552 S0 ;Comment-out for FW update

M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet

; Drives M569 P0 S0 ; physical drive 0 goes forwards using default driver timings M569 P1 S0 ; physical drive 1 goes forwards using default driver timings M569 P2 S1 ; physical drive 2 goes forwards using default driver timings M569 P3 S0 ; physical drive 3 goes forwards using default driver timings M584 X0 Y1 Z2 E3 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E406.86 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X12000.00 Y12000.00 Z600.00 E3000.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z100.00 E5000.00 ; set accelerations (mm/s^2) M906 X580 Y580 Z1000 E650 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout

; Axis Limits M208 X0 Y-6 Z-1 S1 ; set axis minima ;M208 X230 Y230 Z250 S0 ; set axis maxima M208 X250 Y250 Z250 S0 ; set axis maxima X set to 250 to allow 3D Touch to reach further to the right

; Endstops M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop M574 Y1 S1 P"ystop" ; configure active-high endstop for low end on Y via pin ystop M574 Z1 S1 P"zstop" ; configure active-high endstop for low end on Z via pin zstop ;M591 D0 P7 C"e0stop" S1 R50:130 L7.0 E10 ; BTT Smart Filament Sensor ;M591 D0 P1 S1 ; Filament runout Sensor

; Z-Probe Bltouch M950 S0 C"servo0" ; create servo pin 0 for BLTouch M558 P9 C"^probe" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X-44.36 Y-4.27 Z0.800 ; set Z probe trigger value, offset and trigger height - Offset measured 04/08/2022

;Define ABL mesh grid M557 X20:200 Y20:220 P4:4 ;Use number of points

;Reset 3D Touch - only works if some other action occured after last called M280 P0 S160 ;reset ;M280 P0 S120 ;self test

; Heaters ;M308 S0 P"bedtemp" Y"thermistor" T100000 B3950 ; configure sensor 0 as thermistor on pin bedtemp M308 S0 P"bedtemp" Y"thermistor" T100000 B4100 ; Updated 4/24/2021 M950 H0 C"bed" T0 ; create bed heater output on bed and map it to sensor 0 M140 H0 ; map heated bed to heater 0 M143 H0 S150 ; set temperature limit for heater 0 to 150C M308 S1 P"e0temp" Y"thermistor" R4700 T101120 B4104 C-4.822e-8 ; First solder thermistor calibration M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M143 H1 S300 ; set temperature limit for heater 1 to 300C

; Fans M950 F0 C"fan0" Q1000 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"fan1" Q1000 ; create fan 1 on pin fan1 and set its frequency M106 P1 S0 H1 T60 ; set fan 1 value. Thermostatic control is turned on

; Tools M563 P0 D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C

;Andy's workaround for M221 No Tool Selected error M104 S0 T0 T0

; Custom settings are not defined

; Miscellaneous ;M575 P1 S1 B57600 ; enable support for PanelDue M575 P1 S2 B57600

M552 S1 ; enable network. Comment-out for F/W update M150 X2

M501 ;Call config-override.g (for PID tuning etc.)

Wombat37 commented 2 years ago

No problem with the Sep 22 2021 version - the Bed Level icon is still shown.

There are dozens of other versions to try - any suggestions?

Wombat37 commented 2 years ago

Further Testing (this was very tedious)...

Version Merged/Bed Level Icon Sep 22 2021 (#2179)/Yes Dec 30 2021 (#2307)/No Nov 9 2021 (#2233)/No Oct 22 2021 (#2222)/No Sep 21 2021 (#2194)/Yes Sep 23 2021 (#2195)/404 Error Sep 27 2021 (#2199)/Files deleted Sep 27 2021 (#2201)/404 Error Oct 5 2021 (#2209)/404 Error

There seemed to be a lot of activity in developing code around the end of September 2021 - much appeared to be in parallel and the development and the merged dates didn't seem to keep in order.

The Bed Level icon was present in the Sep 21 and 22 versions and then all the following files were missing from the repository until Oct 22 when the icon disappeared - so it appears that the problem was probably introduced in one of these missing versions that I couldn't test.

If someone could get these missing (compiled) files to me, I will test them.

Thanks again for your support.

Wombat37 commented 2 years ago

My money's on the Oct 5 2021 version - there's a lot of code modification around ABL in there.

Wombat37 commented 2 years ago

Accidentally closed this :(

radek8 commented 2 years ago

Try this version. https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/tree/aecf5b3f513f64932d525c62dbc3ec5d66a9d61d/Copy%20to%20SD%20Card%20root%20directory%20to%20update

radek8 commented 2 years ago

The problem is that FW for TFT is being developed for Marlin Several users have made several adjustments to adapt TFT to other systems, such as RRF. But this is not 100% complete.

Wombat37 commented 2 years ago

I tried the version you sent - there is NO Bed Level icon in this version. So the issue may lay in here. There a persistent TFT in Listening Mode message.

I understand that this code is maintained mainly by volunteers and I'm very grateful for all their efforts.

This is a function that was working previously and so I'm hopeful that this issue can be an easy fix.

kisslorand commented 2 years ago

@Wombat37 Set "BED_LEVELING_TYPE" in "Configuration.h" to the value that suits your setup. Check if it solves your problem.

radek8 commented 2 years ago

Can you try this FW? BIGTREE_TFT35_V3.0_E3.27.x.zip

Wombat37 commented 2 years ago

Hi @radek8, you sent just the BIN file - I assume this goes with the latest ini, icon and font files?

Anyway, it all installed without any problems and...

IT WORKED!

The Bed Level icon is shown and there's access to all the associated functions!

I hope this represents a good solution to this issue. If so, thank you so much - it's appreciated!

Should I continue to use this or wait for a formal update?

radek8 commented 2 years ago

Yes, it's from the latest branch. If it works for you, you can use it. I will publish the correction.

Wombat37 commented 2 years ago

Thanks again!

I'm surprised no one else noticed this :)

Shall I close this out or do we wait for formal release?

radek8 commented 2 years ago

OK, I was happy to help. The ticket is closed by merging the repair.

kisslorand commented 2 years ago

@radek PR #2541 has the same effect as my proposal about setting "BED_LEVELING_TYPE" in "Configuration.h". On another note, do all Reprap FW printers have ABL???

radek8 commented 2 years ago

@kisslorand I'm afraid your solution with Configuration.h won't work. parameter #define AUTO_LOAD_LEVELING is set to 1 by default Therefore, precompiled versions have leveling enabled in Configuration.h. Still, it didn't work for the RRF. Configuration.h sets automatic detection, but if leveling is not detected, the default value is leveling disabled. Currently, TFT cannot automatically detect leveling and its type at RRF, so I set the leveling ABL to RRF fixed. If someone else contacts us using another method, we can define it, for example, in the Config .ini file. Or someone who knows the RRF better and writes a better correction.

radek8 commented 2 years ago

I asked Wombat37 for an M503 and M115 listing Unfortunately, I did not find any string according to which it is possible to find out if leveling is active and what method it uses.

radek8 commented 2 years ago

@Wombat37 What leveling methods can be defined in RRF?

kisslorand commented 2 years ago

@kisslorand I'm afraid your solution with Configuration.h won't work. parameter #define AUTO_LOAD_LEVELING is set to 1 by default Therefore, precompiled versions have leveling enabled in Configuration.h. Still, it didn't work for the RRF. Configuration.h sets automatic detection, but if leveling is not detected, the default value is leveling disabled. Currently, TFT cannot automatically detect leveling and its type at RRF, so I set the leveling ABL to RRF fixed. If someone else contacts us using another method, we can define it, for example, in the Config .ini file. Or someone who knows the RRF better and writes a better correction.

That's exactly why I suggested to change from 1 to a value that suits the printer's configuration.

Anyway, I got it, Wombat37 was testing only precompiled versions...

kisslorand commented 2 years ago

I asked Wombat37 for an M503 and M115 listing Unfortunately, I did not find any string according to which it is possible to find out if leveling is active and what method it uses.

This is why it should be user configurable, not baked in the TFT's FW.

radek8 commented 2 years ago

However, no other options are defined in the comment. The user cannot know that there are other options.

image

image

kisslorand commented 2 years ago

This has nothing to do with the issue. This parameter is effective ONLY if the printer has ABL.

Anyway, the way I see it is that for RRF from the TFT's perspective there's no way to know if the printer has or not ABL so the user should configure it accordingly.

On the other hand member jaysuk stated in PR #2541 that all RRF printers have ABL. If it's true than it's obvious that no user configuration is needed about ABL and it should be baked in the TFT's FW.

radek8 commented 2 years ago

Configuration.h sets infoSettings.auto_load_leveling on 1. But is defined in the setings.c file: infoMachineSettings.leveling = BL_DISABLED; And if autodetection does not overwrite it, the leveling will remain deactivated. Therefore, the settings in Configuration.h do not resolve the issue.

kisslorand commented 2 years ago

I beg to differ. Check setupMachine() in settings.c if you set "#define BED_LEVELING_TYPE 2" in "Configuration.h".

radek8 commented 2 years ago

ok

radek8 commented 2 years ago

What about this?

ABL is set during automatic detection and there is an option to select manually.

image

Wombat37 commented 2 years ago

In this comment, I try to describe how RRF handles ABL.

It looks like you just need 4 entries in the RRF config.g macro - which is run each time the system boots.

M950 S0 C"servo0" ; create servo pin 0 for BLTouch

M558 P9 C"^probe" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds ;The P9 selects the BLTouch type of probe - other options can be selected here

G31 P500 X-44.36 Y-4.27 Z0.800 ; set Z probe trigger value, offset and trigger height

M557 X20:200 Y20:220 P4:4 ;Set the mesh test points

There is no option to select the leveling 'mode' along the following lines in the TFT Configuration.h file

I don't even know what these other options mean (BBL, UBL and MBL) and they don't seem to be present in the RRF config.g.

Once, the entries in the config.g file have been made, the ABL can be invoked from the DWC webpage as follows:

image

G29 runs the ABL matrix directly whereas G32 calls it indirectly via a macro (so that other commands like positioning and messaging can be added).

If the BLTouch is disabled (M558 P0), the same ABL options are still presented. In other words ABL access is not dependent on a suitable probe being present. I think what it does is take the user through a set a manual adjustments to get the ABL. I couldn't test this because I needed to home the nozzle - something I couldn't do once I'd disabled the BLTouch.

So, I think what RRF does is always make ABL available and use BLTouch (or any other type of sensor) if present, otherwise take the user through a series of manual settings. In other words, RRF always has ABL enabled.

I hope this helps.

P.S. How did it work in earlier versions of the firmware?

Wombat37 commented 2 years ago

OK - I looked into the Marlin leveling modes ABL (basic linear), UBL (unified ), BBL (bilinear) and MBL (manual, I assume).

These are different ways of calculating the mesh compensation from assuming a flat plate at an angle to interpolations between measured nodes.

UBL seems to be the most advanced allowing up to 15 x 15 points to define the mesh.

In RRF, there seems to be only one ABL option and it allows up to 21 x 21 test points - so it's already equal or better than all the Marlin modes so a choice is not required (except manual which is automatically applied in the absence of a z-probe).

So, again, I think we can get away with enabling ABL by default on RRF systems.

It's difficult to find information on the mesh fitting algorithms on the two systems and I'm making a few assumptions here. It would be good if we reached out to the RRF community to confirm things. I can do that.

kisslorand commented 2 years ago

P.S. How did it work in earlier versions of the firmware?

Before PR #2179 a few things were set by default if the detected firmware wasn't Marlin. Amongst them was the enabling of leveling option too.

  if (infoMachineSettings.firmwareType != FW_MARLIN)  // Smoothieware does not report detailed M115 capabilities
  {
    infoMachineSettings.EEPROM                  = ENABLED;
    infoMachineSettings.autoReportTemp          = DISABLED;
    infoMachineSettings.autoReportPos           = DISABLED;
    infoMachineSettings.leveling                = ENABLED;
    infoMachineSettings.zProbe                  = ENABLED;
    infoMachineSettings.levelingData            = ENABLED;
    infoMachineSettings.emergencyParser         = ENABLED;
    infoMachineSettings.autoReportSDStatus      = DISABLED;
  }

I am not familiar with RRF and I do not know if those settings that were eliminated are needed or not to be set by default for RRF.

kisslorand commented 2 years ago

What about this?

ABL is set during automatic detection and there is an option to select manually.

image

If RRF has only one type of bed leveling (ABL) and it always have this option than I think it is just better to leave it as you did originally. Even if the user sets any other type than ABL, RRF doesn't have that so defaulting to ABL is not wrong. I assume all these based on the info Wombat37 gave us.

Wombat37 commented 2 years ago

I had a good discussion on the TeamGloomy Discord site last night - I think my observations about RRF are accurate.

One thing I was reminded of was that ABL is enabled in RRF by a M557 statement in the config.g file. Without this, ABL is not carried out and an error message is generated if the G29 command is issued. So we could, perhaps use the presence of a M557 statement to enable the icons on the TFT. When enabled by M557, if a probe is present, the process is automated, if not, a manual process is applied.

However, RRF doesn't bother with removing the ABL controls in the absence of a M557.

I suggest that I further evaluate the build @radek8 sent me yesterday that apparently will always enable these TFT icons if RRF is being used. I'll check out all the TFT functions with and without M557 being configured. Hopefully that will help with the decision to proceed with this build. I'll do that today and will report back later.

P.S. I was wrong about the G32 command - it's for bed leveling, not mesh compensation, which uses G29. These terms get a bit mixed up but there's a big difference in their function.

Wombat37 commented 2 years ago

OK, I did the following tests with the build @radek8 sent me on my E3 RRF/TFT35 E3 3.0:

With BLTouch configured with M558 and G31 and ABL enabled with M557

With BLTouch configured but no M557

No BLTouch but ABL enabled with M557

Summary - with ABL always enabled, the TFT behaves essentially the same as the RRF/DWC. The only difference is that in the absence of a M557 in the RRF config.g file, both systems do nothing but DWC gives an error message and the TFT does not. I don't think this is a critical difference. I thought that with the BLTouch disabled and the ABL enabled with M557, a manual ABL process would start - it didn't. Both DWC and TFT gave error messages and then crashed and reset the mainboard. So the biggest issue is pressing the ABL button on the TFT without the M557 statement present - it gives a system crash. RRF/DWC does exactly the same.

My recommendation is that we go with this build @radek8 sent me to test. Although not perfect, no damage is caused and it works when stuff is configured properly. It would be good if we could capture this stuff in the user manual.

radek8 commented 2 years ago

Should the display of the leveling button be conditioned by the presence of parameters M557?

radek8 commented 2 years ago

@Wombat37 you can try the enclosed FW it should detect the presence of M557 and enable leveling icons accordingly. If the M557 command is missing from the configuration, the leveling icons will not be displayed. BIGTREE_TFT35_V3.0_E3.27.x.zip

Wombat37 commented 2 years ago

I did some further testing with @radek8's previous build. I found that the mesh grid definition (M557) must be preceded by a definition of the z-probe type (M558). I assumed that if I just removed the M558 instruction, it would default to manual leveling. This is not so and gives the error messages and crash/reset I reported yesterday. If I explicitly define the probe as being manual (M558 P0), then it does do a manual mesh of the bed - both through RRF and the TFT. In other words everything works properly on the TFT if the M558 and M557 commands are set up correctly - even if a z-probe is not installed.

Your idea (and build) to only allow access to the bed leveling functions if the M557 command is present, only half works. Taking out this icon would prevent access to the other functions on this screen like checking out the probe functionality during installation and prevent access to bed leveling (with multiple z-axis motors).

I think the safest option would be to always enable access to the Bed Level functions when RRF is used - everything works well with and without M557 and M558 defined. You just can't have M557 without setting M558 first. The only enhancement I would suggest for the TFT would be to consider displaying the error messages on the TFT that I see with RRF when things are not set up correctly - but this is not critical. It would be good if we could get this stuff into the user manual or similar document.

There's probably a case to always enable the Bed Level functions with Marlin, Klipper, etc.

In the light of this, do you still want me to test the build you just sent me? I'm very comfortable with your last version.

radek8 commented 2 years ago

OK if it doesn't bring anything new, but on the contrary there won't be accessible features that should be available, then don't test it. We'll leave it as I suggested the first time. PR is created and awaits approval from Bigtretech.

Wombat37 commented 2 years ago

OK - it's been great working with you and sorry it took so long :)

The big problem I have is finding out how a lot of this stuff is supposed to work - documentation is rather sparse.

radek8 commented 2 years ago

If you want, you can create documentation for RRF yourself. There are not many active users with this system. Previously, there were two who were interested in actively working on development, but they did not respond for about 3/4 of the year.

Wombat37 commented 2 years ago

If I write that - how would it be published? In the user manual?

If so, I have a ton of other tricks and notes on setting up RRF to work with the TFT (learned the hard way).

radek8 commented 2 years ago

Maybe there should be a link to the PDF file with instructions for FFR users on the title page, in addition to the installation instructions. @oldman4U , what do you think? If Wombat37 prepares a PDF file with instructions for RRF users, will you place it on the front page?

jaysuk commented 2 years ago

Feel free to make PRs to our wiki (teamgloomy)

On Thu, 16 Jun 2022, 21:49 Wombat37, @.***> wrote:

If I write that - how would it be published? In the user manual?

If so, I have a ton of other tricks and notes on setting up RRF to work with the TFT (learned the hard way).

— Reply to this email directly, view it on GitHub https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/issues/2537#issuecomment-1158115724, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATUSBTKSBN35X6N3WE3MFTVPOHLXANCNFSM5YLOUMTA . You are receiving this because you are subscribed to this thread.Message ID: <bigtreetech/BIGTREETECH-TouchScreenFirmware/issues/2537/1158115724@ github.com>

Wombat37 commented 2 years ago

If you're serious, I could act as 'editor' of such a document and, hopefully, others could send me further content/ corrections that I could incorporate.

Should it be here or on TeamGloomy Wiki as @jaysuk suggests?

Personally, I would like to do it here as it would reach more non-RRF users and may convince them to give it a try.

radek8 commented 2 years ago

https://teamgloomy.github.io/tft.html

Wombat37 commented 2 years ago

Looking at the teamgloomy page now, looks like there's a gap for the BTT TFT screens and this would fit in well there.

Wombat37 commented 2 years ago

I could do that - particularly with help from someone like @jaysuk.

This is diverging from the topic of this issue so I should stop posting this stuff - I'll reach out to @jaysuk on your email listed here.

oldman4U commented 2 years ago

If needed - I can help