17. Work on the LUA scripting to make my control panel buttons work.
??? This is where the problems start. Could anyone show me how to have a physical button on my console turn on an output?
Not one of the prewired ones like coolant or spindle but just a generic output like a MACH3 OEM
Example.
[mc.mcinsig_input] BLA BLA BLA [mc.mcosig5]
I think that something like this will work for the basic stuff
SignalTable = {
[mc.ISIG_INPUT1] = function (on_off)
if (on_off == 1) then
mc.mcCntlCycleStart(inst)
[mc.ISIG_INPUT2] = function (on_off)
if (on_off == 1) then
mc.mcCntlCycleStop(inst)
[mc.ISIG_INPUT3] = function (on_off)
if (on_off == 1) then
mc.mcCntlFeedHold(inst)
[mc.ISIG_INPUT4] = function (on_off)
if (on_off == 1) then
mc.mcCntlEStop(inst)
[mc.ISIG_INPUT5] = function (on_off)
if (on_off == 1) then
mc.mcCntlCycleStop(inst)
[mc.ISIG_INPUT6] = function (on_off)
if (on_off == 1) then
mc.mcCntlCycleStop(inst)
end
end
}
TIA
Mike