Post error??

Post - DTHC-HYT-TAP-rev11B (modified)

I am getting a visible delay or pause when going from lead-in to small circles, but not from lead-in to shapes/lines.

My code looks like this

N2060 M01 (Paused: Hit RUN to continue)
N2070 X440.792 Y1076.021
N2080 M900 (Check for Z active)
N2090 M08 (Turn on extract fan)
N2100 G28.1 Z5.00 (Start Touch-Off )
N2110 G92 Z0.0
N2120 G00 Z1.730 (Switch Offset Lift)
N2130 G92 Z0.0
N2140 G00 Z3.8000
N2150 M03
N2160 G01 Z1.500 F1300.0
N2170 S10 (DTHCa is OFF)
N2180 X434.794 Y1076.170 F2460.0
N2190 S10 (DTHCb is OFF)
N2200 S10 (DTHCb is OFF)
N2210 G03 X440.298 Y1070.457 I5.573 J-0.138
N2220 X445.942 Y1076.032 I0.069 J5.574

I have added a & b at Lines 2170/2190/2200 for debugging, should there be two entries here?

Could this cause a delay or am i looking in the wrong place???

Any help much appreciated

Could you send me a copy of the job file (file->save job). As you say those DTHC off commands probably shouldn’t be there. What happens if you manually delete them from the code?

Thanks for looking Les, I have sent the file as a PM.

I have not tried manually deleting the duplicates yet.

I think I have narrowed it down to where sheetcam auto detects outside or inside cuts -

Job has outside cut only = code ok
Job has inside cut only = code ok
Job has outer and inner cuts, sheetcam set for outside and auto detects the inside = duplicate entries.

Hope that helps.

I have attached a copy of my post, just in case :slight_smile:

Little more info…

Looking at my Post above, I have commented out all the code surrounding the part marked ‘DTHCb’, I have no idea what this code does but the output looks perfectly normal without it and there are no duplicate entries now.

          if(dthcOff >0 and entityLength * scale > minLength) then
		     --nothing  
		  else
		     post.Text (thcOffCode)
			 if (verbose == true) then
			 post.Text (" (DTHCb is OFF)")
			 end
			 post.Eol()
		    thcstate = 0
	      end 
	 end

Now looks like…

          if(dthcOff >0 and entityLength * scale > minLength) then
		     --nothing  
		  else
		     --post.Text (thcOffCode)
			 --if (verbose == true) then
			 --post.Text (" (DTHCb is OFF)")
			 end
	        --post.Eol()
		    --thcstate = 0
	      end 
	 end

It may not matter as well, but the DTHC off code comes after the pierce starts, would it not be better before? that way there are no control codes in the basic G-Code sections??
Just a thought.

I will be testing the new output this weekend.

That post was written by Tom at CandCNC so I’m not all that familiar with how it works but I think the seventh line in your sample should be commented out. Again I’m not sure exactly why Tom turns off THC after the pierce. His system is quite sophisticated and there is probably a very good reason why he does that.

Thanks Les, I didn’t know that, will approach Tom directly.

Surely if i simply comment out the “End” line, it will throw an error as the “end” surely matches an 'If" somewhere?

Will have a look, simply commenting out what i did has certainly worked, there are no more duplicates now and the code seems to cut fine, i will test the same circle job i discovered the delay on later today but it does look like the duplicate lines caused the delay from lead-in to circle.

It matches the if that you commented out two lines previously :slight_smile:

Oops, apologies, it was a typo when i pasted it here, the “If” is not commented out…

  if(dthcOff >0 and entityLength * scale > minLength) then 
           --nothing  
        else 
           --post.Text (thcOffCode) 
          if (verbose == true) then 
          --post.Text (" (DTHCb is OFF)") 
          end 
           --post.Eol() 
          --thcstate = 0 
         end 
    end

It wouldn’t have worked as I showed it :wink: