Hi folks,
I'm Josh...new around here. I've read a lot on this forum, built a machine, immediately jumped from Mach3 to Mach4 and have been working Lua a bit. Currently, I have a signal library built in the screen load script to watch for ISIG_INPUT0 events that will stop the axis from moving (Gcode cycles and jogging) from the basic if statement in the signal script. This works. Because G31 is not supported by my hardware yet I am trying to find a work around with programming the AutoToolSet button. The issue I am having is that the signal library is not recognizing the mc.mcCntlGcode...calls to stop the axis from moving when I code in Lua the button scripts. I think that screen scripts are different than mCode scripts from an interpreter standpoint that load into a different stack/buffer?.?.?... Anywho, any recommendations on how to say the signal library can recognize a call to mc.mcCntlGcodeExecute(inst, "G01 X...Y...Z..F.../n") and recognize an input signal mapped to mc.ISIG_INPUT0 in the signal library to stop the axis? Also, for kicks, if I call mc.mcCntLoadlGcode or string or file, how do I get that to execute? mc.mcCntlEnabled(inst, 1), mc.mcCntrlCycleStat(inst) doesn't execute the string (I've also tried incorporating input/output handle/get/set state function calls in the algorithm). I think I am missing something easy here...I am just asking for some direction and I can take Mach4 for a ride
) I pretty much memorized the calls get/set/do from the down and dirty Lua pdf, scripting manual, pound variable list, signals list, the Spaced Out Lua reference (that was awesome!), Mach4 API, Lua Calls, etc. (yep, there is a reason why I am divorced
) I can't remember "her" birthday but sure as ********* can remember programming function calls! Hope to hear from y'all and promise to share any code that may be relevant to new users coming from Mach3. After all, Mach 4 Hobby users are the beta testers for NFS. Great business strategy btw...crowd source beta testing...at a little cost. But, I've learned so much that it's okay with me and am glad to become apart of the community. Now...if I can cut my first part before I am 100 yrs. old...reliability, repeatability, and accuracy; it is computer numerical control for a reason, lol. Yes, I've learned Gcode sequences too, but the beauty of Mach4 is combining Lua and Gcode to execute a block. The potential capabilities are pretty darn good. I just need a strip map to let screen calls and mCode macro calls communicate with global function / reference tables and the signal script. My two cent...ok, may three cents...
-josh