Hi,
OK, I have some code to drive the two new DROs in work coordinates.
First you need to make two new instance registers iRegs0/workZMax and iRegs0/workZMin, attached
The two DRO's need their driving register set in the DRO properties, I've shown Z_Min, attached
And then this code needs to go in the PLC script:
--*****************************************************************************
local zOffset=mc.mcCntlGetOffset(inst,mc.Z_AXIS,mc.MC_OFFSET_FIXTURE)
local workZMaxHandle=mc.mcRegGetHandle(inst,'core/inst/PathZmax')
local workZMax=mc.mcRegGetValue(workZMaxHandle)-zOffset
local workZMaxHandle=mc.mcRegGetHandle(inst,'iRegs0/workZMax')
mc.mcRegSetValue(workZMaxHandle,workZMax)
local workZMinHandle=mc.mcRegGetHandle(inst,'core/inst/PathZmin')
local workZMin=mc.mcRegGetValue(workZMinHandle)-zOffset
local workZMinHandle=mc.mcRegGetHandle(inst,'iRegs0/workZMin')
mc.mcRegSetValue(workZMinHandle,workZMin)
--**********************************************************************************
Pretty quick and dirty code but it seems to work.
Craig