FAQ #1 General Description / General Information file_panel

FAQ #1
How to read a “basic” file in CAM-POST (Pro/NCPOST) ?
Start the questionnaire, go to General Description / General Information and after
selecting the machine type (Question 3.00) selectfile_panel for Question 5.0
A new panel will appear which will allow you to select the controller that you want :
See description of the control in the IL1 window
CAM-POST- Pro/NCPOST FAQs
1
FAQ #2
How to configure the basic file to be in metric units ?
CAM-POST (Pro/NCPOST) is delivered with the basic file in imperial units. These files
are located in the load_directory/basic. Two sub-directories are available in basic :
METRIC and INCHES. If you want to have your basic file in Metric format, login as root
and copy all the files located inload_point/basic/METRIC into load_point/basic.
FAQ #3
How to work in dual Units ?
To create a “dual unit” post-processor, you need to give an answer to Question 71 in
General Description / General information Section.
All the questions related to maximum values, sizes ... will be asked in the main unit.
If there is no UNITS / .... statement in the CL file, the post-processor assumes that the CL
file is in INCHES.
see system variable : $PCONFC and $CONFAC
FAQ #4
How to define the offset distance sign convention for Circular
Interpolation ?
In Control Description / Circular and Helical Interpolation, if you choose Center
method for Question 1.00, the option for the sign of the offset distance (Question 1.30)
will appear if you choose current or incremental for Question 1.20 :
CAM-POST- Pro/NCPOST FAQs
2
FAQ #5
How and where are the post-processors stored?
The post-processor descriptions (answers to the questionnaires and macros) are stored in
the post-processor database : for example campost.dbf or ncpost.dbf. You can access
this database with the Disk Facility option of the main menu.
Post-processors are stored with a name based on the answers to Question 1.00 and 2.00
of General Description / General Information. For example is you want to call your
post-processor FANUC15, FANUC is the name of the post-processor and 15 is the ID
(identification number). This can be used in conjunction with theMACHIN statement in
the CL file : MACHIN / FANUC, 15 to automatically select this post-processor at
execution.
A version number is associated to the post-processor each time you save or generate a
new post-processor . For example, in the database : FANUC15.104;2 {G} FANUC15 is
the name of the post-processor, 104 is the version of CAM-POST used to generate this
post-processor, 2 is the version number and {G} means that the post-processor was
generated.
CAM-POST- Pro/NCPOST FAQs
3
See environment variable icam_lib or proncp_dbf
FAQ #6
How to put a space between each register ?
The format of the tape is defined under General Description / Output Format. To
define a space (ASCII value 32) between each register on a NC block, you need to answer
32 to Question 2.50 :
CAM-POST- Pro/NCPOST FAQs
4
FAQ #7
Why do I have a move after LOADTL / TURRET output ?
Most of the time, this is a move generated by CAM-POST (Pro/NCPOST) to support the
length compensation. If you answer Now to Question 106.00 in Optional Post-processor
Word LOADTL (or TURRET Question 162.00 ) the post-processor is obliged to
create a move to take the compensation immediately after the LOADTL/TURRET. It is
recommended to answer Next to this Question. The option same, means that you want to
use the same default as the answer to Question 127 in the CUTCOM section.
FAQ #8
How to switch to French (or English) language ?
While running the Questionnaire, you can change the language by typing the following
command at the prompt :
!!lang french (or english)
If you want to start the software in one of the supported languages (other than English)
you can define in the configuration file (POS104.DEF or ncpost.pro) the default
language.
FAQ #9
Where do I define Fixture Offset (G54-G59 or E ..) ?
The support of fixture offset is defined in Optional Post-processor Word CUTCOM
with the Question 301.00 :
CAM-POST- Pro/NCPOST FAQs
5
FAQ #10
How to directly generate an MCD file in DOS format on UNIX ?
The difference between DOS and UNIX ASCII files are the End Of Line (EOF)
characters. In the post-processor you can automatically add a special EOF character to
each block with Question 2.20 of General Description / Output Format. The value for
CR (Carriage Return) is 13.
FAQ #11
How can I “square” or “break” my rapid move ?
In the CAM software you are doing simultaneous 3 axes rapid moves and you want to
“break” or “square” (when plunging position first and plunge, when retracting, retract
first and move) them with the post-processor. This can be done by answering No to
CAM-POST- Pro/NCPOST FAQs
6
Question 20 of Control Description / High Speed Positioning. The new questions that
appear allow you to control the way you want to retract or plunge.
FAQ #12
Where do I define Threading codes for a lathe ?
Threading codes can be defined under Optional Post-processor Words / COUPLE
FAQ #13
My 4 axes lathe needs two programs, one for each turret
CAM-POST (Pro/NCPOST) supports different methods of output for a 4 axes lathe.
These methods are defined by Question 32 of General Description / General
Information. To generate two tapes, the correct answer is Program.
CAM-POST- Pro/NCPOST FAQs
7
FAQ #14
Why my feedrate is always changing in 5 axes even if I am using IPM
(or MMPM)?
In 5 axes, the post-processor is recalculating the feedrate to take into account the
rotary(ies) move(s). The feedrate that you program in the CL file is in IPM (or MMPM)
and represents only the linear feedrate. The post-processor is using the following formula
to calculate the new feedrate :
New Feed =
∆X 2 + ∆Y 2 + ∆Z 2 + ∆A 2 + ∆B 2 + ∆C 2
Max ( XYZ tip − XYZ tip old , XYZ top − XYZ top old )
* (programmed Feed )
Where the tip position is the position at the extremity of the tool and the top position is a
position 1 inch from the tip. CAM-POST (Pro/NCPOST) is using this method of distance
at the “tip” and at the “top” to take into account the worst scenario of moves.
CAM-POST- Pro/NCPOST FAQs
8
FAQ #15
How to output the MCD file in incremental mode ?
The CL file generated by the CAM software is always in absolute coordinates. To
generate an MCD file in incremental there are two methods.
•
If you want to output the MCD file always in incremental, answerIncremental to
Question 73.00 of General Description / General Information.
•
If you want to control the incremental mode, you can insert the following APT
command in your CL file (if your machine supports Incremental and Absolute
positioning mode) :
MODE / INCR, ON
to switch in Incremental mode.
MODE / INCR, OFF
to switch in absolute mode.
FAQ #16
Which feedrate type to use for 5 axes ?
Inverse time feedrate should be used for 5 axes. This feedrate is normally activated by a
G93. When using this feedrate, the controller will calculate the appropriate feeds for each
axes (linear and rotary) to synchronize them (they are going to “arrive” at the same time at
the end of the programmed move).
FAQ #17
How is the Inverse Time feedrate calculated?
CAM-POST (Pro/NCPOST) tries to take into account the worst case to calculate the
inverse time feedrate. To do this CAM-POST is using the distance at the tool tip and at 1
inch from the tool tip :
CAM-POST- Pro/NCPOST FAQs
9
1
T Feed =
Pr ogrammed Feed
Max ( XYZ tip − XYZ tip old , XYZ top − XYZ top old )
This feed is recalculated for each move.
FAQ #18
How to support multiple ranges (gears) on the spindle ?
Spindle gears (or ranges) are defined under Optional Post-processor Words / SPINDL
with Question 50. CAM-POST (Pro/NCPOST) supports a maximum of 5 gears, if more
are needed you need to create a User Defined Macro on the word SPINDL.
FAQ #19
How to compact my post-processor database ?
The post-processors are stored in the database which includes an index. When you delete
or purge post-processors, they are remove from the index but not from the database. If
you want to compact the database and remove the unnecessary post-processors (erased
from the index), follow these steps.
1. Start the questionnaire
CAM-POST- Pro/NCPOST FAQs
10
2. Go to Disk Facility and Export all your post-processors using Binary format
in a file called for examplepost.dmp
3. Exit of the questionnaire and rename your old database (campost.dbf or
ncpost.dbf to campost.old or ncpost.old)
4. Restart the Questionnaire and go to Disk Facility. The Questionnaire will
format a new database. When this is done you can Import the post-processors
from the file post.dmp
Your new database is now compacted and contains only the post-processors defined in the
index. You can now go to delete the old database (campost.old or ncpost.old).
FAQ #20
I have reached the limit of 99 version numbers for my post-processor,
what can I do ?
Each time you generate or save a post-processor, a new version is created. For example
flor01.104;99 is the 99th version of the post-processor flor01. CAM-POST limits the
number of versions to 99 and if you try to save or generate a new post-processor an error
message is generated.
CAM-POST- Pro/NCPOST FAQs
11
To solve the problem, Read the post-processor in memory, Delete all the versions of the
post-processor in the database and when prompted for a post-processor name during
Generate Final Data for the post-processor in memory, answer postname.version;1 (for
example flor01.104;1 for CAM-POST or flor01.160;1 for Pro/NCPOST).
FAQ #21
Standard G codes ?
The ISO standard 1056 defines the following G codes
CAM-POST- Pro/NCPOST FAQs
12
G Code
Function
G00
Rapid Positionning
G01
Linear Interpolation
G02
Circular Interpolation Arc CW
G03
Circular Interpolation Arc CCW
G04
Dwell
G05
Unassigned
G06
Parabolic Interpolation
G07
Unassigned
G08
Acceleration
G09
Deceleration
G10
Unassigned
G11
Unassigned
G12
Unassigned
G13 to G16
Unassigned
G17
XY Plane Selection
G18
ZX Plane Selection
G19
YZ Plane Selection
G20
Imperial Programming
G21
Metric Programming
G22
Unassigned
G23
Unassigned
G24
Unassigned
G25 to G27
Permanently Unassigned
G28
Return Home position
G29
Unassigned
G30
Unassigned
G31
Unassigned
CAM-POST- Pro/NCPOST FAQs
13
G32
Unassigned
G33
Thread Cutting, Constant Lead
G34
Thread Cutting. Increasing Lead
G35
Thread Cutting, Decreasing Lead
G36 to G39
Permanently Unassigned
G40
Cutter Compensation/Tool Offset Cancel
G41
Cutter Compensation - Left
G42
Cutter Compensation - Right
G43
Tool Offset Positive
G44
Tool Offset Negative
G45
Tool Offset
G46
Tool Offset
G47
Tool Offset
G48
Tool Offset
G49
Tool Offset
G50
Tool Offset
G51
Tool Offset
G52
Tool Offset
G53
Linear Shift Cancel
G54
Linear Shift
G55
Linear Shift
G56
Linear Shift
G57
Linear Shift
G58
Linear Shift
G59
Linear Shift
G60
Positioning Exact (Fine)
G61
Positioning Exact (Medium)
G62
Positioning Fast (Coarse)
CAM-POST- Pro/NCPOST FAQs
14
G63
Tapping
G64
Unassigned
G65 to G67
Unassigned
G68
Tool Offset Inside Corner
G69
Tool Offset Outside Corner
G70
Imperial Programming
G71
Metric Programming
G72 to G79
Unassigned
G80
Fixed Cycle Cancel
G81 to G89
Fixed Cycle
G90
Absolute Dimension
G91
Incremental Dimension
G92
Preload Registers
G93
Inverse Time, Feed Rate
G94
Feed per Minute
G95
Feed per Spindle Revolution
G96
Constant Surface Speed
G97
Revolutions per Minute (Spindle)
G98 to G99
Unassigned
Unassigned means that the ISO has no standard function for the G code. Control
manufacturer can choose what they want. For example G98 and G99 are used by
FANUC to control the Return Plane at the end of a CYCLE.
FAQ #22
Standard M codes ?
The ISO standard 1056 defines the following M codes
M Code
CAM-POST- Pro/NCPOST FAQs
Function
15
M00
Program Stop
M01
Optional (Planned) Stop
M02
End of Program
M03
Spindle CVV
M04
Spindle CCW
M05
Spindle OFF
M06
Tool Change
M07
Coolant No. 2 ON
M08
Coolant No. 1 ON
M09
Coolant OFF
M10
Clamp
M11
Unclamp
M12
Unassigned
M13
Spindle CW and Coolant ON
M14
Spindle CCW and Coolant ON
M15
Motion +
M16
Motion -
M17 to M18
Unassigned
M19
Oriented Spindle Stop
M20 to M29
Permanently Unassigned
M30
End of Tape
M31
Interlock Bypass
M32 to M35
Unassigned
M36
Feed Range I
M37
Feed Range 2
M38
Spindle Speed Range 1
M39
Spindle Speed Range 2
M40 to M45
Gear Changes if used; otherwise unassigned
M46 and M47
Unassigned
CAM-POST- Pro/NCPOST FAQs
16
M48
Cancel M49
M49
Bypass Override
M50
Coolant No 3 ON
M51
Coolant No 4 ON
M52 to M54
Unassigned
M55
Linear Tool Shift Position 1
M56
Linear Tool Shift, Position 2
M57 to M59
Unassigned
M60
Workpiece Change
M61
Linear Workpiece Shift, Position 1
M62
Linear Workpiece Shift, Position 2
M63 to M67
Unassigned
M68
Unassigned
M69
Unassigned
M70
Unassigned
M71
Angular Workpicce Shift, Position 1
M72
Angular Workpiece Shift, Position 2
M73 to M77
Unassigned
M78
Unassigned
M79
Unassigned
M80 to M89
Unassigned
M90 to M99
Permanently Unassigned
Unassigned means that the ISO has no standard function for the M code. Control
manufacturer can choose what they want. For example M12 can be the code to
open the door of a Turning Center.
FAQ #23
How to modify the severity of the error messages ?
To modify the severity of the error message, there are two solutions :
CAM-POST- Pro/NCPOST FAQs
17
•
If you want to modify the severity of an error message for a given post-processor,
you can use PPFUN/15 in your startup macro :
PPFUN / 15, error_number, new_severity
The error_number and the severity of the error message can be found in the listing
file (*.lst). For example :
Error:
LOADTL: Tool number given exceeds the maximum allowed
for this register. Statement ignored.
SEVERITY(08) ISN(00139) CLREC(00276) ERRNUM(01329002)
The error number is 1329002 and the severity is 8 (Error). If you want this Error
to be a Warning you must insert the following line in your Machine Startup Macro
:
PPFUN/15,1329002,4
•
If you want to modify the severity of an error message for all the post-processors,
you must edit the error file located in the load_point of CAM-POST (or
Pro/NCPOST). The error file is pos104.err or ncp160.err . The file looks like :
\ 01329001 8
Tool number given is less than minimum allowed
for this register. Statement ignored.
\ 01329002 8
Tool number given exceeds the maximum allowed
for this register.Statement ignored.
\ 01329003 8
Tool ID specified is less than minimum allowed
for this machine.Statement ignored.
\ 01329004 8
Tool ID specified is greater than maximum
allowed for this machine. Statement ignored.
You can directly modify the Severity in the collun 3 of the
file. When this is done, you need to compile the error file with
blderr to create pos104.dat or ncp160.dat.
FAQ #24
How to remove an APT command from the CL file ?
To completely remove an APT command from the CL file, you need to do a User Defined
Macro with a parameter $P1* for the definition line.
For example to remove all the coolant command :
COOLNT/$P1*
$$ nothing in the macro
$$ End of macro
TERMAC
CAM-POST- Pro/NCPOST FAQs
18
FAQ #25
How to remove the “/” from the string of a PPRINT command ?
You need to write a User Defined Macro on the word PPRINT :
PPRINT/$P1’’
$$ remove everything before /
DECLAR/LOCAL,REAL,FPOS
$$ Find position of / in the string
FPOS=$FINDEX($P1,’/’)
DECLAR/LOCAL,STRING,NSTRG
$$ extract everything after the /
NSTRG=$FSUBST($P1,FPOS+1,$FLEN($P1))
$$ process new pprint
PPRINT/NSTRG
$$ end of macro
TERMAC
FAQ #26
How to display the name of the tool in the MCD file (tape file) ?
In the case of Pro/MANUFACTURING, the name of the tool is output with a PPRINT
command :
PPRINT / TOOL_NAME : this_is_the_name_of _the_tool
If you want to ouput the name of the tool as a message to the operator you need to make
a User Defined Macro on the word PPRINT :
PPRINT/$P1’’
$$ check if TOOL_NAME is in the string
IF/$FINDEX($P1,’TOOL_NAME’).NE.0
$$ Display the tool name
$$ DISPLY is an operator message
DISPLY/$P1
ENDOF/IF
$$ Process PPRINT
OUTPUT
$$ End of macro
TERMAC
FAQ #27
How to prompt the user for an integer value during the execution of
the post-processor ?
To prompt the user for an integer value in a macro, you can use the following sequence :
CAM-POST- Pro/NCPOST FAQs
19
$$ Open the screen (STDIN)
OPEN/23,’STDIN’
$$ Write the Question
WRITE/23,’Input the value :’
$$ Declare the variable to store the value
DECLAR/LOCAL,REAL,ANSWER
$$ Read the answer from the screen
$$ with an integer of maximum 4 digits
READ/23,’!(s4)’,ANSWER
$$ Close the screen
CLOSE/23
The result in verbose mode is :
FAQ #28
How to insert the CL file name in upper case at the beginning of the
tape (MCD File) ?
To insert the name of the CL file at the beginning of the tape, you need to create a
Machine Startup Macro :
$$ MACHINE STARTUP MACRO
DECLAR/GLOBAL,STRING,PRNAME
PRNAME=’’
$$ Strip path from CL file name (system var : $CLNAME)
FLAG=0
DO/I=1,$FLEN($CLNAME)
IF/$FSUBST($CLNAME,I,I).EQ.’/’
CAM-POST- Pro/NCPOST FAQs
20
NAME=$FSUBST($CLNAME,I+1,$FLEN($CLNAME))
FLAG=1
ENDOF/IF
ENDOF/DO
IF/FLAG.EQ.0
NAME=$CLNAME
ENDOF/IF
$$ Strip extension from CL file name
DO/I=1,$FLEN(NAME)
IF/$FSUBST(NAME,I,I).EQ.’.’
STRP=$FSUBST(NAME,1,I-1)
ENDOF/IF
ENDOF/DO
$$ Cast to uppercase:
DO/I=1,$FLEN(STRP)
CAST=$FICHAR($FSUBST(STRP,I,I))
IF/CAST.GE.97.AND.CAST.LE.122
CAST=CAST-32
ENDOF/IF
PRNAME=PRNAME//$FCHAR(CAST)
ENDOF/DO
PRNAME=$FSUBST(PRNAME,2,$FLEN(PRNAME))
$$ Insert CL file name:
SEQNO/OFF
INSERT/’%(!(A))’,PRNAME
SEQNO/ON
FAQ #29
How to put the text of all PPRINT commands in upper case ?
To modify the text of a PPRINT and put it in upper case, you need to create a User
Defined Macro on the word PPRINT :
PPRINT/$P1’’
DECLAR/LOCAL,STRING,UPSTRG,CAST
UPSTRG=’’
DO/I=1,$FLEN($P1)
$$ extract character by character
CAST=$FICHAR($FSUBST(STRP,I,I))
$$ Check if upper case ?
IF/CAST.GE.97.AND.CAST.LE.122
CAST=CAST-32
ENDOF/IF
$$ Add the character to the new string.
UPSTRG=UPSTRG//$FCHAR(CAST)
ENDOF/DO
CAM-POST- Pro/NCPOST FAQs
21
FAQ #30
How to insert special code at the end of my MCD file ?
If you want to insert something at the end of your NC program you need to create a
Machine Shutdown Macro.
A typical Machine shutdown macro is :
$$ Machine Shutdown macro
$$ Stop the coolant if it is still ON
$$ $COOLNT system variable (status of coolant)
IF/$COOLNT.NE.OFF
$$ Stop the coolant
COOLNT/OFF
ENDOF/IF
$$ Retract to home position in RAPID
RAPID
GOHOME
$$ Stop the spindle in needed
$$ $S system variable (current spindle speed)
IF/$S.NE.0
SPINDL/OFF
ENDOF/IF
$$ Reload the first tool
$$ $TLTAB system variable
LOADTL/$TLTAB(1,2)
$$ Message to operator
DISPLY/’OPERATOR CHANGE PALLET’
$$ Rewind Tape
REWIND/1
$$ Insert a special character
$$ character ASCII 4 (EOT)
$$ (needed for example for MAHO)
$$ Stop sequence numbering
SEQNO/OFF
$$ Insert ASCII 4
INSERT/’^’,4
$$ End of macro
CAM-POST- Pro/NCPOST FAQs
22
TERMAC
FAQ #31
How to choose a text editor to edit my macros ?
To select a text editor for macro you must edit the configuration file of CAM-POST
(POS104.DEF) or Pro/NCPOST (ncpost.pro) and look for let editor =
#
#
#
#
#
#
#
#
#
#
#
#
let x = 5
let y = 5
end
External editor and filename used by Quest macro editor
let editor = "vi macro.mac"
let editorfile = "macro.mac"
Option to control spawning commands to system. Set to on, off
or a command to always execute
let sysaccess = on
# on, off, ’command’
Uncomment the two lines let editor = and let editorfile = and choose your text editor.
For example on Windows NT and Windows 95 platforms :
let editor = “notepad.exe macro.mac”
For unix, if you want to “pop-up” a window using vi text editor :
let editor = “xterm -e vi macro.mac”
The same window with a larger font (for more information on the UNIX xterm command,
refer to your UNIX manual) :
let editor = “xterm -fn “10x20” -e vi macro.mac
You can also use specialized editor, like for example for SGI :
let editor = “jot -f macro.mac”
For SUN :
let editor = “textedit macro.mac”
For Hewlett Packard :
let editor = “viewpad macro.mac”
Etc ... the general syntax is :
let editor = “command_to_start_your_editor macro.mac”
CAM-POST- Pro/NCPOST FAQs
23
FAQ #32
How to use the same macro in all my post-processors ?
There are two solutions :
•
Put the macro in all your post-processors. When you have written the macro in
the first post-processor you can use the Dump Macro to File option.
In all the other post-processors, use the option Load Macro from File.
A Better solution is to use Run-Time macros. Run-Time macros are macros which
are shared by all the post-processors. They are located in the external file loaded at
run-time. You can define in the configuration file which run-time macro to load :
#
#
#
#
#
#
#
Default pre-compiled "before" and "after" macros. These
macros will be loaded into Gener at run time and placed
around any macros defined in the specific post processor.
These macros can be overridden on the command line. Macros
must be compiled using the -c option of Quest.
let mbdef = "$PRODIRECTORY/$MC/ptc.obj"
let madef = " "
“let mbdef =“ defines which run-time macro to load. To create the macro file, you
need to write all the macros that you want to share in a file, separated by
ENDMAC. When this is done, compile the file using the command linequest -c
(CAM-POST) or propostq -c (Pro/NCPOST) to create the object file. A good
example of this Run-time macros is the interface kit for Pro/ENGINEER :ptc.mac
and ptc.obj located in the load_directory.
CAM-POST- Pro/NCPOST FAQs
24
FAQ #33
How to read the tool length from an external file during the execution
of the post-processor ?
You are doing tool pre-setup and you want the post-processor to take into account the
length of the tool for LINTOL calculation in 5 axis. The tool length are stored in a file
called tooldata.txt with the following format :
tool
1
2
3
length
123.45
234.56
345.67
To read the data from this file, you need to create a User Defined Macro on LOADTL :
LOADTL /$P1,$P2*
$$ $P1 is the tool number
$$ open the tool database
OPEN/24,’tooldata.txt’
$$ declare a variable to detect if the tool was found
DECLAR/LOCAL,LOGICAL,OKTOOL
OKTOOL=$FALSE
$$ Declare variable to read in the file
DECLAR/LOCAL,REAL,TOOLID,TOOLEN
$$ Loop in the database to find the tool
WHILE/.NOT.$FEOF(24)
$$ Read the next record in the file
READ/23,’!(s2)
!(s3.4s)’,TOOLID,TOOLEN
$$ test if it is the right tool
IF/TOOLID.EQ,$P1
$$ this is the good tool
OKTOOL=$TRUE
$$ Exit the loop
EXIT/1
ENDOF/IF
ENDOF/WHILE
$$ close the file
CLOSE/24
$$ test if the length was found
IF/OKTOOL.EQ.$TRUE
$$ process with length
LOADTL/$P1,$P2,LENGTH,$P3
ELSE
LOADTL/$P1,$P2
ENDOF/IF
$$ end of macro
TERMAC
CAM-POST- Pro/NCPOST FAQs
25
FAQ #34
How to create the list of all the tools at the begining of the CL file ?
Some machines like Deckel and Heidenhain needs to have the list of all the tool and for
example their feedrate and spindle speed at the begining of the program; like this if the
operator wants to change the feedrate for a tool, he just needs to go to the begining of the
tape. To create a list which looks like :
G99 T1 D1 L10 S2000 F120
G99 T2 D12 L12.5 S1500 F50
You need to create a Machine Startup Macro :
$$ Machine startup macro
$$ Declare some variables
DECLAR/LOCAL,REAL,TOOLID,TOOLOF,TOOLEN,TOOLSP,TOOLF
$$ Start look-ahead in the CL file
WHILE/.NOT.$FEOF()
$$ Read next CL record
TAPERD
$$ Test if it is a LOADTL (class 2000, subclass 1055)
IF/$FLCASS().EQ.2000.AND.$FSUBCL().EQ.1055
$$ first argument is tool number
TOOLID=$FCL(1)
$$ Check if OSETNO defined
IF/$FCL(2).EQ.OSETNO
TOOLOF=$FLC(3)
$$ Check if LENGTH defined
IF/$FLC(4).EQ.LENGTH
TOOLEN=$FLC(5)
ELSE
TOOLEN=0
ENDOF/IF
ELSE
TOOLOF=0
$$ check if tool LENGTH defined
IF/$FLC(2).EQ.LENGTH
TOOLEN=$FLC(3)
ELSE
TOOLEN=0
ENDOF/IF
ENDOF/IF
ENDOF/IF
$$ Test for SPINDLE
IF/$FCLASS().EQ.2000.AND.$FSUBCL().EQ.1031
$$ second argument is spindle speed
TOOLSP=$FCL(2)
ENDOF/IF
$$ Test for feedrate first FEDRAT statement after
LOADTL
IF/$FCLASS().EQ.2000.AND.$FSUBCL().EQ.1009
CAM-POST- Pro/NCPOST FAQs
26
TOOLF=$FCL(1)
$$ Print the result in the tape file
INSERT/’G99T!(s2)D!(s2)L!(s3.2s)S!(s4)F!(s3.1s)‘,$
TOOLID,TOOLOF,TOOLEN,TOOLSP,TOOLF
ENDOF/IF
ENDOF/WHILE
$$ go back to begining of CL file
SEARCH/1
TAPERD
$$ End of macro
TERMAC
$$ Begining of normal process !
FAQ #35
How to print the total machining file at the beginning of the tape ?
If you want to know the machining time at the beginning of the tape, the only solution is
to process twice the tape, one time without any output and the second time with the
normal output. To do this you need to create a Machine Startup Macro :
$$ Machine Startup Macro
$$ Desable output of all registers
PPFUN/8,ALL,OFF
$$ desable output of error message (except FATAL)
PPFUN/1,16
$$ loop in the CL file
WHILE/.NOT.$FEOF()
$$ Read next CL record
TAPERD
$$ Process next CL record
TAPEWT
ENDOF/WHILE
$$ The machining time is stored in 3 variables
$$ RAPTIM, $FEDTIM, $MISTIM
$$ Re-enable the registers
PPFUN/8,ALL,ON
$$ re-enable Error message
PPFUN/1,1
$$ go back beginning of CL
SEARCH/1
TAPERD
$$ output the time in a message
INSERT/’TOTAL MACHINING TIME : !(s5) sec.’, $
$RAPTIM+$MISTIM+$FEDTIM
$$ End of macro
TERMAC
CAM-POST- Pro/NCPOST FAQs
27
FAQ #36
How to define a right angle Head on a VMC machine ?
This technique can be used for any type of head. When you have a machine which has
multiple head types, you need to define a HOLDER in CAM-POST (Pro/NCPOST). This
can be done in Optional Post-processor Word LOADTL :
When you have defined that the machine supportsHolder, you must define the geometry
of the holder using a TOOLNO statement. To load the Holder a simple LOADTL can be
used :
LOADTL / HOLDER, holder_number
For example to define the geometry of a right angle head (Holder #1), put the following
statement in the Machine Startup Macro :
TOOLNO/HOLDER, 1, SETOOL, dim1, 0, dim2, ATANGL, -90, $
SETANG, 0
For more information, refer to the LOADTL section (Post-processor Vocabulary) in the
CAM-POST (Pro/NCPOST) manual.
CAM-POST- Pro/NCPOST FAQs
28
FAQ #37
How to disable the macro window during CAM-POST (Pro/NCPOST)
execution ?
To control the windows displayed during the verbose execution of CAM-POST or
Pro/NCPOST you need to edit the configuration file POS104.DEF or ncpost.pro :
#
#
#
#
#
#
#
#
Active verbose sub-windows. The verbose window displays different kinds
of data streams during Gener processing. Individual streams can be disabled
by setting the window parameter "off". By default, all windows are active
"on".
let
let
let
let
window_tape_out = on
window_cl_input = on
window_stats = on
window_macro = off
#
#
#
#
on,
on,
on,
on,
off
off
off
off
Uncomment the let window_macro = off line and save the new configuration file. When
running the post-processor, the screen will look like :
CAM-POST- Pro/NCPOST FAQs
29
FAQ #38
My computer is very fast, and I have no time to stop the verbose mode
to go step by step. What can I do ?
You can start the verbose mode in Step mode by modifying the configuration file
POS104.DEF or ncpost.pro :
#
#
#
#
Verbose window startup mode. Specify "step" to start the verbose window
in step mode. Specify "regular" (the default) to begin executing Gener
immediately without pausing.
let verbose_start = step
# step, regularc
Uncomment the let verbose_start = step and save your new configuration file.
FAQ #39
block?
How do I repeat the previous X and Y coordinates in the first CYCLE
If the first GOTO point after a cycle command is at the same X and Y coordinates as the
point preceding the CYCLE statement, they will not be repeated in the CYCLE block. To
instruct CAM-POST (Pro/NCPOST) to force out the redundant X and Y coordinates, you
can write a CYCLE startup macro. For example:
$$ CYCLE startup macro
$$ $P5 is true when cycle is being activated
IF/$P5
PPFUN/7,’X’,$XM,’Y’,$YM
ENDOF/IF
FAQ #40
How do I pre-select the first tool after the last tool change?
If you wish to pre-select the first tool after the last tool has been loaded, you can write a
LOADTL shutdown macro to accomplish this. For example:
$$ LOADTL shutdown macro
$$ $NT will be zero if no LOADTL follows
IF/$NT.EQ.0
PPFUN/7,’T’,$TLTAB(1,2)
ENDOF/IF
FAQ #41
change?
How do I get CAM-POST to output X-Y first, then Z after a tool
Even though I stated that I wanted to "break" the moves (see FAQ #11), the first move
after a tool change usually moves Z first, then X-Y. This is not correct because the tool is
way up at the tool change point. The reason for this is that CAM-POST does not know
that the tool is up. It assumes the tool is at the previous location, or at 0,0,0 at start of
program. To accomplish this, a LOADTL macro can be written as follows:
CAM-POST- Pro/NCPOST FAQs
30
LOADTL/$P1*
$$ Turn off all output
PPFUN/8,ALL,OFF
$$ Create a dummy move to near the next point
GOTO/$NXM+.1,$NYM+.1,$NZM+.1
$$ Turn output back on
PPFUN/8,ALL,ON
$$ Output the LOADTL command
OUTPUT
TERMAC
CAM-POST- Pro/NCPOST FAQs
31