Great!
I've seen your other thread about the feed rate switch.. It should be pretty easy to make it control the jog rate for the incremental moves as we've made it using the registers.
In the signal library for the FRO inputs, i'd just call mc.mcCntlSetFRO() API to set the feed rate, and then set the speed for the incremental moves using the function we made before cpSetJogRate(). If we check that the Jog Type is set to incremental it will prevent the FRO control changing the jog rate when the jog is set to continuous.
If you do this remove the setCpJogRate(100) I added for each of the incremental inputs in the signal library otherwise it will reset to 100 if you change increment value.
So you'd have something like this, I've not tested it but it should work...
[mc.ISIG_INPUT18] = function (state) -- Set FRO 100%
if(state == 1) then
local inst = mc.mcGetInstance()
mc.mcCntlSetFRO(inst, 100) --Set FRO value 100%
local hReg = mc.mcRegGetHandle(inst, "iRegs0/cpJogType")
local jogType = mc.mcRegGetValue(hReg)
if (jogType == mc.MC_JOG_TYPE_INC) then --Check that Jog Type is incremental
setCpJogRate(100) --Set jog rate for incremental to 100%
end
end
end,