Sorry previous post was for cut speed
Here is what i have for jogging speed
Part 1
[mc.ISIG_INPUT19] = function (state)
local AltRegH = mc.mcRegGetHandle(inst, 'iRegs0/Alt')
local AltVal = mc.mcRegGetValue(AltRegH)
if (state == 1) then
if(machEnabled==1) then
if (AltVal == 0) then
JogSpeedMinus()
elseif (AltVal == 1) then
JogSpeedPlus()
end
end
end
end,
Part 2
--------------------------------------
--jog speed plus function
---------------------------------------
function JogSpeedPlus()
local JogMaxS = 100
local JogMax = tonumber(JogMaxS)
local JogNowS = scr.GetProperty('sliJogRate', 'Value')
local JogNow = tonumber(JogNowS)
if (JogNow >= JogMax) then
JogNow = JogMax
else
if (JogNow >= 5) then
JogNow = JogNow + 5
else
JogNow = 5
end
end
rc = scr.SetProperty('sliJogRate', 'Value', tostring(JogNow))
end
--------------------------------------
--jog speed minus function
---------------------------------------
function JogSpeedMinus()
local JogMinS = 1
local JogMin = tonumber(JogMinS)
local JogNowS = scr.GetProperty('sliJogRate', 'Value')
local JogNow = tonumber(JogNowS)
if (JogNow <= JogMin) then
JogNow = JogMin
else
if (JogNow >= 6) then
JogNow = JogNow - 5
else
JogNow = JogNow - 1
end
end
rc = scr.SetProperty('sliJogRate', 'Value', tostring(JogNow))
end