Router-CIM Automation Suite

rcim_2024_header


rcim_2024_header


Previous topic Next topic  

rcim_2024_header


Previous topic Next topic  

Reserved Words

The postprocessor contains many hard coded keywords that usually are not changed.  These words are referenced by the program and have specific behavior which is described in this section.

$ARC1.1

$LINE1.1

$POINT1.1

$TEXT1.1

These keywords are used to indicate geometry definitions in the $PP file.  The 1 left of the '.' stands for group 1, the 1 to the right of the '.' indicates the first line to be output to the NC file.  Used in conjunction with text statements and the ;G switch, this allows for different types of output for geometry.  See the section on group definitions for more information.

There may be more than one of each of these depending on the output necessary when each of these groups are called.  For instance there may be a $ARC1.1 and a $ARC2.1 depending on the behavior necessary for the machine.

$BLANKLINES
This is a post entry that allows for blank lines to be produced. Normally, all blank lines are suppressed by the postprocessor.

Example:

=$BLANKLINES

Will allow the post to output blank lines.

$COMMASON
;; =$COMMASON

Normally the postprocessor will remove commas from text statements as per the APT standard.

Example:

CYCLE1/10.0,R3,P7

would generate G88X10.R3P7 in the NC file.

However, some machine tools need commas in the NC file to separate parameters.

Example:

=$COMMASON

CYCLE1/10.0,R3,P7

would generate G88X10.,R3,P7 in the NC file.

$FIRSTINDEXOFF
;; =$FIRSTINDEXOFF

This line (which is commented out in GENERIC) controls the generation of the first index line.  This is a line which is developed from the machine tool home position (usually 0,0,0) to the startpoint of the first geometric element.

Example:

=$FIRSTINDEXOFF

Would suppress the generation of the first index line.

$HEADER.1
This is a word in the $PP file that indicates a code to be processed on startup of CPOSTII.  This code will NOT generate NC code, it is specifically designed to establish the default state of the machine tool.  The '1' following the word is used to indicate multiple header codes.  The software will process $HEADER.1, $HEADER.2, and so on.

$MATCHTOL
0.0001=$MATCHTOL

This keyword controls the index line match tolerance between geometric entities.  If two consecutive entities are greater than 0.0001 unit apart, an index line will be developed.  Note that this constant also applies to index line development during validation.

$OUTTOL
8=$OUTTOL

This line sets the default resolution used during post processing and computation of block transforms to eight decimal places.  In order to obtain higher accuracy this value can be set as high as 16 decimal places, but at the expense of slower operation.

ABS/INCR
ABS=$HEADER.3

These keywords are used to switch the output mode of the postprocessor to absolute or incremental.  In a $HEADER line these keywords establish the default state of the machine tool (i.e. GENERIC assumes the machine is in absolute mode when powered on).

Example:

INCR=$HEADER.3

Would cause the postprocessor to startup in incremental mode.

These keywords can also be entered into the AutoCAD drawing as text statements to allow switching between incremental and absolute mode during a NC program.

ARCDROP
This represents the number of the lines to drop if an arc is equal to 90 degrees.  It can be used on multi-line arc definitions to drop the remainder of the definition.

Example:

SEQNO#XC#YC... =$ARC1.1

SEQNO#SWEEP#... =$ARC1.2

SEQNO#X#... =$ARC1.3

;I#2=ARCDROP

Will drop the $ARC1.2 and $ARC1.3 from the output if the arc is equal to 90 degrees.

ARCTOLINE
This is the smallest arc (chordal) that can be represented by the machine tool.  If the delta X or the delta Y from the start point to the end point of the arc is less than this value, the arc is converted to a straight line.

Example:

;I#0.001=ARCTOLINE

Will turn all arcs whose delta X or delta Y is less than 0.001 into lines.

ARCTOLINE is for quadrant arc posts only

ARCTOLINE looks for a change in X Y and Z with any 2 being identical the ARC will be turned into a line.

 

If you use this in a regular non-quadrant arc post:

 

In this example geoshape create this object as 3 arcs.

In this case the Y and Z components DID NOT change so it was turned into a line.

 

Had Quad Arc kicked in we would not have this exact match in Y and Z so the arc would have been put out.

 

Arctoline_Example

 

