Page 1 of 1

Preheat control for flame cutting

Posted: Sun Dec 18, 2022 11:42 pm
by legacytorch
I would like to setup the software to control an output for a preheating solenoid for flame cutting. I want to have it controllable by a macro keyboard, the vcp and m code. Specifically I want the gcode to be able to pause at the beginning of a cut (m00), let me activate preheating, start the cut and resume gcode manually, then turn the output off in gcode at the end of each cut. I have mapped an aux key to a macro and it works great. I can use the macro keyboard, vcp, and mcode in the mdi. However when I try to use in a running gcode the program ends. I'm sure this is normal function of cnc12, can I get around that? I also want it to toggle on/off with one button, which it does the way I have done it using one macro to link to two others and check the output state. I have also tried to map the aux key directly to the output in the PLC as in this video. https://youtu.be/lPUgKjVXukw My hope is this would allow me to control the output while the gcode is running. It seems to compile fine and the light on the button in the vcp changes but the output is not controlled. I am assuming I need to change the parameter to something. Currently it is 0.0000 but I don't know what to change it to. What I am asking is, am I barking up the wrong tree and what I want is easier some other way? Or am I in the ball park and just need a few tweaks to get there?

Re: Preheat control for flame cutting

Posted: Mon Dec 19, 2022 12:04 am
by legacytorch
This is the code I added to the PLC

Code: Select all

;Turn on OUTPUT6 on/off with each press of Aux3
If SkinAux3_M THEN (Aux3PD)
If (Aux3PD ^ Aux3LED) THEN (Aux3LED)
If Aux3LED THEN (OUT6)