More precise X, Y , Z co-ord display on LCD screen

I notice my first MP3DP has x y z co-ords displayed with a decimal point, ie a 123,4 arrangement, yet my other printers and CNC do not have the same detail. I would think that a CNC should try and use the whole screen to display the axis’s with greater precision than we are using at present. My CNC mill uses NANO keypad device to make some movements, yet the LCD screen does not update the display until a whole integer is reached.
Could someone please tell me where to find the stuff in Marlin. Is there a better firmware to implement this?
Errol.

The problem with that is that it’s all guesswork. Since we’re using an open loop control, at that level of precision, it’s anybody’s guess exactly where the tool is at any given moment. And when running gcode, it gets even more complex. Yes, in theory, we should be able to figure out where we are based on what signals have been sent to the drivers, but we don’t live in a theoretical world. And interpolating current location based on speeds and destination is… not optimal for a microcontroller that’s also trying to maintain real-time output of signals to the drivers.

That being said, Marlin doesn’t have very good support for real-time feedback of things like location. Grbl provides better feedback, but you still have to remember that it’s an open loop control. The motor is told to take a step in a certain direction, but we never know if it actually did.

I need a better precision for when I use the mill manually, more as a graphic readout, but it confirms the feed screws move when an input dimension less than a whole mm is required. Half my LCD screen is not used - no need for 3d printer items.
I do accept that the CNC machine in use is on its own when driven under a GCODE file, but I have been very impressed with how it all works, without step losses - I don’t overdo feeds.
Thanks.

The fact that it is open loop means nothing. Marlin is counting the steps and there are 200 steps/mm. There will be some error it doesn’t know about, but it definitely knows within 1/10th of a mm.

The only trouble is that the math to compute the current position from the step count can take long enough to cause trouble for the other real time operations it does. So M114 reports the next desired position, which is accurate when it stops.

But to answer OP’s question, there isn’t any magic in the marlin lcd. If you found the code that draws the position on the screen, it wouldn’t help you with your other machine and screen. If you have a screen that communicates via gcode, you can get a real time position using M114. If you are using a grbl controller, I believe you can get the coordinates with the right report settings and a ‘?’.

1 Like

I am still hunting for the Marlin info to change the display. I want to see all the axis’s report in a XXX.XX format at least.
It’s not so simple as I thought - even trying earlier Marlin versions have not produced the result I am looking for.
Thanks again.

I poked around in the code a bit and I discovered within Configuration_adv.h:
//#define LCD_DECIMAL_SMALL_XY

If you uncomment to
#define LCD_DECIMAL_SMALL_XY
then it will sometimes show one decimal place but it will show at most four characters (ftostr4sign) so you could get 12.3 or -5.5 but you won’t get decimals for values above 99.9 or below -9.9.

Deeper surgery on the screen is possible but more involved.

Thanks - I did try that but still does not give me what I require. My 3d prinetr has an older Marlin which gives what I need, but it has a Melzi board and a custom firmware which I cannot as yet port to the Mega/Ramps board on my CNC mill.
Still, the web has not let me down yet for a solution to the problem - just have to ask the right questions!

I found from old archives on the net, an earlier Marlin for Mega/RAMPS systems which gives the higher precision XYZ.
I found this page
http://www.makerfarm.com/index.php/printer-electronics/full-graphic-lcd-controller-with-smart-adapter.html which has a link to the old Marlin firmware.
Here is what my screen looks like now
I

1 Like

I found an alternative - A piece of software using GRBL as a base, but adapted to use a Mega 2560 board, with RAMPS, a Reprap Smart Discount LCD Controller (2004)with SD card which makes it a stand alone CNC system. It took a while to find I had to have the correct LCD adapter (can’t use a Full Graphics LCD adapter on the 2004 LCD).

Here is the source I used


It can use cloned X and Y axis stepper motors, which works well on my MPCNC as built.
But it has the precision I need, especially if one mainly machines metal.