ARCTOLINE should be in EVERY quad arc post.

 

The logic behind Arctoline:

 

      /* $NOTE$ - the logic for ARCTOLINE depends upon quadrant arcs! */

              if ((tol = ppgetf(_T("ARCTOLINE"))) > 0.0) {

                    if (scaleon) tol *= fabs(scalef[0]);

                     k = 0;

                     xc2d = fabs(endx - x);

                     yc2d = fabs(endy - y);

                     zc2d = fabs(endz - z);

                    if (xc2d >= tol) ++k;

                    if (yc2d >= tol) ++k;

                    if (zc2d >= tol) ++k;

                    if (k < 1) goto CONT;  /* all dropped out */

                    if (k < 2) {

                           ppoutlin(f, loc_cur, loc_ppmode, loc_cur[3], loc_cur[4], loc_cur[5], endx, endy, endz);

                          goto CONT;

                     }

              }

 

 

if (dir == -1) {    /* $M$ 980729 CArps moved this AFTER ARCTOLINE*/

                     ppputf(_T("DIR0"), 0.0);

                     ppputf(_T("DIR1"), -1.0);

                    if (lookup(_T("CIRCUL/CLW")) != NULL) {

                           pform(temps, _T("CIRCUL/CLW"), 0.0);

                     }

              }

              else if (dir == 1) {

                     ppputf(_T("DIR0"), 1.0);

                     ppputf(_T("DIR1"), 1.0);

                    if (lookup(_T("CIRCUL/CCLW")) != NULL) {

                           pform(temps, _T("CIRCUL/CCLW"), 0.0);

                     }

              }

 

BEGIN
%=BEGIN

This line defines the string to be output at the beginning of the NC file.  This string typically defines the start of a program to the machine tool controller.

CIRCINT
If not 0, circular interpolation is turned on and all arcs are converted to straight line segments.

Example:

CIRCINT/1.0

Or

;I#1.0=CIRCINT

Will turn on interpolation for all arcs.

CIRCLEN
This is related to arc interpolation.  If the arc length is greater than this value, circular interpolation is turned on for this arc only.

Example:

;I#99.999=CIRCLEN

Will turn on arc interpolation for any arc whose arc length greater than 99.999.

CIRCUL/CLW and CIRCUL/CCLW
These keywords are reserved because they are automatically executed when an arc is processed.  If a clockwise arc is processed by the postprocessor, "CIRCUL/CLW" definition in the $PP file will be evaluated.  If a counterclockwise arc is processed, the "CIRCUL/CCLW" definition will be evaluated.  This results in all switches being processed and allows disable/enable of codes depending on arc direction.  It also allows the ;G switch which allows totally different group definitions that automatically switch based on arc direction.

CIRCRAD
This is related to arc interpolation.  If the arc radius is greater than this value, circular interpolation is turned on for this arc only.

Example:

;I#9.999=CIRCRAD

Will turn on arc interpolation for any arc whose radius is greater than 9.999.

END
%=END

This line defines the string to be output at the end of the NC file.  This string typically defines the end of a program to the machine tool controller.

EOB
^013^010=EOB

When the .NC file is converted to the .OUT file, this line determines what the '$' character at the end of each line will be translated to.  The default in GENERIC is to output a carriage-return line-feed at the end of each block of NC code.

Example:

$=EOB

Would cause all lines or blocks of NC code to be separated only by the '$' character in the .OUT file.  No carriage-returns or line-feeds would be present in the .OUT file.

ERRORC
This is a post entry that will turn on error correction for incremental machines.  The error is accumulated and added to the next linear motion.  If set to 1, only lines are error corrected.  If set to 2, both lines and arcs are error corrected.

Example:

;I#2=ERRORC

Will turn on error correction for both lines and arcs.

FIRST
;; =FIRST

This line defines the string to be output at the beginning of the .OUT or final output file.  This is only used when there is a non-printable string needed at the start of a program.

Example:

^007=FIRST

Would place an ASCII 7 or control-G at the start of the .OUT file.

FLUSH
When this text statement is processed by the postprocessor, all pending text statements that are in buffers will be flushed out to the NC file.  This is accomplished by the post executing the $TEXT definition.  Normally text statements are flushed out on geometry, but sometimes it is easier to collect text statements and then FLUSH them out.

