I want to be able to press a button in my program and then it will run a G-Code job. I can currently load a g-code program into CNC12 through my software, and then I can run that by pressing the Cycle Start button, but we're hoping to cut out the second step.
I've used this line of code to load the g-code file to CNC12 (with "currentFileName" being the file path to the file chosen by the user)
Code: Select all
m_skin.job.Load(currentFileName, @"C:\cncm\");
Code: Select all
m_Skin.job.RunNow(@"C:\cncm\");
The Skinning API is not super in-depth so I'm not sure if there's a problem with how I'm using the function, or if this is even the correct function that I should be using. If anyone has done something similar and has some input I'd love to hear it.
Worst case scenario is that we just have the user press the Cycle Start button on our pendant. (honestly I think that's right thing to do, but I'm not the one in charge)