Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hello Programmer,
I met a problem of FIL that I need to get "Fixture offset" value by using FIL, I can't find the number code of "Fixture offset" in the Gpost. Can you teach me how to compile FIL to get "fixture offset value? thanks!!
Have a good day!!
Mark Rao
Solved! Go to Solution.
Ah, I see what you're doing. I only use the FIXT_OFFSET_REG setting in my sequences to assign one of the "valid" G54, G55,...,G59 values. For what you are doing, I suppose you could always use G54 and add on the "P" code. It might be easier if you just output the offset with its P code on a line by itself. Maybe with something like
CIMFIL/ ON, SET, OFSETL
OFSTYP = POSTF ( 6, 5 )
OFSREG = POSTF ( 7, 5 )
IF ( OFSTYP .EQ. 1 ) THEN
OFSCMD = TEXT/ 'G54P', CONVI, OFSREG, 2, '$'
INSERT/ OFSCMD
ENDIF
CIMFIL/ OFF
You'll probably have to do a bit of testing to get this to work just right.
Here's the section of code I use to handle this:
--- [ Begin Code ] ---
$$
$$ --[ SET ]------------------------------------------------------------
$$
$$ None of the processors seem to handle the offset register indicated
$$ by the programmer, so this code will output it as the appropriate
$$ G-code. Note that it is only output once per program or tool change,
$$ to avoid redundant calls from every NC sequence, which can cause
$$ troubles on some machines.
$$
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
--- [ End Code ] ---
Note that I only output the G54, G55, etc if it's a valid offset number (54 - 59), and if it is a "new" offset number. The current offset number is stored in a variable called "CURREG" in my code.
Hope this helps.
Hello Kenneth,
Thanks for your help, thanks!!
After testing, I still can't post G54 in the CNC program. Do you know why?
I would like to use FIL to generate G54P1 or P2 etc when I was set up deference fixture offset in each cog of my machining part. ( Like following illustration ).
1st, I set up 1 into “FIXT_OFFSET_REG” parameter so that CL generated “SET/OFSETL, 1”.
2nd, I set up Minimum for 54, Maximum for 59 and Default for 54. Please note the default.
3rd, I used this POST to generate a CNC program like following contents.
My purpose, I want to know how to get “FIXT_OFFSET_REG” parameter value then insert a text “P” and the value in the G54 (Default value) by the side? (Like G0G54P1X-.915Y-24.803)
Thanks so much for your help!!
Have a good day!!
Mark Rao
Ah, I see what you're doing. I only use the FIXT_OFFSET_REG setting in my sequences to assign one of the "valid" G54, G55,...,G59 values. For what you are doing, I suppose you could always use G54 and add on the "P" code. It might be easier if you just output the offset with its P code on a line by itself. Maybe with something like
CIMFIL/ ON, SET, OFSETL
OFSTYP = POSTF ( 6, 5 )
OFSREG = POSTF ( 7, 5 )
IF ( OFSTYP .EQ. 1 ) THEN
OFSCMD = TEXT/ 'G54P', CONVI, OFSREG, 2, '$'
INSERT/ OFSCMD
ENDIF
CIMFIL/ OFF
You'll probably have to do a bit of testing to get this to work just right.
Hello Kenneth,
Awesome!! it can be worked, cool!!
Thanks a lot for your help.
The following section is my final version for your reference!!
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 ) THEN
OFSCMD = TEXT/'G',CONVI,OFSREG,2,'$'
INSERT/ OFSCMD
ELSE
OFSCMD = TEXT/'G54P',CONVI,OFSREG,2,'$'
INSERT/ OFSCMD
ENDIF
ENDIF
CIMFIL/ OFF
Have a good day
Mark Rao
I'm making this reply for all the users out there. The Fixture Offset screen in the Option File Generator is somewhat confusing! It will do what you are looking for but it will still take some FIL code since the PTC command SET/OFSETL,# is not what the G-Post expects. Fist off your Offset Register will need to be "P". To get G54P# the post has to read the command SELECT/gg,ADJUST,dd, the "gg" is the G code value and the "dd" is the P value. So in FIL you will need to take the SET/OFSETL,v value and plug it into this command.
The way Kenneth does it in the FIL file is really easier I just wanted to explain how this works.
Fred
Hello Fred,
I got it!!
Thanks for your detail explain, thanks!!
Have a good day!!
Mark Rao
Hello Fred,
Is there the Austin could consider to add some items of fixture offset extension in the Gpost?
I meaning is that user don't use FIL to do that, they only set up this request from Gpost items.
Like following illustration.
Have a good day!!
Mark Rao
Mark,
I will bring this suggestion to my development team!
Thank you,
Fred
Hello Fred,
Awesome!!
Thanks so much for your willingness to consider my suggestion, thank you again.
Have a good day!!
Mark Rao