PrintrBot - Show Z-Offset on LCD

We still have some PrintrBots running in our Lab. Unfortunately, we cannot flash the latest marlin firmware to them, because we need SD card und LCD support. That means we’re kind of sticking to: Release RevF-Version-5 · Printrbot/Marlin · GitHub

Any chance that I can change one entry in the LCD menu and show the actual value of M212?
Eg: Z-Offset: 0.3mm

1 Like

I am not familiar with the hardware but if the main board has a USB port, you should able to flash the firmware that way.

1 Like

I went to the link you provided for the Version 5 release and there is a “source” code link which means you should be able to modify that but the first thing I would do is download the source, build it and upload that firmware and validate it functions as expected. This not only validates the firmware but also your build environment and flashing capabilities. But do something like change the version string to something you will recognize to know you are running the “custom” build.

Next I would decide if I needed to show the Z-offset throughout the running or at the beginning boot screen since one might be easier to do than the other. Next is modifying the source code to show the Z-offset, compile, upload, test.

3 Likes

Thank you for your feedback. I think I’ll give it a try and add the z-offset to the boot screen. :slight_smile:

1 Like

By now I tried to get the value of the z offset by calling M117 during printing:

  • M117 [MSG_ZPROBE_ZOFFSET]
    It reported: endstops hit: Z

That was not what I was looking for. But it seemed to point in a good direction. :wink:

  • M117 [bed_level_probe_offset[2]]
    It showed just [bed_level_probe_offset[2]]

Hm, that was less succesful… It seems that this variable was not compiled to be shown on the LCD. If I just could call M503 and get the report on the screen…

Is there a workaround or do I really have to dive into compiling my own firmware? :wink:

OK then, I have to dive into building my own firmware…

I did not count the numbers of hours I spent into that task. But there were at least +1 downs than ups. :stuck_out_tongue_winking_eye:

But anyway that’s what I did during the last attempt:

  1. Downloaded: GitHub - Printrbot/Marlin at prod-platformio-2017
  2. Uncommented the build_flag for my PrintrBot Play in platformio.ini
  3. Fixed the ini-file: board = teensy2pp → see No Heated Bed for Simple Metal? · Issue #8 · Printrbot/printrboardmodernmarlin · GitHub
  4. Renamed fpos_t to fpos_t1 → see Rename fpos_t to fpos1 in SdBaseFile.h and SdBaseFile.cpp · Issue #23 · Printrbot/Marlin · GitHub
  5. Somehow PlatformIO then warned about a missing library (ArduinoJSON), which I was able to include…
  6. But that did not solve the problem I guess. Do I need an older version of ArduinoJSON?
  7. Your hints are very appreciated :slight_smile:
> Executing task: C:\.platformio\penv\Scripts\platformio.exe run <

Processing teensy2pp (platform: teensy; framework: arduino; board: teensy2pp)
--------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy2pp.html
PLATFORM: Teensy (4.15.0) > Teensy++ 2.0
HARDWARE: AT90USB1286 16MHz, 8KB RAM, 127KB Flash
PACKAGES:
 - framework-arduinoteensy 1.156.0 (1.56)
 - toolchain-atmelavr 1.50400.190710 (5.4.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 93 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ArduinoJson> 6.19.4
|-- <SPI> 1.0
|-- <Adafruit NeoPixel> 1.1.7
|-- <LiquidCrystal> 1.0.7
|-- <Wire> 1.0
Building in release mode
Compiling .pio\build\teensy2pp\src\Marlin_main.cpp.o
Compiling .pio\build\teensy2pp\src\motion_control.cpp.o
Compiling .pio\build\teensy2pp\src\planner.cpp.o
Compiling .pio\build\teensy2pp\src\qr_solve.cpp.o
Compiling .pio\build\teensy2pp\src\stepper.cpp.o
Compiling .pio\build\teensy2pp\src\temperature.cpp.o
Compiling .pio\build\teensy2pp\src\ultralcd.cpp.o
Compiling .pio\build\teensy2pp\src\vector_3.cpp.o
src\Marlin_main.cpp:2074:36: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
         LCD_MESSAGEPGM(MACHINE_NAME" "MSG_OFF".");
                                    ^
In file included from .pio\libdeps\teensy2pp\ArduinoJson\src/ArduinoJson/Serialization/Writer.hpp:38:0,
                 from .pio\libdeps\teensy2pp\ArduinoJson\src/ArduinoJson/Serialization/serialize.hpp:7,
                 from .pio\libdeps\teensy2pp\ArduinoJson\src/ArduinoJson/Json/JsonSerializer.hpp:10,
                 from .pio\libdeps\teensy2pp\ArduinoJson\src/ArduinoJson/Variant/ConverterImpl.hpp:7,
                 from .pio\libdeps\teensy2pp\ArduinoJson\src/ArduinoJson.hpp:37,
                 from .pio\libdeps\teensy2pp\ArduinoJson\src/ArduinoJson.h:9,
                 from src\Marlin_main.cpp:52:
.pio\libdeps\teensy2pp\ArduinoJson\src/ArduinoJson/Serialization/Writers/ArduinoStringWriter.hpp: In member function 'size_t ArduinoJson6194_1::Writer<String, void>::flush()':
.pio\libdeps\teensy2pp\ArduinoJson\src/ArduinoJson/Serialization/Writers/ArduinoStringWriter.hpp:42:29: error: could not convert '((ArduinoJson6194_1::Writer<String, void>*)this)->ArduinoJson6194_1::Writer<String, void>::_destination->String::concat(((const char*)(&((ArduinoJson6194_1::Writer<String, void>*)this)->ArduinoJson6194_1::Writer<String, void>::_buffer)))' from 'String' to 'bool'
     if (_destination->concat(_buffer))
...

How does the PrintrBot Play differ from the PrintrBot Simple?

This person posted details on building v2.0 of Marlin for their PrintrBot Simple stating they couldn’t get the latest to work but the linked v2(update) did work. They use PlatformIO also so you can bypass the GUI interface and use commandline. Notice they say you’re likely to get a build error on the first try but a 2nd try should work( Crazy to even think that’s ok but people are used to this…Ctl-Alt-Del).

1 Like

thanks for your guide