cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

FIL help G332

NickMihelich
6-Contributor

FIL help G332

Is it possible to modify my FIL file to add a macro that looks for the sequence type "roughing" or "re-roughing" and sets a G332 R1.

"surface mill" or "finishing" or "pocketing" G332 R3.  does anyone on here currently do this?

ACCEPTED SOLUTION

Accepted Solutions

There are several ways to do this but you are correct that you need something in the NCL file for the FIL code to trigger off of.  The SEQUENCE TYPE text will work if it always outputs ROUGHING or SEMI-ROUGHING when you need the G332 Rx code.  You could also output a CL command to use as a trigger or just use the INSERT command and have the post put the G332 R3 directly into the tape file.

If you use some type of trigger, command or PPRINT, you will have to write the necessary FIL code to do what you want,

The link you have if a fairly old copy of the FIL manual, and a copyright violation by the way.  The current FIL manual is in the documents installed with CREO.  It will have a similar name but say V66.

Fred

View solution in original post

9 REPLIES 9

If you look at your output (.ncl.* ) file, the one output by Creo, you'll notice that no information about the type of sequence used to generated the tool motions is output. It doesn't indicate if you used volume milling, customized trajectory, or whatever. Therefore, by default, there is nothing to "catch" in the FIL file to trigger the addition of extra stuff. Maybe you could customize the sequence, but that would probably be tedious and apt to be forgotten.

If I'm wrong and you're seeing something unique for the types of sequences you are interested in, please cut and paste a bit of the resultant code into a message so we can have a look.

I modified my PPrint to output the sequence type...

NCL file here

$$*          Pro/CLfile  Version 2.0 - M210

$$-> MFGNO / 1004-204-FINISH

PARTNO / 1-FINISH-mori1

$$-> FEATNO / 6436

MACHIN / UNCX01, 1

$$-> CUTCOM_GEOMETRY_TYPE / OUTPUT_ON_PROFILE

UNITS / INCHES

PPRINT / PART NAME : 1004-204-FINISH

PPRINT / SEQUENCE TYPE : ROUGHING

PPRINT / Z MINIMUM TOOL TRAVEL : -0.999000

PPRINT /                TOOL COMMENTS

PPRINT / T4  10MM X 30MM WIDIA

LOADTL / 4 $$-> T4  10MM X 30MM WIDIA

$$-> CUTTER / 0.393701

$$-> CSYS / 1.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,  $

            0.0000000000, 1.0000000000, 0.0000000000, 0.0000000000,  $

            0.0000000000, 0.0000000000, 1.0000000000, 0.0000000000

SPINDL / RPM, 3813.000000,  CLW

COOLNT / ON

FEDRAT / 800.000000,  IPM

G code looks like this

%

(Date:10/05/16 Time:10:41:00)

G98G80G90G49G17G20G54

( / 1-FINISH-MORI1)

( / PART NAME : 1004-204-FINISH)

( / SEQUENCE TYPE : ROUGHING)

( / Z MINIMUM TOOL TRAVEL : -0.999000)

( / T4  10MM X 30MM WIDIA)

T4

M6

T10

S3813M3

M51

G5P10000

G1G43X-.4226Y.5566Z1.F800.H4

Cool. Maybe you could handle these the way I do for operation comments: Here's the macro I use to get these into the output file:

$$

$$ --[ Macro : PRTCMT ]-------------------------------------------------

$$

$$ Write the Operation Comments into the Description portion of the out-

$$ put file. This is done by the following algorithm:

$$

$$ (1) Save the current CL record position.

$$ (2) Parse through the CL records until finding a PPRINT statment

$$     that contains the key phrase OPERATION COMMENTS. If no such

$$     statement is present, a blank Description line is output.

$$ (3) If the key phrase was found, read each subsequent PPRINT

$$     statement and print its contents to the output file.

$$ (4) If subsequent CL record is not a PPRINT statement, or if the

$$     key phrase TOOL COMMENTS is encountered, stop looking for

$$     more comments.

$$ (5) Reset the CL file to the restart position.

$$

$$ Note that for this to be useful, the user must be outputting the

$$ comments by specifying Operation Comments, and adding PPRINT

$$ parameters that allow them to be output to the CL file.

$$

