Sorry for the delay been buried in College Football today. LOL
LUA Code for X DRO
local inst = mc.mcGetInstance()
local Xcoords = scr.GetProperty("droCurrentX", "value")
local hreg = mc.mcRegGetHandle (inst, string.format("Pokeys_32062 / LCD Line 1"))
Xcoords = string.format("X: %4.4f", Xcoords)
mc.mcRegSetValue(hreg, tostring (Xcoords).. " ")
LUA Code for Y DRO
local inst = mc.mcGetInstance()
local Ycoords = scr.GetProperty("droCurrentY", "value")
local hreg = mc.mcRegGetHandle (inst, string.format("Pokeys_32062 / LCD Line 2"))
Ycoords = string.format("Y: %4.4f", Ycoords)
mc.mcRegSetValue(hreg, tostring (Ycoords).. " ")
LUA Code for Z DRO
local inst = mc.mcGetInstance()
local Zcoords = scr.GetProperty("droCurrentZ", "value")
local hreg = mc.mcRegGetHandle (inst, string.format("Pokeys_32062 / LCD Line 3"))
Zcoords = string.format("Z: %4.4f", Zcoords)
mc.mcRegSetValue(hreg, tostring (Zcoords).. " ")
Here is the code that goes in the main LUA loop
--------------------------------------------------------------
-- Yaskawa Pendant Clear LCD Display
--------------------------------------------------------------
function YPenLCD()
local hreg = mc.mcRegGetHandle(inst, string.format("PoKeys_32062/LCD Line 1"))
mc.mcRegSetValueString(hreg, "X: 0.0000 ") -- X zero display
local hreg = mc.mcRegGetHandle(inst, string.format("PoKeys_32062/LCD Line 2"))
mc.mcRegSetValueString(hreg, "Y: 0.0000 ") -- Y zero display
local hreg = mc.mcRegGetHandle(inst, string.format("PoKeys_32062/LCD Line 3"))
mc.mcRegSetValueString(hreg, "Z: 0.0000 ") -- Z zero display
local hreg = mc.mcRegGetHandle(inst, string.format("PoKeys_32062/LCD Line 4"))
mc.mcRegSetValueString(hreg, "A: 0.0000 ") -- A zero display
end
--function YPenLCD(Axis, Line)
-- local CurPos = scr.GetProperty("droCurrent" .. tostring(Axis), "Value")
-- CurPos = string.format("%4.4f", CurPos)
-- local hreg = mc.mcRegGetHandle(inst, string.format("PoKeys_32062/LCD Line " .. tostring(Line)))
-- mc.mcRegSetValueString(hreg, string.format(tostring(Axis) .. ": " .. tostring(CurPos) .. " "))
--end
Russ