PC_COMM_HALT_NEXT_LINE issue
Posted: Wed Feb 17, 2021 5:13 pm
Hello.
In a drill machine i'm retrofiting i need to move the drill head (axis X) + direction until a bit is reset, in order to find the beginning of the part to be drilled.
I but in the begining of gcode a M100 command, which should do this operation.
I programed the M100 function "in KmotionCNC" to set a I/O bit the bit 60.
In the c init program endless loop i check this bit in order to execute the M100 function.
This M100 function should DoPC(PC_COMM_HALT_NEXT_LINE) in order to pause the gcode until the part is found and then resume the execution of the rest of the gcode. My problem is that the gcode does not halt to the next line, but continues. When i use the DoPC(PC_COMM_HALT) then it works fine, but i need to press again the continue button in order to resume the gcode. Why do this happen? Please advice.
Attached is the init c program and the gcode.
In a drill machine i'm retrofiting i need to move the drill head (axis X) + direction until a bit is reset, in order to find the beginning of the part to be drilled.
I but in the begining of gcode a M100 command, which should do this operation.
I programed the M100 function "in KmotionCNC" to set a I/O bit the bit 60.
In the c init program endless loop i check this bit in order to execute the M100 function.
This M100 function should DoPC(PC_COMM_HALT_NEXT_LINE) in order to pause the gcode until the part is found and then resume the execution of the rest of the gcode. My problem is that the gcode does not halt to the next line, but continues. When i use the DoPC(PC_COMM_HALT) then it works fine, but i need to press again the continue button in order to resume the gcode. Why do this happen? Please advice.
Attached is the init c program and the gcode.