Community
HSM Support Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pattern Post produce unnecessary delay

4 REPLIES 4
Reply
Message 1 of 5
Eli_Dexter
237 Views, 4 Replies

Pattern Post produce unnecessary delay

When doing Pattern of one or more operations post processor (Tormach in my case) is adding a  line Sxxxx M3 M8 for each element of the pattern. This causes a small delay (1 sec or so) in the execution of the code. When the number of pattern elements is small this delay is insignificant. But when the number of patterned elements grows all the small delays can accumulate into a few minutes extra execution time.

Is there a way not to output that line if the operation order in the pattern is either "Order by Tool" or "Order by Operation"?

 

Thanks

Tags (3)
4 REPLIES 4
Message 2 of 5
FTKnur
in reply to: Eli_Dexter

Hi @Eli_Dexter,

 

you can try this:

 

  	  	if (currentSection.isPatterned && currentSection.isPatterned() && getCurrentSectionId() > 0){
			if (!(getPreviousSection().getPatternId() == currentSection.getPatternId())){
				//example code or existing code for M3 M8
			}
		}

 

 

If you don't know what to do: attach a Part with CAM with your pattern, your Postprocessor and a correct, changed G-Code

Message 3 of 5
Eli_Dexter
in reply to: FTKnur

Thanks for your help. I have tried your suggestion - not sure exactly where the code belongs. So I have found in the Function onSection() the following code:

...

if (true ||
     insertToolCall ||
     isFirstSection() ||
    (rpmFormat.areDifferent(spindleSpeed, sOutput.getCurrent())) ||
    (tool.clockwise != getPreviousSection().getTool().clockwise)) {
  if (spindleSpeed < 0) {
    error(localize("Spindle speed out of range."));
    return;
  }
  if (spindleSpeed > 99999) {
    warning(localize("Spindle speed exceeds maximum value."));
  }
  if (spindleSpeed == 0) {
    writeBlock(mFormat.format(5), c[0], c[1], c[2], c[3], formatComment("SPINDLE IS OFF"));
  } else {
    writeBlock(
      sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4), c[0], c[1], c[2], c[3]
    );
    if ((spindleSpeed > 5000) && properties.waitForSpindle) {
      onDwell(properties.waitForSpindle);
    }
  }
}

...

I have inserted your code in the following manner:

if (true ||
     insertToolCall ||
     isFirstSection() ||
    (rpmFormat.areDifferent(spindleSpeed, sOutput.getCurrent())) ||
    (tool.clockwise != getPreviousSection().getTool().clockwise)) {
  if (spindleSpeed < 0) {
    error(localize("Spindle speed out of range."));
    return;
  }
  if (spindleSpeed > 99999) {
    warning(localize("Spindle speed exceeds maximum value."));
  }
  if (spindleSpeed == 0) {
    writeBlock(mFormat.format(5), c[0], c[1], c[2], c[3], formatComment("SPINDLE IS OFF"));
  } else {

    if (currentSection.isPatterned && currentSection.isPatterned() && getCurrentSectionId() > 0){
      if (!(getPreviousSection().getPatternId() == currentSection.getPatternId())){
        writeBlock(
          sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4), c[0], c[1], c[2], c[3]
        );
        if ((spindleSpeed > 5000) && properties.waitForSpindle) {
          onDwell(properties.waitForSpindle);

        }

      }
    }
  }
}

Unfortunately, that code did not output SxxxX M3 M8 anywhere in the NC file. It skipped that line everywhere...

I will show the current output and desired output in the new post.

Message 4 of 5
Eli_Dexter
in reply to: FTKnur

Original Post:

( vendor Tormach)
( model 770)
( description Tormach 770 CNC Machine)
(T1 D=0.25 CR=0. - ZMIN=-0.06 - flat end mill)
(T2 D=0.0937 CR=0. - ZMIN=-0.06 - flat end mill)
(T3 D=0.25 CR=0. TAPER=45deg - ZMIN=-0.0425 - chamfer mill)
G90 G54 G64 G50 G17 G40 G80 G94 G91.1 G49
G20 (Inch)
G30

N10(2D Pocket2)
T1 G43 H1 M6
S3750 M3 M8
G54
...
M5 M9
G30

 

N20(2D Contour4)
T2 G43 H2 M6
S3750 M3 M8

...
G0 Z0.1

 

N30(2D Contour4)
S3750 M3 M8

...
G0 Z0.1

...

N810(2D Contour4)
S3750 M3 M8

...
G0 Z0.1

M5 M9
G30

 

N820(2D Contour2)
T3 G43 H3 M6
S5000 M3 M8

...

 

The Desired Code should be:

...

N10(2D Pocket2)
T1 G43 H1 M6
S3750 M3 M8
G54
...
M5 M9
G30

 

N20(2D Contour4)
T2 G43 H2 M6
S3750 M3 M8

G0 ...

...
G0 Z0.1

 

N30(2D Contour4)
G0...

...
G0 Z0.1

...

N810(2D Contour4)
G0...

...
G0 Z0.1

M5 M9
G30

 

N820(2D Contour2)
T3 G43 H3 M6
S5000 M3 M8

...

 

Hope this explains what I meant.

 

Message 5 of 5
FTKnur
in reply to: Eli_Dexter

Can you attach the Files? Thats the easiest way to help you.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report