Advanced Class
Advanced Class
Advanced Class
Pro/NC-GPOST
innovation
global solutions
Agenda
Product Review
General Overview
Questionnaire Overview
FIL Macros Overview
Advanced FIL Macro programming String manipulation Passing information to the CL file from Pro/NC REPEAT Disable/Enable registers REPLAC Debugging a post-processor POSTF functions Macro on motion Tape file re-direction POSTN Macros SPWNF Look-ahead strategy
2000 PTC
File I/O
Agenda
Advanced Machine Configuration
5 Axis milling machine Standard kinematics Special kinematics _REPOS macro Punch-presses
4 Axis lathe 2-4 Axis Wire EDM
2000 PTC
Agenda
Pro/NC-GPOST 2000i2 - build 280 Arc fitting Nurbs Fitting Auto-Clamp Miscellaneous FIL macro encrypting
Pro/NC-GPOST 2001
Workshop Conclusion Whats next ? How to work together ? request to Intercim
2000 PTC 4
collaboration
Pro/NC-GPOST
innovation
Product Review
global solutions
2000 PTC
What is Pro/NC-GPOST ?
Pro/NC-GPOST consists of 2 modules
GPOST : produces final NC tape from the cutter location file generated by Pro/NC
6
2000 PTC
What is Pro/NC-GPOST ?
Pro/NC-GPOST FLOW
2000 PTC
What is Pro/NC-GPOST
DOCUMENTATION : GPOST and FIL manual
2000 PTC
What is Pro/NC-GPOST ?
SUPPORT : Email Post-processor Files A Send button is available in the File menu to start your Email system (MAPI) and attach the current option and FIL files to your email.
2000 PTC
What is Pro/NC-GPOST ?
RESSOURCE : PTConnector GPOST Web page
Link to PP database
Tutorials
Training materials Etc
http://internal.ptc.com/mkt/products/production_apps/nc_gpost/index.htm
2000 PTC 10
What is Pro/NC-GPOST ?
Pro/NC-GPOST SETUP
Pro/NC-GPOST is set by default (if installed) Config.pro option : NCPOST_TYPE = GPOST Store your PPs in s separate directory : GPOSTPP_DIR (default is Pro/E loadpoint/platform/gpost) Post-processor files : UNCX01.Pnn, UNCX01.Fnn, UNCL01.Pnn, UNCL01.Fnn, UNCX01.Mnn, UNCL01.Mnn *.TAP, *.LST, *.TL1 To start ProNC-GPOST questionnaire :
progpostq -sy:2 [-po=post name] -db:[path]
2000 PTC
11
What is Pro/NC-GPOST ?
Post-processor data files :
UNCX01.Pnn : Milling, wire EDM and punch data files UNCL01.Pnn : Turning data files
12
What is Pro/NC-GPOST ?
GPOST executable are found in $PRO_DIRECTORY/$MC/obj
for example : c:\ptc\proe2000i\i486_nt\obj
Default for new posts are in $PRO_DIRECTORY/$MC/obj *.d00 : default option files used when creating a new post using the default (uncx01.f00, uncl01.f00, uncp01.f00 )
*.f00 : Default FIL files used when creating a new post (uncx01.f00, uncl01.f00, uncp01.f00
PTC interface kit is in $PRO_DIRECTORY/$MC/gpost System FIL files : uncmil.f00, unctur.f00,uncpun.f00, uncwir.f00, unclas.f00 Word files : uncmill.v00, unctur.v00, uncpun.v00, uncwir.v00, unclas.v00
2000 PTC
13
What is Pro/NC-GPOST ?
QUESTIONNAIRE
2000 PTC
14
What is Pro/NC-GPOST ?
Pro/NC-GPOST GUI Optfile screen is divided in 4 main areas
Pull Down Menu Toolbar
Main menu
Main Panel
2000 PTC
15
What is Pro/NC-GPOST ?
QUESTIONNAIRE Inch and metrics units Absolute and incremental output Travel limits checking Sequence numbering Listing file customization G/M codes Work-address format Circular and Helical interpolation Drilling cycles (emulation if needed) Cutter and fixture compensation Motion analysis Feedrates control: uPM, uPr and 1/T Tool change sequence Spindle control
2000 PTC 16
What is Pro/NC-GPOST ?
Pro/NC-GPOST GUI The Toolbar
The toolbar contains standard shortcuts for frequently used menu commands. You can hide or show the toolbar using View/Toolbar command. To identify a button on the toolbar, just point at it to pop up a tooltip The toolbar also displays the option file being edited
New File File Open Close File Save File Help Cancel Edit Decrease size Main Panel Increase size Main Panel
17
2000 PTC
What is Pro/NC-GPOST ?
Pro/NC-GPOST GUI The Main Menu Area
The Main Menu Area is used for selecting the different post-processor function categories to modify
2000 PTC
18
What is Pro/NC-GPOST ?
Pro/NC-POST GUI The Main Panel Area
Change according to the current category selected. Multiple tabs available for selection at the top of the main panel.
Selection Box
Register Box
Spin Button
2000 PTC
Check Box
What is Pro/NC-GPOST ?
QUESTIONNAIRE : Did you know ? Speed-up development with CNC defaults
2000 PTC
20
What is Pro/NC-GPOST ?
QUESTIONNAIRE : Did you know ? Register format and position : match an existing NC program % sample tape O1234 N1(OBR-11-T/G137-A- ) Register Addresses N2(TOOL NAME : D6_CDR)
Register Format
2000 PTC
What is Pro/NC-GPOST ?
QUESTIONNAIRE : Did you know ? G Codes / M Codes
NA stands for Not Available : the function is not available NR stands for Not Required : the function is available but the code is not required
2000 PTC
22
What is Pro/NC-GPOST ?
QUESTIONNAIRE : Did you know ?
Retract : G0 Z XY
2000 PTC
23
What is Pro/NC-GPOST ?
QUESTIONNAIRE : Did you know ?
Operator Messages : Convert Pro/NC PPRINTs in operator message The output is going to include a / i.e. : ( / TOOL NAME : FEM1)
Add the following lines in your FIL macro : T1=TEXT/( / T2=TEXT/( REPLAC/T1,T2 ( / TOOL NAME : FEM1)
2000 PTC
What is Pro/NC-GPOST ?
QUESTIONNAIRE : Did you know ?
Coolant starts with next Z This applies to both COOLNT/ON and OFF . A FIL macro can fix this :
CIMFIL/ON,COOLNT $$ Macro to ignore the COOLNT $$ options (HIGH, LOW, ...) and process the COOLNT with the next motion , except COOLNT/OFF DMY=POSTF(12,4) TYP=POSTF(7,4) IF (TYP.EQ.ICODEF(OFF)) THEN DMY=POSTF(2,1,3425,0) $$ output now (set INTCOM 3425 to 0) ELSE DMY=POSTF(2,1,3425,1) $$ output with next motion ENDIF DMY=POSTF(13) $$ Process CIMFIL/OFF
2000 PTC
25
What is Pro/NC-GPOST ?
QUESYTIONNAIRE : Did you know ?
Feedrate 3 types of feedrate : uPM uPR 1/T : Inverse time feedrate used with a rotary move Options to define : Feedrate codes Feedrate Register Code and Format Min, Max values Inverse time calculation method
Inverse time feedrate : When combined linear/rotary motion exist, most good CNC controls require the inverse of the amount of time necessary to make the move
F(code) = 1 (minute) / (time = 3D distance / velocity)
26
2000 PTC
What is Pro/NC-GPOST ?
QUESTIONNAIRE : Did you know ?
Support for return G codes by macro (see macro library, Questionnaire in 2001) Support for CSINK cycle :
2000 PTC
$$ Support for CSINK cycle : output G81 for a CSINK cycle DMY=POSTF(2,1,471,81) $$ Set INTCOM 471 to 81
27
What is Pro/NC-GPOST ?
QUESTIONNAIRE : Did you know ?
What is Pro/NC-GPOST ?
BEHIND THE QUESTIONNAIRE : The questionnaire gives access to a limited number of PP settings Common Variables
These variables can be set during the creation of the post-processor but also dynamically during the execution of the post-processor (POSTF)
2000 PTC 29
What is Pro/NC-GPOST ?
COMMON VARIABLES : 3 types
2000 PTC
30
What is Pro/NC-GPOST ?
EXAMPLE of COMMON VARIABLES How to make a Tape break based on length of tape ?
Search for break to find which variable to set Set the variables (10 chars / inches) : DBLCOM 671 : maximum length (in feet or meters) DBLCOM 672 : minimum length DBLCOM 747,748, 749 : XYZ retract at break
2000 PTC
31
What is Pro/NC-GPOST ?
FIL MACRO LANGUAGE
FIL : Factory Interface Language allows : Add, delete or modify CL data Alter post-processor output Add or modify APT vocabulary words Read or write data into/from files Call other applications
CL File
FIL
UNCL01.Fnn UNCL01.Pnn
Lathe G-Post
MULTAX G-Post
UNCX01.Fnn UNCX01.Pnn
MCD File
2000 PTC
32
What is Pro/NC-GPOST ?
FIL MACRO LANGUAGE
Like any programming language FIL is composed of Variables Labels operators Functions String manipulation functions Logic statements Macro Definition File I/O Plus some special features : CL Commands Post-processor functions
CIMFIL/ON,FINI XX=POSTF(20) $$ END OF PROGRAM INSERT/G91G28Z0.$ INSERT/G28X0.Y.$ INSERT/M30$ XX=POSTF(21) XX=POSTF(13) CIMFIL/OFF
FTOOL=0 G=7;X=24;Y=25 CIMFIL/ON,LOADTL XX=POSTF(20) IF (FTOOL.NE.0) THEN INSERT/G91G28Z0$ ENDIF FTOOL=1 XX=POSTF(21) XX=POSTF(13) REPEAT/X,Y,G,90,ALL CIMFIL/OFF
2000 PTC
33
What is Pro/NC-GPOST ?
INTRODUCTION TO FIL MACRO LANGUAGE FIL file consists of 2 sections : FIL Subroutines Starts by CIMFIL/ON,major_word or CIMFIL/ON, type, [subtype] Ends by CIMFIL/OFF Each FIL subroutine must be unique Global section Initialized at the beginning of the execution Available in any FIL sub-routine
Maximum 72 columns in a line Not case sensitive The SYN command allows to create alternate spelling for FIL command SYN / new spelling, vocab, new spelling, vocab,
2000 PTC 34
What is Pro/NC-GPOST ?
INTRODUCTION TO FIL MACRO LANGUAGE Sample FIL File
$$ ******************************************************************** $$ * VARIABLES SECTION * $$ ******************************************************************** $$ REDEF/ON $$ Variable redefinition OK $$ Addresses A=1;B=2;C=3;D=4;E=5;F=6;G=7;H=8;I=9;J=10;K=11;L=12;M=13;N=14 O=15;P=16;Q=17;R=18;S=19;T=20;U=21;V=22;W=23;X=24;Y=25;Z=26 $$ PARTNO %PARTN=TEXT/'DEFAULT NAME' $$ Simulation ALIAS/%simul_on,DMY=POSTF(2,1,1867,1) ALIAS/%simul_off,DMY=POSTF(2,1,1867,0) ALIAS/%output,DMY=POSTF(13)
$$ ******************************************************************** $$ * CIMFIL SECTION * $$ ******************************************************************** $$ ************************************************************* PARTNO CIMFIL/ON,PARTNO $$ This FIL is used to store the PARTNO in %PARTN %PARTN=TEXT/CLW $$ Extract text argument %PARTN=TEXT/OMIT,%PARTN,1 $$ Remove trailing blank %output $$ Process CIMFIL/OFF $$ ************************************************************* MACHIN CIMFIL/ON,MACHIN %output $$ process, nothing output before it ! $$ Machine Startup $$ PPRINT/%PARTN $$ output the PARTNO $$ $$ End Machine Startup CIMFIL/OFF
2000 PTC
35
What is Pro/NC-GPOST ?
INTRODUCTION TO FIL MACRO LANGUAGE Variables Real, String, Geometric:TOOL1=12 ; NAME=TEXT/HELLO Max 6 Alphanumeric characters REDEF/ON to allow redefinition of variables Array definition : RESERV/TOOLID,30 ; TOOLID(1)=12 Label : Max 6 Alphanumeric characters : POS10) Scalar assignment : Symbol = Number Arithmetic Operators : + - / * ** ( ) Logical Operators : .AND. .OR. .GT. .LT. .GE. .LE. .EQ. .NE. .NOT.
line
2000 PTC
What is Pro/NC-GPOST ?
INTRODUCTION TO FIL MACRO LANGUAGE
Motions & CL commands Functions function_nameF (arguments) For example : SQRTF(real), COSF(angle), MAXF(real1, ) String manipulation string_var = TEXT / string1, string2, . Search & Replace :
newstr = TEXT / MODIFY, oldstr, searchstr, replacestr, nbtimes
Remove blank
newstr = TEXT / OMIT, oldstr, option ( with option=1 for trailing blank, =2 leading blanks, 3 for all)
Extract a sub-string
newstr = TEXT / RANGE, oldstr, startpos, endpos
2000 PTC
Get the date : T1 = TEXT / TIMES Get the CL file name and path : CLNAME = TEXT / PART
37
What is Pro/NC-GPOST ?
INTRODUCTION TO FIL MACRO LANGUAGE
String manipulation Add non printing characters : newstr = TEXT / CONVS, ascii_val Conversion to string :
Integer to string : string = TEXT / CONVI, integer, num_char Real to string : string = TEXT / CONVF, real, num_char, decimal
CASE DO
DO / label, do_variable=initial_value, final_value, [incr] Statement(s) CASE / variable Label) WHEN / value statement(s) . WHEN/OTHERS Statement(s) ENDCAS
38
What is Pro/NC-GPOST ?
INTRODUCTION TO FIL MACRO LANGUAGE :
ALIAS Command : create your own commands ALIAS / %OUTPUT, XX=POSTF(13) ALIAS / %FCL1, XX=POSTF(7,4) REPLAC Command : replace a string by another in the tape file T1=TEXT/( / ;T2=TEXT/(;REPLAC/T1,T2 T1=TEXT/G02;T2=TEXT/ARC CCW;REPLAC/T1,T2 REPEAT Command : issue a register and a value with the next occurrence of a register : X=24;Y=25;G=7;Z=26;H=8; REPEAT/X,Y,G,54,ALL $$ Output G54 with next X or Y REPEAT/Z,H,99 $$ Output H99 with next Z POSTN/OUT, : output a register D=4; POSTN/OUT,D,5,NEXT $$ Output D5 with next block
2000 PTC
39
What is Pro/NC-GPOST ?
INTRODUCTION TO FIL MACRO LANGUAGE
POSTF allow access to the internal processing of the post-processor : rslt = POSTF ( function_type,arg1, arg2, argn) rslt is a real or a string that reports the result of the operation. Function_type is a two_digit number that represents the function type. There are 26 POSTF functions :
XX=POSTF(13) $$ process current CL rec. XX=POSTF(20) $$ Store current CL rec. XX=POSTF(21) $$ restore CL rec. XX=POSTF(5) $$ number of arguments in CL rec XX=POSTF(7,position) $$ return value of argument at position TT=TEXT/CLW $$ return string argument (PPRINT,INSERT,..)
2000 PTC
40
What is Pro/NC-GPOST ?
INTRODUCTION TO FIL MACRO LANGUAGE Pro/NC CL record : 12 : SPINDL / RPM, 1500, CLW Internally stored as : 12,#2000,#1031 / #78 ,1500, #60 CIMFIL / ON, SPINDL NBARG = POSTF( 5) $$ NBARG=6 $$ Find type of the arguments TYPG4=POSTF(6,4) $$ equal 0 (minor word RPM) TYPG5=POSTF(6,5) $$ equal 1 (real 1500) $$ find value of the arguments VARG4=POSTF(7,4) $$ return 78 VARG5=POSTF(7,5) $$ return 1500 $$ Test if VARG4 is RPM IF (VARG4 .EQ. ICODEF(RPM)) THEN ..
2000 PTC
41
What is Pro/NC-GPOST ?
INTRODUCTION TO FIL MACRO LANGUAGE : Basic FIL Techniques
Always start your FIL file with a standard header : DMY=POSTF(24,1) $$ debug options PRINT/ON REDEF/ON $$ Allow redefinition of Var. $$ Addresses A=1;B=2;C=3;D=4;E=5;F=6;G=7;H=8;I=9;J=10;K=11;L=12 M=13;N=14O=15;P=16;Q=17;R=18;S=19;T=20;U=21;V=22; W=23;X=24;Y=25;Z=26 Output something at the beginning of the program CIMFIL/ON,MACHIN $$ nothing is ouputed to the tape before the $$ MACHIN statement is processed XX=POSTF(13) $$ Process do what you want to do here ... CIMFIL/OFF
2000 PTC
42
What is Pro/NC-GPOST ?
INTRODUCTION TO FIL MACRO LANGUAGE : Basic FIL Techniques
Ignore CL record CIMFIL/ON,major_word CIMFIL/OFF Do something after a CL record CIMFIL/ON,major_word XX=POSTF(13) $$ Process CL rec. do what you want to do here CIMFIL/OFF Do something before a CL record CIMFIL/ON,major_word XX=POSTF(20) $$ Save CL rec. do what you want to do here XX=POSTF(21) $$ restore CL rec. XX=POSTF(13) $$ process CL rec. CIMFIL/OFF
2000 PTC
43
G0Z1 M5 M9 G91G28Z0. G28X0.Y0. N2T02M6 S10000M3 G0G90X0X0.3Y0. G43Z1.H2M8 G1Z.3F200 G0Z1. G91G28Z0. G28X0.Y0. M2 %
44
DNC type format (no special characters at the beginning or end of tape) Decimal point, leading an trailing zeros T01 : tool change keep leading zero F0. X0. M3 G0 : remove trailing zero, decimal point for real, Interpolation : check the type for circle : G2 X Y I J : Circle using IJK, check machine programming manual for definition G0 Z then X Y : motion analysis No space between registers Message starts with ( and ends with )
45
2000 PTC
2000 PTC
47
Questionnaire Tool change code (T and M) Length compensation (G43) and default offset H Coolant on first Z Macro CIMFIL on LOADTL
FTOOL=0 X=24 Y=25 G=7
CIMFIL/ON,LOADTL XX=POSTF(20) IF (FTOOL.NE.0) THEN INSERT/G91G28Z0.$ INSERT/G28X0.Y0.$ ENDIF FTOOL=POSTF(7,4) XX=POSTF(21) XX=POSTF(13) REPEAT/X,Y,G,90,ALL CIMFIL/OFF
48
2000 PTC
collaboration
Pro/NC-GPOST
innovation
2000 PTC
PPRINT Table :
CIMFIL/ON,PPRINT $$ Macro to extract and print $$ only the text after the : MESS=TEXT/CLW MESS=TEXT/OMIT,MESS,1 COLPOS=INDXF(MESS,COL) IF (COLPOS.NE.0) THEN LEN=CANF(MESS,1) NMESS=TEXT/RANGE,MESS,COLPOS+1,LEN PPRINT/NMESS ELSE DMY=POSTF(13) ENDIF CIMFIL/OFF
2000 PTC
Inserting CL commands
50
CL Command can include parameters A user created parameter An NC sequence parameter A dimension from the design model A value calculated by an analysis feature
For example : VERIFY / ON PPRINT / DWELL : &DWELL:FID_1234
Debugging a post-processor
To debug the post-processor you need to use the Listing file generated by GPOST (extension .LST )
In Pro/NC run the PP with the TRACE option to trace the CL records in the listing file
2000 PTC
52
Debugging a post-processor
In FIL set the trace options PRINT/ON : trace the macro lines in the listing file DMY=POSTF(24,1) : print FIL ISN numbers, this will help you to find the FIL line creating the problem
Edit the Listing File Search for the word ERROR Check the ISN Number Go to the ISN number in the FIL header of the listing file
When the post-processor is ready for Production put the following commands in the FIL header to minimize the size of the FIL file : PRINT/OFF,IN ; DMY=POSTF(24,0)
2000 PTC
53
Search & Replace: the MODIFY option allows to perform a search/replace on a string :
newstr = TEXT / MODIFY, oldstr, searchstr, replacestr, nbtimes
Remove blanks: the OMIT option allows to remove blank from a string :
newstr = TEXT / OMIT, oldstr, option (where option =1 for trailing blanks, =2 for leading blanks, =3 for all blanks)
Note : Each time you want to print a text string coming from the CL file, do not forget to use : TXT=TEXT/CLW, TXT=TEXT/OMIT,TXT,1
2000 PTC 54
Extract a sub-string:
newstr = TEXT / RANGE, oldstr, startpos, endpos
2000 PTC
55
$$ extract the date from T1 (date and time) TDATE=TEXT/RANGE,T1,1,(SPOS-1) $$ TLEN=CANF(T1,1) $$ string length $$ Extract the time from T1 TTIME=TEXT/RANGE,(SPOS+1),TLEN
2000 PTC 56
2000 PTC
57
.. To continue ...
2000 PTC
58
Integer to string: string = TEXT / CONVI, integer, num_chars Real to string (fix point notation): string = TEXT / CONVF, real, num_chars, decimal string = TEXT / CONVF, real, num_chars, decimal, $ sign, point, zero
2000 PTC
60
2000 PTC
61
IREAL = MACRO / VAL,DECIM $$ Format a real with decimal point $$ no leading and trailing zero $$ DECIM is the number of digits after decimal point RETVAL=TEXT/CONVF,VAL,8,DECIM,0,0,4 TERMAC CALL/IZERO,VAL=2,SIZE=3 INSERT/T,RETVAL $$ Will print T002 CALL/IREAL,VAL=12.34567,DECIM=3 INSERT/X,RETVAL $$ Will print X12.345
2000 PTC 62
2000 PTC
63
Functions in Pro/NC-GPOST
The general syntax is :
function_nameF (arguments)
Examples:
2000 PTC
POSTF Functions
POSTF allow access to the internal processing of the postprocessor :
rslt is a real or a string that reports the result of the operation. Function_type is a two_digit number that represents the function type. There are 27 POSTF functions.
2000 PTC
65
POSTF Functions
Get Common value rslt = POSTF (1, type, location)
type : 1:INTCOM 2:RELCOM 3:DBLCOM location : common location number value : value to be stored in the common location
2000 PTC 66
POSTF Functions
EXAMPLES : $$ get current MXRPM programmed $$ this is RELCOM 1 MRPM=POSTF(1,2,1) $$ Get current Feed mode $$ This is INTCOM 492 FMODE=POSTF(1,1,492) $$ return G94 or G93 REDEF/ON $$ allow redefinition of DMY $$ Change G codes for circle CLW and CCLW $$ There are INTCOM 498(CCLW) and 499(CLW) DMY=POSTF(2,1,498,13) $$ CCLW is G13 DMY=POSTF(2,1,499,12) $$ CLW is G12
2000 PTC 67
POSTF Functions
EXAMPLES : $$ Multiply the X value by -2 XX = POSTF(2,3,486,-2) $$ Get RAPID flag RAP = POSTF(1,1,856) IF (RAP.EQ.ICODEF(ON)) THEN $$ We have a RAPID move ELSE $$ We have a feed move ENDIF
2000 PTC
68
POSTF Functions
PLABEL Command PLABEL / OPTION, number , TO, value
This command is used to access directly some of the INTCOMs : PLABEL / OPTION,1 ,TO,1 = POSTF ( 2,1,1831,1)
WARNING : PLABEL is a CL command (and will be treated by GPOST as a CL command) and POSTF a function. It is recommended to use POSTF(2 instead of PLABEL in a FIL macro
Examples :
PLABEL / OPTION, 19, TO , 0 $$ Do not check travel limits PLABEL / OPTION, 19, TO, 1 $$ Check travel limits PLABEL / OPTION, 19, TO, 2 $$ Check travel limits and call $$ _REPOS macro is needed PLABEL / OPTION, 65, TO, 2 $$ Special DPM for MILL/TURN PLABEL / OPTION, 88, TO, 1 $$ Axis registers non modal PLABEL / OPTION, 18, TO, 1 $$ remove redundant F code
2000 PTC
69
POSTF Functions
Set Common value to empty rslt = POSTF (3, type, location)
rslt : 0
type : 1:INTCOM 2:RELCOM 3:DBLCOM location : common location number to set
2000 PTC
70
POSTF Functions
EXAMPLES :
G1 non modal $$ CLEAR PREV-G LOCATION AND FORCE G-OUTPUT CIMFIL/ON,5 $$ Empty last content of register G (7) : DMY=POSTF(3,3,(355+7)) DMY=POSTF(13) CIMFIL/OFF Output -0 instead of -360 DMY = POSTF(2,1,2706,0) $$ Output -0 instead of -360
2000 PTC
71
POSTF Functions
Output current post block rslt = POSTF(19) Get Machine number rslt = POSTF(22) rslt : machine number Move Common values rslt = POSTF(23, type, new_location, existing_location) rslt : 0 type : 1:INTCOM 2:RELCOM 3:DBLCOM new_location : new common location number existing_location : existing common location
2000 PTC 72
POSTF Functions
EXAMPLE
CL Command output alone on one NC block CIMFIL / ON, major_word XX = POSTF(19) $$ Purge current block XX=POSTF(13) $$ Process major word XX=POSTF(19) $$ Purge current block CIMFIL/OFF
2000 PTC
73
POSTF Functions
Get number of arguments of current CL record rslt = POSTF(5)
2:text
POSTF Functions
Pro/NC CL record : 12 : SPINDL / RPM, 1500, CLW Internally stored as : 12,#2000,#1031 / #78 ,1500, #60 CIMFIL / ON, SPINDL NBARG = POSTF( 5) $$ NBARG=6 CLREC = POSTF(7,1) $$ CLREC=12 $$ Find type of the arguments TYPG4=POSTF(6,4) $$ equal to 0 (minor word RPM) TYPG5=POSTF(6,5) $$ equal to 1 (real 1500) $$ find value of the arguments VARG4=POSTF(7,4) $$ returns 78 VARG5=POSTF(7,5) $$ returns 150 $$ Test if VARG4 is RPM IF (VARG4 .EQ. ICODEF(RPM)) THEN ..
2000 PTC
75
POSTF Functions
Get CL Text string = TEXT / CLW (function 8)
POSTF Functions
EXAMPLE
Do not process PPRINT with the word COMMENTS CIMFIL/ON,PPRINT $$ Start on all PPRINT $$ Do not process PPRINTs containing the word COMMENTS TXT=TEXT/CLW $$ extract the PPRINT text TEST=TEXT / COMMENTS OK = INDXF ( TXT, TEST) $$ Position of TEST in TXT IF (OK .EQ. 0) THEN $$ this is not the word COMMENTS $$ Process the PPRINT DMY = POSTF(13) ENDIF CIMFIL / OFF
77
2000 PTC
POSTF Functions
Set number of CL words rslt = POSTF(12, number_of_words)
rslt : 0
number_of_words : number of arguments Execute current CL record rslt = POSTF(13) Save current CL record rslt = POSTF(20)
POSTF Functions
EXAMPLE
Remove COOLNT options CIMFIL / ON , COOLNT $$ Starts on all COOLNT commands $$ Process only the first parameter of COOLNT (position 4) $$ by changing the number of arguments to 4 DMY = POSTF (12, 4) $$ Process the record DMY = POSTF (13) CIMFIL / OFF
2000 PTC
79
POSTF Functions
Read next CL record rslt = POSTF(14) rslt : 0=OK 1=Error Position to CL record rslt = POSTF(15, cl_rec_number) rslt : 0:OK 1=Error cl_rec_number : position to go to in CL file Control CIMFIL/ON rslt = POSTF(26,class, sub-class, status) rslt : 0 class : class of PP word sub-class : sub-class of PP word status : 0:disabled 1:enabled
2000 PTC 80
REPLAC Command
The REPLAC command allows to edit/modify the tape output block : REPLAC / string, replace_string, [nb_times nb_block] REPLAC / string, replace_string, wild_card, [nbt, nbb] REPLAC / string, OFF REPLAC / OFF
Typical Applications
Change the order of output of G codes, for example for cycles : G81G99 to G99G81, G82G99 to G99G82,
REPLAC/(TEXT/'G8?G99'),(TEXT/'G99G8?'),(TEXT/'?')
81
2000 PTC
REPLAC Command
2000 PTC
82
REPEAT Command
The REPEAT Command is used to output an extra address and value automatically whenever a specific address is output. REPEAT / register1, register2, value, [ON or OFF]
2000 PTC
REPEAT Command
Example of application : Output Spindle start with next Z
M=13;S=19;Z=26 CIMFIL / ON, SPINDL ARG1=POSTF(7,4) $$ first argument of SPINDL IF (ARG1 .NE. (ICODEF(OFF))) THEN DMY=POSTF(2,1,1867,1) $$ Disable tape output DMY=POSTF(13) $$ Process Spindl DMY=POSTF(2,1,1867,0) $$ Enable Tape output REPEAT / OFF REPEAT / Z, M, 3 $$ Output M3 with next Z $$ Get current Spindle speed (DBLCOM 10) SRPM=POSTF(1,3,10) REPEAT / Z, S, SRPM $$ Output Svalue with next Z ELSE DMY=POSTF(13) $$ Process SPINDL/OFF ENDIF CIMFIL / OFF
2000 PTC
84
REPEAT Command
Output fixture offset with next motion
CIMFIL/ON,SET $$ Macro on SET $$ Output fixture offset with next motion $$ Extract the fixture offset value IF (POSTF(6,5).EQ.1) THEN $$ Argument 2 is a real FIXT=POSTF(7,5) $$ output with next X or Y REPEAT/OFF REPEAT/X,Y,G,FIXT,ALL ENDIF CIMFIL/OFF
2000 PTC
85
REPEAT Command
5 Axis Milling machine with a special compensation : G1 X Y Z A B U V W
CIMFIL/ON,GOTO $$ Calculate U,V,W using tool vector and 1000 XX=POSTF(20) $$ Save CL rec $$ Extract tool vector IVAL=POSTF(7,9);JVAL=POSTF(7,10);KVAL=POSTF(7,11) TOT=IVAL+JVAL+KVAL $$ Only when in 5 axis mode not vertical ! IF ((KVAL.NE.1).AND.(TOT.NE.0)) THEN REPEAT/OFF UVAL=1000*IVAL;REPEAT/X,Y,Z,U,UVAL,ALL VVAL=1000*JVAL;REPEAT/X,Y,Z,V,VVAL,ALL WVAL=1000*KVAL;REPEAT/X,Y,Z,W,WVAL,ALL ENDIF XX=POSTF(21);XX=POSTF(13) CIMFIL/OFF
2000 PTC 86
2000 PTC
88
Simulation ON means CL record are processed but no output to the tape : XX=POSTF(2,1,1867,1)
Simulation OFF (default) means CL records are processed and tape is generated : XX=POSTF(2,1,1867,0)
89
2000 PTC
2000 PTC
91
TEXT / READ, PUNCH and TEXT / READ, PRINT can be used to read the content of the auxiliary files.
Macro on Motion
Macro on motion are started with : CIMFIL / ON, class, subclass or directly CIMFIL / ON, GOTO (Class 5000 , subclass 5) CIMFIL / ON, FROM (Class 5000, subclass 3) CIMFIL / ON, CIRCLE (Class 3000) Activation / Deactivation of macro on motion can be controlled with POSTF(26, )
2000 PTC
93
Macro on Motion
Motion Coordinates in Macro on GOTO CIMFIL / ON, GOTO XVAL = POSTF(7,6) YVAL = POSTF(7,7) ZVAL = POSTF(7,8) IVAL = POSTF(7,9) JVAL = POSTF(7,10) KVAL = POSTF(7,11) $$ Current position in CL coord. CURX = POSTF(1,3,350) CURY = POSTF(1,3,351) CURZ = POSTF(1,3,352) ...
2000 PTC 94
Macro on Motion
Support for Super GI on Makino :
SGI=0
95
Macro on Motion
EXAMPLE : 3D Compensation Pro/NC can MODE / 3DCOMP, ON SPINDL / RPM, 1200.000000, CLW outputs RAPID GOTO / -2.6049664968, -1.6546238805, 2.0000000000 information for RAPID 3D compensation GOTO / -2.6049664968, -1.6546238805, 0.8683175847 / 12.000000, IPM for 3 axis surface FEDRAT GOTO / -2.6049664968, -1.6546238805, 0.6683175847 CUTCOM / ON milling GOTO / -2.3573283320, -1.6583390255, 0.5974283950, $
Pro/NC-GPOST can process the information and a FIL macro is used to generate the output needed by the machine
0.0000000000, 0.0000000000, 1.0000000000, $ 0.0000000000, -0.9986295348, 0.0523359562 GOTO / -2.1057717020, -1.6616855756, 0.5335724151, $ 0.0000000000, 0.0000000000, 1.0000000000, $ 0.0000000000, -0.9986295348, 0.0523359562 . GOTO / -2.6000000000, 0.4860895490, 1.0000000000, $ 0.0000000000, 0.0000000000, 1.0000000000, $ 0.0000000000, 0.0000000000, 1.0000000000 CUTCOM / OFF GOTO / -2.6000000000, 0.4860895490, 2.0000000000, $ 0.0000000000, 0.0000000000, 1.0000000000, $ 0.0000000000, 0.0000000000, 1.0000000000 MODE / 3DCOMP, OFF
2000 PTC
96
Macro on Motion
EXAMPLE : 3D Compensation
CIMFIL/ON,GOTO DMY=POSTF(20) $$ save record $$ Check if 3D Comp. IF (OKCOMP.EQ.1) THEN $$ output the register with the next block $$ (the motion processed by GPOST) POSTN/OUT,U,LVECT,V,MVECT,W,NVECT,NEXT ENDIF DMY=POSTF(21) $$ restore record DMY=POSTF(13) $$ process CIMFIL/OFF CIMFIL/ON,MACHIN XX=POSTF(13) XX=POSTF(26,5,5,0) CIMFIL/OFF
97
SETARG = MACRO / NBARG $$ Macro to set the number of arguments $$ NBARG : number of argument after the / XXX=POSTF(12, NBARG+3) TERMAC
CIMFIL / ON, COOLNT $$ Remove COOLNT options (Low, High, ..) CALL / SETARG, NBARG=1 XX=POSTF(13) CIMFIL / OFF
2000 PTC
99
Look-ahead Technique
Key functions for look-ahead are :
ICODEF(MAJOR_WORD) : return the integer value of a minor word POSTF(7,1) : CL record position (line number) POSTF(7,2) : CL record class POSTF(7,3) : CL record sub-class
2000 PTC
2000 PTC
102
to 10
... $$ Go back at beginning CL DMY=POSTF(15,(CLPOS+1)) $$ Re-enable tape output $$ Set INTCOM 1867 to 0 DMY=POSTF(2,1,1867,0) $$ Insert the mfg time DBLCOM 495 TIM=POSTF(1,3,495) INSERT/'(MACHINING TIME : ',TIM,')$' CIMFIL/OFF
103
2000 PTC
Enable/Disable Registers
To disable a register you need to set the tape order of the register to 53
To enable a register you need to reset its tape order to the initial value
Store the tape order of the register before disabling it : INTVAL = POSTF(1,1,intcom_val) Restore the tape order : XX=POSTF(2,1,intcom_val, intval)
2000 PTC
104
Enable/Disable Registers
Example : disable X & Y on the first cycle motion (GPOST repeats them automatically)
XREG=POSTF(1,1,24) YREG=POSTF(1,1,25) CIMFIL/ON,CYCLE XX=POSTF(13) CYCTYP=POSTF(7,4) IF (CYCTYP.NE.ICODEF(OFF)) THEN $$ Activate macro on GOTO XX=POSTF(26,5,5,1) ENDIF CIMFIL/OFF CIMFIL/ON,MACHIN XX=POSTF(13) $$ De-activate macro on GOTO XX=POSTF(26,5,5,0) CIMFIL/OFF
2000 PTC
CIMFIL/ON,GOTO $$ first motion after CYCLE $$ disable X and Y RSLT=POSTF(2,1,24,53) RSLT=POSTF(2,1,25,53) $$ Process the motion DMY=POSTF(13) $$ re-enable X and Y DMY=POSTF(2,1,24,XREG) DMY=POSTF(2,1,25,YRE ) $$ De-activate macro on GOTO XX=POSTF(26,5,5,0) CIMFIL/OFF
105
DMY=POSTF(2,1,L2,1)
DO/L10,N1=1,8 L2=(N1-1)*26+L1+2216-1 DMY=POSTF(3,1,L2)
$$ SET JPARAD(X,9)
$$ ALLOW UPTO 8CHARS $$ COMPUTE JPARAD(X,N) $$ SET JPARAD(X,N)=IEMPTY
IF(N1 .GT. CANF(STR,1))JUMPTO/L10 $$ SKIP IF OVER STRING LENGTH A1=ICHARF((TEXT/RANGE,STR,N1,N1)) $$ GET CHARACTER NUMBER DMY=POSTF(2,1,L2,A1) L10)CONTIN TERMAC
2000 PTC 106
$$ INSERT STRING(N)
$$ Replace Z by R101= Z=26 T1=TEXT/R101= CALL / MAD1, ADR=Z,STR=T1 $$ Reset Z to Z CALL / MAD2, ADR=Z
2000 PTC
107
File I/O
FIL provides the means to open, read and write from external files (maximum 2 at a given time) :
rslt = FILEF(fn,op,t1)
rslt : Result of operation (0:OK 1:Failed) fn: File number to be used (0, 1, 2, 3, or 4). If fn is 0, output is sent to the terminal. op: Operation to be executed = 1 Write one record from text string t1 to file fn. = 2 Open an existing file; file name is t1; fn must be 1 or 2. = 3 Open a new file; file name in t1; fn must be 1 or 2. = 4 Rewind file; t1 not required; fn must be 1 or 2. = 5 Close file; t1 not required; fn must be 1 or 2. = 6 Close and delete file; t1 not required; fn must be 1 or 2. = 7 Inquire if file exist; rslt will be set to 1 if file exist, otherwise rslt will be set to 0; fn must be 1 or 2.
File I/O
FILEF(1,4,string) : Write directly to tape file
SP1=TEXT/ XX=FILEF(1,4,SP1)
2000 PTC
109
File I/O
2000 PTC
110
File I/O
Macro to read the tool file : *.tl1
This file is created automatically by GPOST before the processing of the CL file :
The first line is the number of tool changes in your CL file. In this case 3 tool changes. Each line there after is as follows:
2000 PTC
First value is the cl record number of the tool change Second value is the type of tool change, 1=LOADTL 2=TURRET Third value is the tool number Fourth value is the offset number Fifth value is the Z length from the LOADTL, 0= if TURRET Sixth value is the X gage from the TURRET, 0= if LOADTL Seventh value is the Y gage from the TURRET, 0= if LOADTL Eighth value is the CLW-CCLW from the TURRET, 1=CLW -1=CCLW, 0= if LOADTL Nineth value is the TURRET that is being indexed 1=front, 2=read, 3=saddle, 4=main, rail=5 and 0= if LOADTL
111
File I/O
Reserv/#TLLST,100 $$ Tool List Data Statements, Default 100
_RdTL1 = Macro/ $$ this macro will read the .tl1 file and make a $$ a set of data statements named #TLLST and $$ sets a "number of tool changes" variable, #MXTLS #MXTLS = 0 $$ DEFAULT NUMBER OF TOOLS #FNAME = TEXT/PART $$ GET THE INPUT FILE NAME EXT=TEXT/'.NCL' IPOS=INDXF(#FNAME,EXT) $$ POSITION OF .NCL #FNAME = TEXT/RANGE,#FNAME,1,IPOS+3 $$ REMOVE THE EXTENSION #FNAME = TEXT/#FNAME,'.TL1' $$ ADD .TL1 EXTENSION #FEXST = FILEF(1,7,#FNAME) $$ CHECK IF FILE EXIST IF(#FEXST .EQ. 1)THEN $$ FOUND THE FILE #FOPEN = FILEF(1,2,#FNAME) $$ OPEN THE EXISTING FILE #TMPST = TEXT/READ,1 $$ READ THE 1ST LINE OF THE FILE #MXTLS = SCALF(#TMPST) $$ CONVERT TEXT TO SCALAR IF(#MXTLS .GT. 0)THEN $$ THERE IS SOME TOOL CHANGES LOOPST $$ LOOP BOUNDARY ...
2000 PTC 112
File I/O
... DO/#REDO,#NN=1,#MXTLS,1 $$ SET UP THE LOOP #TMPST = TEXT/READ,1 $$ READ THE NEXT LINE #TVAL1 = TEXT/RANGE,#TMPST,1,12 $$ 12 CHARS CL NUMBER #TNUM1 = SCALF(#TVAL1) $$ CONVERT TO SCALAR #TVAL2 = TEXT/RANGE,#TMPST,13,16 $$ 4 TYPE 1=LOADTL 2=TURRET #TNUM2 = SCALF(#TVAL2) $$ CONVERT TO SCALAR #TVAL3 = TEXT/RANGE,#TMPST,17,30 $$ 14 CHARS TOOL NUMBER #TNUM3 = SCALF(#TVAL3) $$ CONVERT TO SCALAR #TVAL4 = TEXT/RANGE,#TMPST,31,44 $$ 14 CHARS OFFSET NUMBER #TNUM4 = SCALF(#TVAL4) $$ CONVERT TO SCALAR #TVAL5 = TEXT/RANGE,#TMPST,45,58 $$ 14 CHARS Z LENGHT #TNUM5 = SCALF(#TVAL5) $$ CONVERT TO SCALAR #TVAL6 = TEXT/RANGE,#TMPST,59,72 $$ 14 CHARS X GAGE #TNUM6 = SCALF(#TVAL6) $$ CONVERT TO SCALAR #TVAL7 = TEXT/RANGE,#TMPST,73,86 $$ 14 CHARS Y GAGE LENGTH #TNUM7 = SCALF(#TVAL7) $$ CONVERT TO SCALAR #TVAL8 = TEXT/RANGE,#TMPST,87,89 $$ 3 CHARS #TNUM8 = SCALF(#TVAL8) $$ CONVERT TO SCALAR #TVAL9 = TEXT/RANGE,#TMPST,90,92 $$ 3 CHARS TURRET SELECTED #TNUM9 = SCALF(#TVAL9) $$ CONVERT TO SCALAR ...
2000 PTC 113
File I/O
... #TLLST(#NN) = DATA/#TNUM1,#TNUM2,#TNUM3, $ #TNUM4,#TNUM5,#TNUM6, $ #TNUM7,#TNUM8,#TNUM9 $$ BUILD THE DATA STATEMENT #REDO) CONTIN LOOPND $$ LOOP BOUNDARY ENDIF IF(#FOPEN .EQ. 0)THEN #FCLOS = FILEF(1,5) $$ CLOSE THE .TL1 FILE ENDIF ENDIF TERMAC
The data can be extracted with the OBTAIN function (after calling the macro) :
For example to extract the first tool number : OBTAIN, DATA / #TLIST(1),,,TNUM For example to extract the last tool number : OBTAIN, DATA / #TLIST(#MXTLS),,,TNUM
114
2000 PTC
SPWNF Command
The SPWNF command spawns a sub-process : SPWNF ( command, option)
command : text string containing the command line to be passed to the operating system option : processing option, 0:process after the FINI (available only in Pro/E 2000i2 build 280 or better), 1:wait for process to return to GPOST before continuing and 2:continue GPOST processing without waiting.
2000 PTC
115
SPWNF Command
Macro to rename the NC File
(there seems to be a bug (C and windows bug) and we cant run directly a command or a bat file from SPWNF, only an executable. A rbatfile.exe is provided to run batch file)
MRENTP=MACRO/ T1=TEXT/'XXRENXX.BAT' I1=FILEF(1,7,T1) $$ Check if file already exist IF(I1 .EQ. 1) THEN DMY=FILEF(1,2,T1) DMY=FILEF(1,6) $$ Close and delete ENDIF DMY=FILEF(1,3,T1) $$ Open a new file T1=TEXT/PART $$ CL file name and path T1=TEXT/UP,T1 $$ Put in upper case I1=INDXF(T1,(TEXT/'.NCL')) T1=TEXT/RANGE,T1,1,I1 $$ extract CL file name without extension T1=TEXT/T1,'TAP $$ Old tape extension
...
2000 PTC 116
SPWNF Command
$$ Create the batch file to run : new extension if .NC DMY=FILEF(1,1,(TEXT/'COPY ',T1,' *.NC')) DMY=FILEF(1,1,(TEXT/'DEL ',T1)) DMY=FILEF(1,5) $$ Close the bat file $$ Create command to run the bat file T1=TEXT/'C:\RBATFILE XXRENXX.BAT $$ Run the bat file after the end of execution of GPOST DMY=SPWNF(T1,0) TERMAC
Note : Another to do this, is to re-direct the output of the tape file to the auxiliary file (POSTF(25,1)) and in a CIMFIL on FINI read the auxiliary file and write it to a new tape file !
2000 PTC
117
collaboration
Pro/NC-GPOST
innovation
global solutions
2000 PTC
Multi-axis Recommendations
Apply to Multi-axis Mill and Mill/Turn
CL File format : 4 Axis :ROTATE or MULTAX 5 Axis : MULTAX CL File accuracy : mfg_ijk_num_digits >= 8
LINTOL Deviation
2000 PTC
119
Main kinematics directly available in the Questionnaire Look at the machine with all the axis at Zero Look at the axis of rotation, not the name of the register Primary axis is the axis that GPOST is going to try to resolve first : Table / Table configuration : Primary is the axis on which the part is going to be mounted Head / Head configuration : Secondary is the axis on which the tool is going to be mounted
Note : there are some errors on the machine graphics in Optfile so do not rely on them for the kinematics !
120
2000 PTC
Translate axis if needed : For example a configuration Table B / Table C is the same as Table B / Table A (B zero is translated by 90 deg.)
Note : you can use the new questionnaire V5.4 to create your post and run it with the Pro/NC-GPOST 2000i2 - build 280 or better
2000 PTC 121
2000 PTC
122
2000 PTC
123
Create a 4 axis milling machine (rotary head A axis for example) Create a special register for the rotary axis : alias AAA, format 0
2000 PTC
124
In Pro/NC outputs MULTAX, the post will automatically orient the spindle in horizontal or vertical position Macro to output plan selection on LOADTL :
G17G18 = MACRO / $$ Check the tool vector of the next GOTO CLREC=POSTF(7,1)+1 $$ Current CL pos. DO / LOP1, ILOOP=1, 2 ILOOP=1 XX=POSTF(14) $$ Read next CL rec. CLASS=POSTF(7,2) IF (CLASS.EQ.5000) THEN $$ GOTO ILOOP=3 $$ Exit the loop NBARG=POSTF(5) $$ number of argument IF (NBARG.GT.8) THEN $$ MULTAX JVAL=POSTF(7,10) IF (JVAL.EQ.1) THEN GPLAN=18 ELSE GPLAN=17 ENDIF ELSE GPLAN=17 ENDIF ENDIF LOP1) CONTIN XX=POSTF(15,CLREC) $$ return to initial pos. TERMAC T=20;G=7 CIMFIL/ON,LOADTL $$ Macro will output $$ G17 T.. $$ or G18 T.. XX=POSTF(20) $$ Save CL rec CALL/G17G18 REPEAT/OFF REPEAT/T,G,GPLAN XX=POSTF(21) XX=POSTF(21) CIMFIL/OFF
2000 PTC
125
2000 PTC
126
Swiveling table like with MAHO are supported with FIL macro (Questionnaire in 2001)
FLEN=155.006/25.4 ANUT=45.0 TRNX=0.0 CIMFIL/ON,MACHIN DMY=POSTF(13) $$ CB-NUTATOR TABLE DMY=POSTF(2,3,635,FLEN) $$ PVTDST in Z DMY=POSTF(2,3,653,TRNX) $$ PVTD in X DMY=POSTF(2,3,881,ANUT) $$ NUTAT ANGLE CIMFIL/OFF
B40= and C40= registers output (feedrate calculation) can be controlled with DBLCOM 985 (register selection with INTCOM 2456, 2457)
127
2000 PTC
GPOST is always looking at the part stationary and the tool moving even in a table/table configuration
2000 PTC 128
Macro activated with PLABEL / OPTION, 19, TO, 2 CIMFIL/ON,MACHIN DMY = POSTF(13) PLABEL/OPTION,19,TO,2, CIMFIL/OFF Macro called each time a rotary limit is broken This is a generic macro that allow you to rewind the rotary axis and use the alternate solution Macro need to be customized for each case
2000 PTC
2000 PTC
131
Test continuous motions (Linearization) Test limits Then develop tape format Feedrate calculation ( 1/T ) Cycles ...
Inverse time feedrate : When combined linear/rotary motion exist, most good CNC controls require the inverse of the amount of time necessary to make the move
F(code) = 1 (minute) / (time = 3D distance / velocity)
132
2000 PTC
Multi-axis Lathes
NCL File from Pro/NC Processed by GPOST
FIL macro should start on the syntax generated by GPOST during its pre-processing of the CL file
2000 PTC 134
Multi-axis Lathes
Synchronized Lathes 2 Tapes Method
Can be done with two techniques Process two times the CL file
Macro on HEAD, FINI, MACHIN and OP Macro on HEAD, FINI, MACHIN and OP
Macro on HEAD and OP to generate the codes HEAD /1 for G13 and sequence number HEAD / 2 for G14 and sequence number OP / op, HED, hd to generate M(100+op)
2000 PTC
135
Multi-axis Lathes
For Example OKUMA : G13/G14 technique
CURHED=1 SEQ1=1 SEQ2=1 CIMFIL/ON,OP PVAL=100+POSTF(7,4) INSERT/'P',PVAL,'$' CIMFIL/OFF
2000 PTC
CIMFIL/ON,HEAD HSIDE=POSTF(7,4) IF ((HSIDE.EQ.1).AND.(CURHED.NE.1)) THEN $$ Store next sequence number to be output for Head 2 SEQ2=POSTF(1,1,2012) $$ INTCOM 2012 : next sequence number SEQNO/SEQ1,INCR,1 INSERT/' G13$' CURHED=1 ENDIF IF ((HSIDE.EQ.2).AND.(CURHED.NE.2)) THEN $$ Store next sequence number to be output for Head 1 SEQ1=POSTF(1,1,2012) SEQNO/SEQ2,INCR,1 INSERT/' G14$' CURHED=2 ENDIF ENDIF $$ Ignore the other HEAD commands CIMFIL/OFF
136
Wire EDM
Pro/NC-GPOST supports
XYQR Output MULTAX Data Input only 2 contours input with FIL macros
137
Wire EDM
AGIE CUTCOM Flip
GOTO / P1 GOTO / P2 GOTO / P3 G1 P2 G44 G1 P1 G40 G1 P3 G44
... $$ GOTO coordinates XVAL=POSTF(7,6);YVAL=POSTF(7,7);ZVAL=POSTF(7,8) $$ Mid point XMID=(XVAL-XPOS)/2;YMID=(YVAL-YPOS)/2;ZMID=(ZVAL-ZPOS)/2 $$ Redirect output XX=POSTF(25,1) SEQNO/OFF $$ Stop sequence numbering $$ Output in 2 motions GOTO/XMID,YMID,ZMID GOTO/XVAL,YVAL,ZVAL SEQNO/ON $$ restart sequence numbering $$ Reset output re-direction XX=POSTF(25,0) $$ Read back the two blocks BLK1=TEXT/READ,PUNCH BLK2=TEXT/READ,PUNCH $$ Flip the output and add CUTCOM codes INSERT/' ',BLK2,' G44$' INSERT/' ',BLK1,' G40$' $$ Issue the last G44 with the next X Y block $$ L is an extra register at the end of the MCD list $$ alliased to G REPEAT/X,Y,L,44,ALL TERMAC
AGIE=MACRO/ $$ This macro will split the GOTO $$ following a CUTCOM in 2 $$ and flip the order of output $$ This macro is called from the CUTCOM $$ Current position XPOS=POSTF(1,3,350);YPOS=POSTF(1,3,351) ZPOS=POSTF(1,3,352) $$ Read the GOTO or FEDRAT ?1 XX=POSTF(14) CLASS=POSTF(7,2) IF (CLASS.EQ.2000) THEN $$ This is the FEDRAT, process and read next CL XX=POSTF(13) XX=POSTF(14) ENDIF ...
2000 PTC
Punch Press
Punch presses are supported using FIL routines
2 Types of Punch press : Standard output (G1/G2/G3) (Trumpf, ... ) Polar Coordinates (Fanuc, Amada, Strippit, ...)
2000 PTC
Macros on CYCLE CYCLE / NIBBLE, STEP, step_value GOTO / start position GOTO / end position CYCLE / OFF CYCLE / NIBBLE, STEP, step_value GOTO / start position CIRCLE / GOTO / end position CYCLE / OFF
139
Punch Press
Macro for Sheet size
GETSIZ = MACRO / $$ Macro to find the sheet size $$ PPRINT / SIZE : xval X yval X thickness $$ PPRINT before the first LOADTL $$ Return OKSIZ 0:not found 1:found CLPOS=POSTF(7,1)+1 $$ Current CL position TSIZE=TEXT/'SIZE' COLON=TEXT/':' XMULT=TEXT/'X' DO / ENDO1, ILOOP=1, 10 DMY=POSTF(14) $$ read next CL record CLC=POSTF(7,2) $$ CL rec class SCL=POSTF(7,3) $$ CL rec sub-class IF (CLC.EQ.2000.AND.SCL.EQ.ICODEF(LOADTL))THEN OKSIZ=0 $$ PPRINT/SIZE not found ILOOP=11 $$ Exit the loop ELSE IF (CLC.EQ.2000.AND.SCL.EQ.ICODEF(PPRINT)) THEN TPPR=TEXT/CLW $$ PPRINT text TPPR=TEXT/OMIT,TPPR,1 $$ Omit trailing blanks OKSIZ=INDXF(TPPR,TSIZE) $$ look for word SIZE IF (OKSIZ.NE.0) THEN ILOOP=11 $$ Exit the loop $$ Extract the sheet size ICOL=INDXF(TPPR,COLON) $$ Position of : ILEN=CANF(TPPR,1) $$ Length of string TPPR=TEXT/RANGE,TPPR,ICOL+1,ILEN ...
2000 PTC
... IX=INDXF(TPPR,XMULT) $$ First X STX=TEXT/RANGE,TPPR,1,IX-1 $$ Extract X ILEN=CANF(TPPR,1) $$ Length of string TPPR=TEXT/RANGE,TPPR,IX+1,ILEN $$ second X ILEN=CANF(TPPR,1) $$ Length of string IX=INDXF(TPPR,XMULT) $$ Position of first X STY=TEXT/RANGE,TPPR,1,IX-1 $$ Extract Y STZ=TEXT/RANGE,TPPR,IX+1,ILEN $$ Extract Z $$ Debug : INSERT/'STX=',STX,'STY=',STY,'STZ=',STZ,'$' $$ Conversion to real XSIZE=SCALF(STX) YSIZE=SCALF(STY) ZSIZE=SCALF(STZ) ELSE ILOOP=1 $$ Continue the loop ENDIF ELSE ILOOP=1 $$ Continue the loop ENDIF ENDIF ENDO1) CONTIN $$ return initial position in CL RSLT=POSTF(15,CLPOS) TERMAC
140
Merged Post-processor
Merged post-processors can be used for : Mill/Turn Punch/Laser Special machine Multiple processes One for each post : generate a clfilename.Pui tape file for each post
One for the merging post : used to merge the *.Pui tape file in one tape file : *.tap
Setup of merged PP One main PP with the list of all the PPs (creates UNC?01.Mnn)
2000 PTC
141
Milling functionality
2000 PTC
142
2000 PTC
143
collaboration
innovation
Pro/NC-GPOST 2000i2
Build 2000280
global solutions
2000 PTC
The questionnaire (OPTFILE) is the same than previous version The run-time (GPOST) is equivalent to Pro/NC-GPOST 2001 New functionality available through macro !
2000 PTC
145
Miscellaneous
Macro on REMARK : all the $$ text in Pro/E CL file are converted automatically to REMARK / text : CIMFIL/ON,REMARK TXT=TEXT/CLW TXT=TEXT/OMIT,TT,1 .
Control Pivot point output for 5 axis Head/Head machine : INTCOM(1510) = 0, Output at pivot control point (default) = 1, Output at spindle face The output of the ABC axis can now be suppressed with the CYCLE/ commands INTCOM(4337) = 0 Repeat ABC axes with new CYCLE = 1 Do not repeat ABC axes with new CYCLE
2000 PTC
146
Miscellaneous
Machining Time DBLCOM(0989) DBLCOM(0990) DBLCOM(0991) DBLCOM(0992) DBLCOM(0993) = Time for feedrate motion = Time for rapid motion = Time for dwell = Time for tool change = Time for misc operation
2000 PTC
Circle Information DBLCOM(926) = circle start angle DBLCOM(910) = total angle INTCOM(538) = circle direction
147
Automatic CLAMP/UNCLAMP
A new option to control the automatic clamp/unclamp of the axes has been added. For each GOTO/ command, the required axes will be unclamped (M-code) before the move and clamped after. INTCOM(4319) = 0, No clamp/unclamp needed Default = 1, Auto axes clamp/unclamp required.
UNCLAMP
Set INTCOM(4320) Set INTCOM(4320) > 0 to specify M-code to unclamp all axes = 0 to Unclamp each axis individually
CLAMP
Set INTCOM(4327) Set INTCOM(4327) > 0 to specify M-code to unclamp all axes = 0 to Unclamp each axis individually
Set INTCOM(4321-26) = to specify M-code for each xyzabc axis. If set to zero then that axis will not be unclamped.
Set INTCOM(4328-33) = to specify M-code for each xyzabc axis. If set to zero then that axis will not be unclamped.
2000 PTC
148
Tangential Arcfitting
Generates circular and helical interpolation records by collecting linear motions within tolerance Keep arcs tangent to each other Works in any plane supported by the NC machine 2D Planes : XY, YZ, ZX planes 3D Arcs for FANUC (G03.4,G02.4) and SIEMENS (CIP format) Control available for : Tolerances Fitting Plane Minimum and Maximum number of points
2000 PTC
149
Tangential Arcfitting
TANGENTIAL ARCFITTING SETUP (Pro/NC-GPOST 2000i2 - build 280) Set INTCOM(4334)=1
Arcfitting activation by CL commands in CL file : CRVFIT/ARC, [ ON, OFF ] Options To allow helical fitting :
CRVFIT/ ARCSLP, [ON,OFF]
For 3D Arcs :
CRVFIT / XYZ, [ON,OFF] OFF is the default
Tolerances :
CRVFIT / TOLER, type, value Type : 1-fit tolerance (0.005) , 2-Z change tolerance (0.005), ..
Number of POINTS
150
2000 PTC
CRVFIT/POINT1,min number (5) or CRVFIT/POINT,2,max number (150) more options are available - check documentation NURBSFITTING.doc
NURBS Fitting
NURBS FITTING
Generate polynomial or spline curve interpolation record by collecting linear motions within tolerances Support for
Bezier (Heidenhain) NURBS (Fanuc) Polynomial (Philips,Siemens) B-Spline (Siemens, NUM, Mikron)
Control available for : Tolerances Fitting Plane Minimum and Maximum number of points
2000 PTC
151
NURBS Fitting
NURBS FITTING SETUP (Pro/NC-GPOST 2000i2 - build 280) Set INTCOM(4334)=1
NURBS fitting activation by CL commands in CL file : CRVFIT/SPLINE, [ ON, OFF ] Options Select type of NURBS
CRVFIT/TYPE, id id : 0- NURBS : FANUC, HEIDENHAIN, SIEMENS, 1-Cubic Spline : SIEMENS POLY
Tolerances :
CRVFIT / TOLER, type, value Type : 1-fit tolerance (0.005) , 2-Z change tolerance (0.005), ..
2000 PTC
Number of POINTS
CRVFIT/POINT1,min number (5) or CRVFIT/POINT,2,max number (150)
152
CRVFIT/TYPE,1
CRVFIT/SPLINE,ON
SIEMENS POLY
CRVFIT/TYPE,2
CRVFIT/SPLINE,ON
CRVFIT/XYZ,ON CRVFIT/ARC,ON
2D Arcs
CRVFIT/ARC,ON
153
2000 PTC
UNCX01.P01 : FANUC (Makino) NURBS and 3D Arcs UNCX01.P02 : SIEMENS BSPLINE UNCX01.P03 : HEIDENHAIN NURBS UNCX01.P04 : SIEMENS POLY format and 3D Arcs CIP
3D Arc ON NURBS OFF NURBS Poly ON NURBS Fitting ON
154
2000 PTC
PUNCH/20,filename : function to create the encrypted file READ/20,ALL,filename : function to read or includ the encrypted file in the FIL file. CPUID=POSTF(27) : returns CPU ID of user Note : this functionality is available in Pro/E 2000i2 build 2000280 or better
2000 PTC
155
Create and test your post-processor normally (UNCX01.Pnn and UNCX01.Fnn) Isolate the lines of code you want to Hide Create a MACRO for these lines Replace the lines by a macro CALL Put all the macros in a separate file UNCX01.Lnn with a special header : PPWORD/PUNCH,827 PUNCH/20,ALL, macro_file_name (6 chars maxi)
156
2000 PTC
Rename UNCX01.Fnn UNCX01.sav and rename UNCX01.Lnn to UNCX01.Fnn Execute the post-processor : this will create an encrypted file with all the macros called : macro_file_name.extension Rename UNCX01.sav to UNCX01.Fnn Change the header of UNCX01.Fnn to include the macro file :
READ/20,ALL, macro_file_name
Important : this should be the first line You are now ready to use the Post-processor
2000 PTC
157
FIL File
2000 PTC
158
Pro/NC-GPOST Localisation
Pro/NC-GPOST 2001 can be localized
File to translate :
Pro/E loadpoint / platform / gpost/ ncjlibs / Resources_Optfile_PTC.properties
Keep the original file as a reference Translate after the equal sign
2000 PTC
159