[mc.ISIG_INPUT20] = function(state) --X servo alarm port1 pin10 if(state==1)then mc.mcCntlEStop(inst) local handle=mc.mcRegGetHandle(inst,"iRegs0/XAlarm") mc.mcRegSetValue(handle,1) else local handle=mc.mcRegGetHandle(inst,"iRegs0/XAlarm") mc.mcRegSetValue(handle,0) end end, [mc.ISIG_INPUT21] = function(state) --Y servo alarm port1 pin11 if(state==1)then mc.mcCntlEStop(inst) local handle=mc.mcRegGetHandle(inst,"iRegs0/YAlarm") mc.mcRegSetValue(handle,1) else local handle=mc.mcRegGetHandle(inst,"iRegs0/YAlarm") mc.mcRegSetValue(handle,0) end end, [mc.ISIG_INPUT22] = function(state) --Z servo alarm port1 pin12 if(state==1)then mc.mcCntlEStop(inst) local handle=mc.mcRegGetHandle(inst,"iRegs0/ZAlarm") mc.mcRegSetValue(handle,1) else local handle=mc.mcRegGetHandle(inst,"iRegs0/ZAlarm") mc.mcRegSetValue(handle,0) end end, [mc.ISIG_INPUT23] = function(state) --A servo alarm port1 pin13 if(state==1)then mc.mcCntlEStop(inst) local handle=mc.mcRegGetHandle(inst,"iRegs0/AAlarm") mc.mcRegSetValue(handle,1) else local handle=mc.mcRegGetHandle(inst,"iRegs0/AAlarm") mc.mcRegSetValue(handle,0) end end, [mc.ISIG_INPUT24] = function(state) --B servo alarm port1 pin15 if(state==1)then mc.mcCntlEStop(inst) local handle=mc.mcRegGetHandle(inst,"iRegs0/BAlarm") mc.mcRegSetValue(handle,1) else local handle=mc.mcRegGetHandle(inst,"iRegs0/BAlarm") mc.mcRegSetValue(handle,0) end end, [mc.ISIG_INPUT29] = function(state) --C servo alarm port2 pin2 if(state==1)then mc.mcCntlEStop(inst) local handle=mc.mcRegGetHandle(inst,"iRegs0/CAlarm") mc.mcRegSetValue(handle,1) else local handle=mc.mcRegGetHandle(inst,"iRegs0/CAlarm") mc.mcRegSetValue(handle,0) end end, [mc.ISIG_INPUT25] = function(state) --AXIS1 port3 pin6 if(state==1)then local handle=mc.mcRegGetHandle(inst,"iRegs0/AXIS1") mc.mcRegSetValue(handle,1) else local handle=mc.mcRegGetHandle(inst,"iRegs0/AXIS1") mc.mcRegSetValue(handle,0) end ChangeJogAxis() end, [mc.ISIG_INPUT26] = function(state) --AXIS2 port3 pin7 if(state==1)then local handle=mc.mcRegGetHandle(inst,"iRegs0/AXIS2") mc.mcRegSetValue(handle,1) else local handle=mc.mcRegGetHandle(inst,"iRegs0/AXIS2") mc.mcRegSetValue(handle,0) end ChangeJogAxis() end, [mc.ISIG_INPUT27] = function(state) --F-S port3 pin8 if(state==1)then local handle=mc.mcRegGetHandle(inst,"iRegs0/F-S") mc.mcRegSetValue(handle,0) else local handle=mc.mcRegGetHandle(inst,"iRegs0/F-S") mc.mcRegSetValue(handle,1) end ChangeJogAxis() end,