Hurco post processor not outputting workoffset in NC file

Hurco post processor not outputting workoffset in NC file

Anonymous
544 Views
5 Replies
Message 1 of 6

Hurco post processor not outputting workoffset in NC file

Anonymous
Not applicable

Regardless of what WCS offset I enter, the outputted NC file does not contain any work offsets.

 

 

nickLR6Z4_0-1623392223907.png

 

nickLR6Z4_1-1623392315045.png

 

nickLR6Z4_2-1623392456597.png

 

Using:

nickLR6Z4_3-1623392554261.png

 

 

 

 

0 Likes
Accepted solutions (3)
545 Views
5 Replies
Replies (5)
Message 2 of 6

Arun.rs
Autodesk
Autodesk
Accepted solution

Hi @Anonymous 

 

Thanks for raising your concern via Forum.

 

Open post file in a 'Visual Studio Code' or 'Notepad++' to do the required modifications.

 

1. Got to line number 852 and 873 , remove ' /* ' and  ' */ ' from these lines.

 

  // wcs
  if (insertToolCall) { // force work offset when changing tool
    currentWorkOffset = undefined;
  }
  var workOffset = currentSection.workOffset;
  if (workOffset == 0) {
    warningOnce(localize("Work offset has not been specified. Using G54 as WCS."), WARNING_WORK_OFFSET);
    workOffset = 1;
  }
  if (workOffset > 0) {
    if (workOffset > 6) {
      error(localize("Work offset out of range."));
      return;
    } else {
      if (workOffset != currentWorkOffset) {
        writeBlock(gFormat.format(53 + workOffset)); // G54->G59
        currentWorkOffset = workOffset;
      }
    }
  }

 

Save the file and check the output.

 

Regards

 



Arun.RS
Technical Consultant - Post Processor
0 Likes
Message 3 of 6

AchimN
Community Manager
Community Manager
Accepted solution

Removed duplicated answer



Achim.N
Principal Technology Consultant
Message 4 of 6

Anonymous
Not applicable

Thank you! That worked!  

 

Is there a solution to use WCS beyond G59?  i.e. extended work offsets?

0 Likes
Message 5 of 6

Arun.rs
Autodesk
Autodesk
Accepted solution

HI @Anonymous 

 

Yes you can extend the work offset by adding some condition in post. 

 

1. Replace the below stuff from this : 

if (workOffset == 0) {
    warningOnce(localize("Work offset has not been specified. Using G54 as WCS."), WARNING_WORK_OFFSET);
    workOffset = 1;
  }
  if (workOffset > 0) {
    if (workOffset > 6) {
      error(localize("Work offset out of range."));
      return;
    } else {
      if (workOffset != currentWorkOffset) {
        writeBlock(gFormat.format(53 + workOffset)); // G54->G59
        currentWorkOffset = workOffset;
      }
    }

 

To This :

if (workOffset > 0) {
    if (workOffset > 6) {
      var p = workOffset - 6; // 1->...
      if (p > 300) {
        error(localize("Work offset out of range."));
        return;
      } else {
        if (workOffset != currentWorkOffset) {
          writeBlock(gFormat.format(54.1), "P" + p); // G54.1P
          currentWorkOffset = workOffset;
        }
      }
    } else {
      if (workOffset != currentWorkOffset) {
        writeBlock(gFormat.format(53 + workOffset)); // G54->G59
        currentWorkOffset = workOffset;
      }
    }

 

WCS.png

 

Hope this helps !

 

Regards



Arun.RS
Technical Consultant - Post Processor
0 Likes
Message 6 of 6

Anonymous
Not applicable

You're awesome @Arun.rs 

0 Likes