Cancel
Showing results for 
Search instead for 
Did you mean: 

output work offset (G54,G55) as $P_IFRAME=$P_UIFR[R1]

Pioneer
Pioneer

Hello,

 

i would like to modify 3 axis 810d post to output work offset as parameter.

 

Syntax for G54/G55/G56... should be $P_IFRAME=$P_UIFR[R1]

 

Then, I will be abe to repeat nc code with multiple parts mounted on the table.

 

Code would be:

 

LABEL1:

$P_IFRAME=$P_UIFR[R1]

G0 X Y

...

...

...;end of operation

STOPRE
R1=R1+1
IF R1<=R2 GOTOB LABEL1

 

R1 - number of actual Work Offset

R2 - number of repetitions / numer of last acting work offset

 

I know that siemens is recommending to output subprograms. It wouldn't work at out CPY. This method is simple and quick and is allowing operator to control program with R1 and R2 parameters.

 

Thanks in advance

6 REPLIES

Re: output work offset (G54,G55) as $P_IFRAME=$P_UIFR[R1]

Legend
Legend

I use the code below in my Initial, and First move to get the offset value of G54.1P1 if the offset in NX is set to 1. Setting 5 would give me G54.1P5.

 

Not exactly what you are looking for, but a way to point you in a possible direction. 

 

 

mcs.PNG

 

 

 

 

work offset value.PNG

Glenn Balon
Production: NX 12.0.1.7 MP1 Primarily CAM

Re: output work offset (G54,G55) as $P_IFRAME=$P_UIFR[R1]

Pioneer
Pioneer

Thank you for your reply.

 

What I was planning to do is to parametrize work offset. 

For example:

Operator wants to execute program on G58 offset... he just sets R1 to 5 and program is executed on work offset nb 5.

 

So far I have managed to delete g54 output from postproc. I want to output $P_IFRAME=$P_UIFR[R1] as text, during initial/first move. 

I have managed to output everything but "]" sign. 

text syntax is: \$\P_IFRAME=\$\P_UIFR\[\R1\]

 

Does anybody know why "]" cannot be outputed? This syntax works with all other characters like [,asd,".

Re: output work offset (G54,G55) as $P_IFRAME=$P_UIFR[R1]

Legend
Legend

 \$\P_IFRAME=\$\P_UIFR\[\R1\]

 

Try this instead  \$\P_IFRAME=\$\P_UIFR\[\R1]\

Glenn Balon
Production: NX 12.0.1.7 MP1 Primarily CAM

Re: output work offset (G54,G55) as $P_IFRAME=$P_UIFR[R1]

Legend
Legend

Or make a new custom command with MOM_output_literal.

 

An example below.

 

literal.PNG

Glenn Balon
Production: NX 12.0.1.7 MP1 Primarily CAM

Re: output work offset (G54,G55) as $P_IFRAME=$P_UIFR[R1]

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

?? the escape ("\") should be BEFORE the character, not after:

 

MOM_output_literal "\$P_IFRAME=\$P_UIFR\[R1\]"

Not sure about defining it in a block, but I would suspect it is similar

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: output work offset (G54,G55) as $P_IFRAME=$P_UIFR[R1]

Pioneer
Pioneer

works like a dreamSmiley Happy. thank you 

Learn online





Solution Information