Hi All
I am not a Lua programer - I'm a good copier of what people have done before. And so on my external control panel I have most of the buttons working great such as "cycle start, "feed hold" and "stop as I have been able to copy them from other peoples previous work.
So my last stage is to get my jog buttons to work - I have X plus, X minus, Y plus buttons and so on. I would like them to work as they do on the "jog tab"on the screen - pick up the increment setting, continuous or incremental jog type - basically mirror what happens when you press the button on the screen.
Is there a way to access the script that these screen buttons do when pressed? If not could someone who understands Lua write me one example of how to do this please so I can put it into my screen load script?
My thought so far are -
- read if the button is pressed (mc.ISIG_Input4 - or to suit the input set up for the button) function = (state)
if (state == 1) then
Button Down (help here please)
- read the increment setting (help here please)
- read incremental or continuous jog setting (help here please)
- start the jog for the correct axis and settings above - stop after 1 increment if set for incremental jog (help here please)
Button Up (help here please)
- stop the jog if set for continuous jog (help here please)
end
end,
Any help would be appreciated - I am lost without you guys.
Thank you for your time.
Regards
Steve