FORMAT
ASCII=FORMAT

This line controls the output mode of the postprocessor.  GENERIC is set up to output ASCII code to the final output file (the .OUT file).

Example:

EIA=FORMAT

Would cause the postprocessor to generate EIA code to the final output file.  Note that the .NC file is still ASCII and can be hand edited and then converted to EIA using menu selection 2 of the CPOSTII main menu.

$HELIX
A 3d polyline on layer NC_HELIX will be considered a helix if the $PP entry $HELIX is set.

Example:

=$HELIX

Will generate code for a helix if a polyline is on layer NC_HELIX. The start and endpoint are the same as the polyline.  The radius and direction are computed from the polyline.

HELIXD
Example:

=HELIXD

Will generate for a helix with the resulting output change in degrees per unit.

HOME
HOME/0.0,0.0,0.0=$HEADER.2

The postprocessor needs to know where the machine tool is positioned at the start of the program.  This line initializes the machine tool position at startup to X0.0Y0.0Z0.0.

Example:

HOME/-20.0,-19.0,10.0=$HEADER.2

Would set the postprocessor so that the initial position of the machine tool is at X-20.0Y-10.0Z10.0.

INDEXGROUP
This is the group number that will be switched to when a line on a layer named NC_INDEX is processed.  The lines layer only need start with NC_INDEX to be counted as an index line.  NC_INDEX_FR,NC_INDEX,NC_INDEX_TO are all valid index layer names.

Example:

;I#4=INDEXGROUP

Will cause the postprocessor to switch to group number 4 when an index line is encountered.  The post will then switch back to the previous group after the line is processed.

INTOL
This is the value used to compute the arc deviation for arc interpolation.  The smaller the value, the more line segments and accuracy is obtained.

Example:

;I#0.001=INTOL (good for inch machines)

;I#0.01=INTOL (good for metric machines)

JOBID
:=JOBID

This keyword will result in a line of NC code at the top of the program with a job identification number.  If this line is present in the $PP, the postprocessor will output a JOBID typically with a number following the characters specified in this line.

LAST
;; =LAST

This line defines the string to be output at the end of the .OUT or final output file.  This is only used when there is a non-printable string needed at the end of a program.

Example:

^007=LAST

Would place an ASCII 7 or control-G at the end of the .OUT file.

LINEAR/RAPID
RAPID=$HEADER.4

This line represents the default state of the machine tool in terms of cutting verses non-cutting motion.  GENERIC assumes that the machine tool is in non-cutting or RAPID mode.  You should note that when this code is evaluated at startup, it disables the LINEAR code with the ;D switch.

Example:

LINEAR=$HEADER.4

Would cause the post to assume that the machine tool starts up in cut or LINEAR mode.

These keywords can be entered as text statements to switch between LINEAR and RAPID mode during an NC program.

METRIC
This keyword will cause the postprocessor to use the secondary or metric formats on all quantities.

ORIGIN
ORIGIN/0.0,0.0,0.0=$HEADER.1

This is the first code to be executed in GENERIC.$PP and sets the origin of coordinates.  These three values are subtracted from each X,Y, and Z value when it is output to the NC file.

Example:

ORIGIN/-40.0,-30.0,0.0=$HEADER.1

Would result in 40 being added to each X value and 30 added to each Y value on output to the NC file.

POFF
This is a post entry that defines an offset for coordinate output.  This offset is in addition to the OFFSET $PP entry.

Example:

ORIGIN/1,1,0

POFF/2,2,0

Will result in a net offset for coordinate output of 3,3,0.

SEQINC
This word specifies the increment amount that SEQNO is increased by.  The default in GENERIC is 1, but can be anything.

Example:

;I#10=SEQINC

Would set sequence numbers to increment by 10.

SEQNO
This keyword is used to indicate an incrementing variable used to generate sequence numbers.  Note that sequences numbers can be reset by a text statement in the drawing.

Example:

"SEQNO/1000" (text statement in a drawing)

Would set the current sequence number to 1000.

ZAXIS/Z
These keywords are identical and provide a way for the user to enter Z coordinate values with text statements.  If the current mode of the postprocessor is absolute, then all Z text is considered to be absolute Z values.  However, if the post is in incremental mode, then all Z values entered via text statements will be considered relative or incremental values.