function m168() local inst, hReg inst = mc.mcGetInstance() --Get the instance of Mach4 hReg= mc.mcRegGetHandle(inst, "gRegs0/CycleCnt") local value = mc.mcRegGetValue(hReg) value=value+1 mc.mcRegSetValue(hReg,value) end if (mc.mcInEditor() == 1) then m168() end