Hello Guest it is April 24, 2024, 08:11:36 PM

Author Topic: G31 will run twice only  (Read 1205 times)

0 Members and 1 Guest are viewing this topic.

G31 will run twice only
« on: April 02, 2017, 11:20:17 AM »
This code seems correct.  No matter what I try, I can only get 2 probe moves.  It does the same thing in a loop with only 2 iterations then bombs out.    
The file is opening and 2 lines of x and y position are recorded correctly.  It will not do the third block.  The screen blinks at the end of the second block.
Any code after the second block is skipped so no message etc can be displayed.

Why is it aborting like this?

Quote

inst = mc.mcGetInstance()

mc.mcCntlGcodeExecuteWait(inst,"G90G00 X-4.2 Y-.6") --position at beginning at pin setpoint

mc.mcCntlProbeFileOpen(inst, "C:\\mach4Hobby\\GcodeFiles\\KFCProbeValues.csv","%.4AXIS_ %.4AXIS_Y\n", true)

     mc.mcCntlGcodeExecuteWait(inst,"G31 Y-.65 F20.0")
     mc.mcCntlGcodeExecuteWait(inst,"G91G00 X-.1 Y.07")
     mc.mcCntlGcodeExecuteWait(inst,"G90")

     mc.mcCntlGcodeExecuteWait(inst,"G31 Y-.65 F20.0")
     mc.mcCntlGcodeExecuteWait(inst,"G91G00 X-.1 Y.07")
     mc.mcCntlGcodeExecuteWait(inst,"G90")

     mc.mcCntlGcodeExecuteWait(inst,"G31 Y-.65 F20.0")
     mc.mcCntlGcodeExecuteWait(inst,"G91G00 X-.1 Y.07")
     mc.mcCntlGcodeExecuteWait(inst,"G90")


mc.mcCntlProbeFileClose(inst) --close probe file

Re: G31 will run twice only
« Reply #1 on: April 02, 2017, 01:35:47 PM »
Working fine now but not sure what I did to fix it!  Probing!!