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.
PC_COMM_HALT_NEXT_LINE issue
Moderators: TomKerekes, dynomotion
PC_COMM_HALT_NEXT_LINE issue
- Attachments
-
- B2.ngc
- (6.95 KiB) Downloaded 81 times
-
- Init3Analog.c
- (22.25 KiB) Downloaded 81 times
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: PC_COMM_HALT_NEXT_LINE issue
Hi,
I think that Halting/Executing approach will have many timing issues.
Why not have the M100 execute a C Program to Jog until the bit changes, stop, then terminate. Program KMotionCNC to execute/wait/sync. Then in the GCode after the M100 do the G92X360.
I think that Halting/Executing approach will have many timing issues.
Why not have the M100 execute a C Program to Jog until the bit changes, stop, then terminate. Program KMotionCNC to execute/wait/sync. Then in the GCode after the M100 do the G92X360.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: PC_COMM_HALT_NEXT_LINE issue
Yes that worked fine, thank you.