572
« on: January 24, 2016, 06:53:26 AM »
As steve says the signal scripts are the way to make anything work you can think of within mach4
if you go into the screen editor and look at the startup script there are a few examples there.
For example if you were wanting to use your extra inputs you have left as jogging then you would need a signal for each axis you wanted to jog, so for xyz that would be 3 inputs altogether + any other buttons like jog mode.
[mc.ISIG_INPUT10] = function (state) -- assign input 10 to X++
if (state == 1) then
mc.mcJogVelocityStart(inst,0,1);
else
mc.mcJogVelocityStop(inst,0);
end
end,
Although the code above is straight forward you would have to add in extra stuff to your code to check if you are in 'cont' mode or 'inc' mode, because this signal is in a constant loop mach4 will also need a condition for this signal in the case you were using the keyboard jog or external control otherwise the mcJogVelocityStop or mcJogIncStop etc would overide other devices with jogging support rendering them useless.
DazTheGas