PRTCMT = MACRO/

  CIMPOS = POSTF ( 7, 1 ) + 1

  LINCNT = 0

  DO/ DOLIN, INDXLN = 0, 10, 1

    RESULT = POSTF ( 14 )

    CMDTYP = POSTF ( 7, 2 )

    CMDSUB = POSTF ( 7, 3 )

    IF ( CMDTYP .EQ. 14000 ) THEN

      INDXLN = 11

    ELSE

      INDXLN = 2

      TARGET = ICODEF ( PPRINT )

      IF ( CMDTYP .EQ. 2000 .AND. CMDSUB .EQ. TARGET ) THEN

        CMTNOW = TEXT/ OMIT, (TEXT/ CLW), 1

        ISCOMT = INDXF ( CMTNOW, (TEXT/ 'OPERATION COMMENTS') )

        IF ( ISCOMT .GT. 0 ) THEN

          DO/ DOCMT, INDXCM = 0, 10, 1

            RESULT = POSTF ( 14 )

            CMDTYP = POSTF ( 7, 2 )

            CMDSUB = POSTF ( 7, 3 )

            IF ( CMDTYP .EQ. 2000 .AND. CMDSUB .EQ. TARGET ) THEN

              CMTNOW = TEXT/ OMIT, (TEXT/ CLW), 1

              CMTEND = INDXF ( CMTNOW, (TEXT/ 'TOOL COMMENTS') )

              IF ( CMTEND .GT. 0 ) THEN

                INDXCM = 11

              ELSE

                INDXCM = 2

                CMTNOW = TEXT/ OMIT, (TEXT/ CLW), 1

                CMTNOW = TEXT/ MODIFY,CMTNOW,(TEXT/ '/'),(TEXT/ ''),1

                CMTNOW = TEXT/ OMIT, CMTNOW, 2

                IF ( LINCNT .GT. 0 ) THEN

                  TXTPRE = TEXT/ '(              '

                ELSE

                  TXTPRE =TEXT/'( D',(TEXT/LOW,(TEXT/ 'escription :'))

                ENDIF

                INSERT/ TXTPRE, ' ', CMTNOW

                INSERT/ '     )$'

                LINCNT = LINCNT + 1

              ENDIF

            ELSE

              INDXCM = 11

              INDXLN = 11

            ENDIF

          DOCMT) CONTIN

        ENDIF

      ENDIF

    ENDIF

  DOLIN) CONTIN

  $$

  $$ If no comments were found, output a single line with the

  $$ Description designation.

  $$

  IF ( LINCNT .LE. 0 ) THEN

    TXTPRE = TEXT/ '( D', ( TEXT/LOW, ( TEXT/ 'escription :' ) )

    INSERT/ TXTPRE

    INSERT/ '    )$'

  ENDIF

  RESULT = POSTF ( 15, CIMPOS )

TERMAC

This works really nice for me.

This seems like the right way to approach this.  I just don't understand how to interpret or modify what is happening in the macro.  Is there any documentation available for FIL editing, a list of definitions, a set of examples, or is a class necessary?  I did find FIL_macros_exersices.pdf but i think i need a few chapters before that document.  Thanks i'll keep working on it.

All of my "fun" with FIL macro programming has come via lots and lots of web searches and even more horrible experiments. As with most code, example programs you find are usually poorly written and devoid of comments. Kind of reminds me of the years spent whacking away at FORTRAN code written by people who just wanted to get things done as quickly as possible, with no regard for maybe having to look at it again 3 years later.

Kenneth,

There are some good FIL examples on our web site and anyone can download them free of charge.  They have lots of comments in them so they are fairly easy to follow.  Here is the link, it is toward the bottom of this page...

http://www.austinnc.com/anc_support.html

Fred

This is really nice.

Up until now I've only had an old, clunky link to the PTC post-processor list. It's kind of like a text page with sort-of links, and overlapping content, etc. This will be helpful for the folks who are always asking for a "Post Processor for Machine X".

SteveLucas
13-Aquamarine
(To:KenFarley)

Ken,

You mean the GPost central page that was setup back 10 or 12 years ago and hasn't been updated since! 

There are several ways to do this but you are correct that you need something in the NCL file for the FIL code to trigger off of.  The SEQUENCE TYPE text will work if it always outputs ROUGHING or SEMI-ROUGHING when you need the G332 Rx code.  You could also output a CL command to use as a trigger or just use the INSERT command and have the post put the G332 R3 directly into the tape file.

If you use some type of trigger, command or PPRINT, you will have to write the necessary FIL code to do what you want,

The link you have if a fairly old copy of the FIL manual, and a copyright violation by the way.  The current FIL manual is in the documents installed with CREO.  It will have a similar name but say V66.

Fred

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags