Posting out extra work offsets? (G54.1 Pxx)

Posting out extra work offsets? (G54.1 Pxx)

LibertyMachine
Mentor Mentor
2,028 Views
9 Replies
Message 1 of 10

Posting out extra work offsets? (G54.1 Pxx)

LibertyMachine
Mentor
Mentor

Using a modified Fanuc post in Fusion 360.

In the WCS dialog, calling out 0-6 behaves as expected. When I call out a 7 or higher, it gives me the proper G54.1 Pxx value. However, it's only on the first tool and it's subsequently followed with a G60 (or higher Gxx)

 

T11 M6 (.500 RGH EM)
G54.1 P1
G0 G60 X.8275 Y-.36 S1800 M3

..

..

..

G53 Z0 M19

M1

T12 M6 (.500 FIN EM)
G0 G60 X.8275 Y-.2437 S1700 M3

...

...

...

G53 Z0 M19

M1

 

 

 

What I'm looking for:

G54.1 Pxx in every tool call like this:

 

T12 M6 (.500 FIN EM)
G0 G54.1 P1 X.8275 Y-.2437 S1700 M3

 

No call out for G6xx, as my machine doesn't recognize it.

 

Thanks!


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
0 Likes
Accepted solutions (1)
2,029 Views
9 Replies
Replies (9)
Message 2 of 10

skidsolo
Alumni
Alumni

you need to remove this marked in red in the post:

basically the post only writes out the workfixture offset if it is "not the same as" the previous one.

 

if (workOffset > 0) {

  if (workOffset > 6) {

    var p = workOffset - 6;

    if (p > 300) {

      error(localize("Work offset out of range."));

      return;

} else {

if (workOffset != currentWorkOffset) {

writeBlock(gFormat.format(54.1), "P" + p);

currentWorkOffset = workOffset;

}

}

} else {

if (workOffset != currentWorkOffset) {

writeBlock(gFormat.format(53 + workOffset));

// G54->G59 currentWorkOffset = workOffset; } } }

Andrew W. Software engineer (CAM Post Processors)
0 Likes
Message 3 of 10

LibertyMachine
Mentor
Mentor

Now, that works to output the G54.1 Pxx on each tool. Not in the location that I would prefer, but it's a start.

However, the G6x is showing up, and it's not a code I (or my machine) recognize.

 

What I have with G54-59 offsets:

 

T12 M6 (.500 FIN EM)
G0 G54 X.8275 Y-.2437 S1700 M3
G43 Z.2 H12 M8 T21

 

 

What I would like to see for the G54.1 Pxx:

 

T12 M6 (.500 FIN EM)
G0 G54.1 P3 X.8275 Y-.2437 S1700 M3
G43 Z.2 H12 M8 T21

 

 

What I'm getting:

 

T12 M6 (.500 FIN EM)
G54.1 P3
G0 G62 X.8275 Y-.2437 S1700 M3
G43 Z.2 H12 M8 T21


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
0 Likes
Message 4 of 10

skidsolo
Alumni
Alumni

to remove the G60 Find this line in the post, and remove whats highlighted in red dont forget the comma!

 

gMotionModal.format(0), gAbsIncModal.format(90), gFormat.format(53 + workOffset), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y), sOutput.format(tool.spindleRPM), mFormat.format(tool.clockwise ? 3 : 4));

Andrew W. Software engineer (CAM Post Processors)
0 Likes
Message 5 of 10

skidsolo
Alumni
Alumni

To move the workfixture offset:

find this in the post and add/edit whats highlighted in red.

 

line 751 var wfo =(gFormat.format(54.1) + " P" + p); // G54.1P

 

this just puts the offset string into a variable

 

line 859 gMotionModal.format(0), gAbsIncModal.format(90), wfo, xOutput.format(initialPosition.x), yOutput.format(initialPosition.y), sOutput.format(tool.spindleRPM), mFormat.format(tool.clockwise ? 3 : 4));

 

again dont forget the commas! this just writes the variable "wfo"out in the move to the initial posistion.

 

 

Andrew W. Software engineer (CAM Post Processors)
0 Likes
Message 6 of 10

LibertyMachine
Mentor
Mentor

Hmm. With the rest of the tweaks that have been done to my post over the last year, making the change as you suggest does not have the desired effect.

Yes, it removes the G60, but it also removes the G54.1 Pxx on each tool, and when I call out a standard G54-59 call, it does not post that either:

 

 

T1 M6 (.500 EM)

G0 X.1 Y.1 S1500 M3

G43 H1

 

 

Further research needs to be done. Sadly, I'm done for the day, time to head home and go to my second job (my own machine shop 😛 )


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
0 Likes
Message 7 of 10

LibertyMachine
Mentor
Mentor

@skidsolo wrote:

To move the workfixture offset:

find this in the post and add/edit whats highlighted in red.

 

line 751 var wfo =(gFormat.format(54.1) + " P" + p); // G54.1P

 

this just puts the offset string into a variable

 

line 859 gMotionModal.format(0), gAbsIncModal.format(90), wfo, xOutput.format(initialPosition.x), yOutput.format(initialPosition.y), sOutput.format(tool.spindleRPM), mFormat.format(tool.clockwise ? 3 : 4));

 

again dont forget the commas! this just writes the variable "wfo"out in the move to the initial posistion.

 

 


 

 

I will give this a shot either this evening or tomorrow morning, I'll let you know!


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
0 Likes
Message 8 of 10

skidsolo
Alumni
Alumni
Accepted solution

Thats because this section has been remarked out with //: this section controls the output of work fixture offsets G54 to G59

 

//Block deleted next 6 blocks to not output G5x once only. Moved the gFormat line to positioning line (approx N852) STM 1/31/15

//else {

//if (workOffset != currentWorkOffset) {

//writeBlock(gFormat.format(53 + workOffset));// G54->G59

//currentWorkOffset = workOffset;

//}

//}

 

you should remove the // on each line starting at else then change as before assigning wfo as the text to output on the initial posistion.

 

//Block deleted next 6 blocks to not output G5x once only. Moved the gFormat line to positioning line (approx N852) STM 1/31/15
else {
 
 var wfo = (gFormat.format(53 + workOffset));// G54->G59

  currentWorkOffset = workOffset;
}

Andrew W. Software engineer (CAM Post Processors)
Message 9 of 10

LibertyMachine
Mentor
Mentor

Andrew,

 

Thank you very much. That last post works excellent.

 

Yeah.....I don't claim to be a post editor. I just muddle my way along and find ghetto ways around what I need them to do...


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
0 Likes
Message 10 of 10

faraucano
Contributor
Contributor

I posible Hide definitelly the G54 - G59?

 

Please, Can you help me?

0 Likes