Firstly, add this script to the PLC Script and add some LED's to the screen that are labeled however you want them labeled for G98 and G99.
Then Set the LED's appropriately to Output62 for G98 and Output63 for G99.
-------------------------------------------------------
--Custom Scripts
-------------------------------------------------------
--Feed Type: Per Min or Per Rev
local inst = mc.mcGetInstance()
local FeedType = mc.mcCntlGetPoundVar(inst, 4005)
local Out62 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT62)
local Out63 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT63)
if FeedType == 98 then
mc.mcSignalSetState(Out62, 1)
else
mc.mcSignalSetState(Out62, 0)
end
if FeedType == 99 then
mc.mcSignalSetState(Out63, 1)
else
mc.mcSignalSetState(Out63, 0)
end
--End Custom Scripts
-------------------------------------------------------
Secondly, the issue you're having with the threading cycle not working with the G98 at the end could be coming from the look ahead on the control.
Add a "/" on the G98 line: --> /G98
This forces the control to stop the look ahead at this point.