Hello,
I have a problem with the creo post processor when i call an other coordonate system such as G55.
Some context :
I have 2 parts on a special clamping pallet with their own origin. G54 and G55.
The final sequence is engraving serial number of each part.
The problem :
The first and the last point of the serial number have the same Y position (Y P1 = Y P2 = -12).
The serial number is engraved at the same position on the two parts. By the way insisde their coordinate system Y positions are the same. D1 = D2
In G54 Y P1 = Y P2 = -12 and in G55 Y P3 = Y P4 = -12
this is the corresponding code :
What happens in real life :
At the end of the first block, the cutter rises and keep the last Y position.
G55 is read but because Y position is identical, Y is not recall on line 392. The cutter move to X -59.5 in G55 but stay at the same Y position instead of going to Y -12 in G55.
Is there a way to force the post processor to output X and Y in case of changement of fixture address ?
The .ncl file have this information :
Thanks in advance.
The dirty troubleshooting solution while waiting to be able to machine :
Add an end point for each engraving sequence, so that the last Y in G54 and the beginning of the next in G55 are different.
I looked at the Option File Generator, probably you did, too. It doesn't seem to have anything like "force X, Y, or Z output" available for this. I guess it's not typical for programs to change the offset in the middle, it's a more sophisticated way of doing things.
The only way I can think of is to take care of it in the FIL code. You would need to add some lines to handle things when the post processor encounters a command to set the offset register. Here's the code I use in my stuff:
CIMFIL/ ON, SET, OFSETL
OFSTYP = POSTF ( 6, 5 )
OFSREG = POSTF ( 7, 5 )
IF ( OFSTYP .EQ. 1 ) THEN
IF ( OFSREG.GE.54.AND.OFSREG.LE.59.AND.CURREG.NE.OFSREG ) THEN
CURREG = OFSREG
OFSCMD = TEXT/ 'G', CONVI, OFSREG, 2, '$'
INSERT/ OFSCMD
ENDIF
ENDIF
CIMFIL/ OFF
The key trouble is that the post processor doesn't "know" what the two offsets are. It's just seeing numbers that tell it what register to call out in the G-Code. If I were attacking this I'd probably do something like:
(1) When I see a fixture offset change, if it's a new one, set a boolean indicator to show it has changed.
(2) When the next GOTO line is encountered, if that indicator is set, output all the axes (X, Y, and maybe Z), then set that indicator back to a false condition.
This should take care of things for your situation.
Hello, what an answer ! I didn’t found the time to test because it is a major modification for me and it is not easy to understand all the functions in the code you send. For my personal culture, can you explain me the principal functions in order to not just stupidly copy and paste.
A big thank you.
I can't really write out all the code you'd need to do this, there are some assumptions you might need to make to be sure that the G-Code you are creating is as safe as possible. Anything you do you'll have to make sure to test it so no mistakes happen.
That being said, the steps you need to look at in the FIL code are
(1) Adding the variables that you will use to store the current offset register status and whether it has just been changed. These lines would go at the top of the FIL code, before any macros or CIMFIL blocks. It would look like this:
CURREG = 0 $$ Current offset register in use
REGNEW = 0 $$ Boolean indicator of register change
(2) Next you need to react to a fixture offset command, as detailed in my previous response. The code for it is similar, with an added line to set the "REGNEW" variable, too. It should look like:
CIMFIL/ ON, SET, OFSETL
OFSTYP = POSTF ( 6, 5 )
OFSREG = POSTF ( 7, 5 )
IF ( OFSTYP .EQ. 1 ) THEN
IF ( OFSREG.GE.54.AND.OFSREG.LE.59.AND.CURREG.NE.OFSREG ) THEN
CURREG = OFSREG
OFSCMD = TEXT/ 'G', CONVI, OFSREG, 2, '$'
INSERT/ OFSCMD
REGNEW = 1
ENDIF
ENDIF
CIMFIL/ OFF
(3) Lastly, when a GOTO command is received, if the REGNEW value is greater than zero, output all the coordinates
CIMFIL/ ON, GOTO
XPOS = POSTF ( 7, 6 ) $$ Extract X value from command
YPOS = POSTF ( 7, 7 ) $$ Extract Y value from command
ZPOS = POSTF ( 7, 8 ) $$ Extract Z value from command
$$
$$ Convert position values to text strings.
$$
XTEXT = TEXT/ 'X', CONVF, XPOS, 8, 4, 1, 0, 3
YTEXT = TEXT/ 'Y', CONVF, YPOS, 8, 4, 1, 0, 3
ZTEXT = TEXT/ 'Z', CONVF, ZPOS, 8, 4, 1, 0, 3
$$
$$ If the fixture offset register has been changed, output all the
$$ coordinates, otherwise, pass the processing to the normal method
$$ with a POSTF (13) command.
$$
IF ( REGNEW.GT.0 ) THEN
REGNEW = 0
RAPDON = POSTF ( 1, 1, 0856 ) $$ Get RAPID status
IF ( RAPDON.GT.71 ) THEN
INSERT/ "G01 ", XTEXT, YTEXT, ZTEXT, '$'
ELSE
INSERT/ "G00 ", XTEXT, YTEXT, ZTEXT, '$'
ENDIF
ELSE
DMY = POSTF (13 )
ENDIF
CIMFIL/ OFF
Some of this stuff I'm just writing as a first try - the way I do these things is more complicated but I don't want to have to explain all the macros and stuff I use. You'll have to try this out and test it a lot to be sure you're doing things correctly. For example, the "POSTF ( 1, 1, 0856 )" is how I think you can check the RAPID status, but I haven't tried it.
Hello,
Your PP skip the last rapid line
GOTO/ 0.5,-20. ,50. it's abnormal.
If you want to force an axis output, you can try one of these
DMY=POSTF(2,1,1867,1) $$ SIMUL-MODE ON
RAPID
GOTO/50,50,50 $$ move XYZ or GOTO/X,Y,Z,I,J,K for Multax
DMY=POSTF(2,1,1867,0) $$ SIMUL-MODE OFF