Hello Guest it is May 06, 2021, 08:49:09 PM

Author Topic: In order to use F5 as Feed Hold, do I write a script?  (Read 2768 times)

0 Members and 1 Guest are viewing this topic.

Offline DazTheGas

*
  •  753 753
  • DazTheGas
    • View Profile
Re: In order to use F5 as Feed Hold, do I write a script?
« Reply #10 on: January 01, 2016, 03:42:29 AM »
No reason they both do the same thing,

DazTheGas
Theres always time for a choccy biccy

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: In order to use F5 as Feed Hold, do I write a script?
« Reply #11 on: January 01, 2016, 05:38:19 PM »
the other way to do it is as a signal table, it work's the same as what Daz said to do


Code: [Select]
SignalTable = {001,
    [mc.ISIG_INPUT0] = function (on_off)
        if (on_off == 1) then
            mc.mcCntlCycleStart(inst)
        end
    end
}
SignalTable = {002,
    [mc.ISIG_INPUT1] = function (on_off)
        if (on_off == 1) then
            mc.mcCntlCycleStop(inst)
        end
    end
}
SignalTable = {003,
    [mc.ISIG_INPUT2] = function (on_off)
        if (on_off == 1) then
            mc.mcCntlReset(inst)
        end
    end
}
SignalTable = {004,
    [mc.ISIG_INPUT3] = function (on_off)
        if (on_off == 1) then
            mc.mcCntlFeedHold(inst)
        end
    end
}   
Re: In order to use F5 as Feed Hold, do I write a script?
« Reply #12 on: January 01, 2016, 10:57:41 PM »
Two Lua questions about your example:

1. Are these table constructors redeclaring SignalTable each time?  Shouldn't all the keys and functions be in one SignalTable?
2. What are the 001, 002, etc. for?

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: In order to use F5 as Feed Hold, do I write a script?
« Reply #13 on: January 02, 2016, 12:33:11 AM »
pass it's what I was told to do