try this...
Operator -> Edit Screen -> insert new DRO -> label 'droXdrillOne', DRO code is blank, Editor = In Place, make any other personal formatting changes
-> insert new DRO -> label 'droXdrillTwo', DRO code is blank, Editor = In Place, make any other personal formatting changes
Goto PLC script, try the following code. It's a start at least. mc.mcAxisGetMachinePos vs. mc.mcAxisGetPos = your preference of display
do
local inst = mc.mcGetInstance()
local Xpos = mc.mcAxisGetMachinePos (inst, 0)
local myOffset1 = ----enter your axis offset, drill 1----
local myOffset2 = ----enter your axis offset, drill 2----
local drillOneOffset = Xpos + myOffset1
local drillTwoOffset = Xpos + myOffset2
scr.SetProperty('droXdrillOne', 'Value', 'tostring(drillOneOffset))
scr.SetProperty('droXdrillTwo', 'Value', 'tostring(drillTwoOffset))
end
There are many ways to accomplish what you would like to do. This is just one possible solution. Add, delete, modify, Play!
