Chaoticone,
That is exactly what I was going to attempt. The following code kind of works. Let me explain.
When you start up Mach4 many times it does not write to the LCD display, not exactly sure why.
If you load the roadrunner TAP file and enable the machine and start running the LCD display suddenly starts following the On Screen DROs.
These are displayed correctly for example screen shows 23.4567, now the LCD shows 23.4567, so that part is great. Still need to figure out how to clear the display prior to these writes as it only updates the 4%.4f digits.
The next issue is also strange. If I stop the Gcode, then press zero X that updates on the LCD display just fine, but if I try that to Y,Z, or A they do not update to zero.
Not sure if I need to grab the instance before each get handle, but that is not required in the screen load scripts. Not positive. Scratching my head on this one.
The other thing I would like to display X: before the actual data on each line, so the axis shows.
Getting closer thanks for the help Chaoticone.
Russ
local inst = mc.mcGetInstance()
local Xcoords = scr.GetProperty("droCurrentX","Value")
local Ycoords = scr.GetProperty("droCurrentY","Value")
local Zcoords = scr.GetProperty("droCurrentZ","Value")
local Acoords = scr.GetProperty("droCurrentA","Value")
Xcoords = string.format("%4.4f", Xcoords)
Ycoords = string.format("%4.4f", Ycoords)
Zcoords = string.format("%4.4f", Zcoords)
Acoords = string.format("%4.4f", Acoords)
local hreg = mc.mcRegGetHandle(inst, string.format("PoKeys_32062/LCD Line 1"))
mc.mcRegSetValueString(hreg, tostring(Xcoords))
local hreg = mc.mcRegGetHandle(inst, string.format("PoKeys_32062/LCD Line 2"))
mc.mcRegSetValueString(hreg, tostring(Ycoords))
local hreg = mc.mcRegGetHandle(inst, string.format("PoKeys_32062/LCD Line 3"))
mc.mcRegSetValueString(hreg, tostring(Zcoords))
local hreg = mc.mcRegGetHandle(inst, string.format("PoKeys_32062/LCD Line 4"))
mc.mcRegSetValueString(hreg, tostring(Acoords))