Word Address Formats: Mill, Lathe, EDM

This is a series of lines that each start with a specific character, usually a letter, followed by some numbers and signs. It is a list of all the characters that the NC machine needs, in the order they appear on any line of NC code. You can add, change, and delete lines so that they are arranged in the order appearing in a line of NC code. The examples below indicate the Word Address format and the output order.

These examples show a portion of the Word Address and Tool Change code with the corresponding NC code that is output.

% 00

O>4

X ->3.>4

Y ->3.>4

Z ->3.>4

F >2

G >2

S >4

M >2

ToolChange

M6 T[tool]

G0 G90 S[speed] M3 X[h] Y[v]

Z[h] G1 F[plunge]

End

The NC code for this POSTFORM.M excerpts is shown below. The letter output is determined by the order of the Word Address Formats.

M6 T2

X1. Y2.5 G0 G90 S2000 M3

Z.1 F3.5 G1

The next example uses the same Tool Change sequence with the Word Address Format order changed. The example indicates the NC code output change as it is effected by the POSTFORM.M change.

% 00

O>4

G >2

S >4

M >2

X ->3.>4

Y ->3.>4

Z ->3.>4

F >2

ToolChange

M6 T[tool]

G0 G90 S[speed] M3 X[h] Y[v]

Z[h] G1 F[plunge]

End

The NC code for this POSTFORM.M excerpt is shown below. The letter output is determined by the order of the Word Address Formats.

M6 T2

G0 G90 S2000 M3 X1. Y2.5

G1 Z.1 F3.5

The Word Address characters are formatted according to the following information.

These entries are valid for all SURFCAM post processors.

/ 00

The 00 indicates that the character is output without numbers. This is normally used for the block skip character as shown.

N >4

This outputs the letter N with up to 4 numerals. There is no minus sign or decimal point output.

X ->3.>4

This format outputs the X address character with up to 3 numerals to the left and 4 numerals to the right of the decimal point. The decimal point is output. The minus sign is output when applicable.

F >32

The F character is output with up to 3 numerals to the left and 2 numerals to the right of the decimal point. The decimal point and the minus sign are not output. This format will output trailing zeroes, for example, the code F200 is output for an F-2.0 value.

G 2

The G character is always output with 2 numerals. Leading zeroes are output for single digit numbers. The code G02 is output for a value of 2.

R +->24

The R address is output with a plus sign unless it is a minus value. The output has 2 numerals to the left and no less than 4 numerals to the right of the decimal point. The decimal point is not output. Trailing zeroes are output to fill the 4 numerals to the right of the decimal. The code of R+15000 is output for an R1.5 value.

Columnar style formats:

T C27 S5 >4 T

The T address will appear with the T in column 27; the complete word will occupy 5 spaces (up to 4 of which will hold the actual numerical information).

K C14 S6 >32

The K address starts at column 14 (but NO K is output); it has no minus sign, and occupies 6 spaces (up to 3 of which are before the invisible decimal).

When required by the machine tool, commas can be used instead of decimal points. The MPOSTWIN accepts characters with the ASCII values between 33 (!) and 122 (z).

Details and Examples of Letter Formats:

The maximum possible format is something like this:

? Caa Sb +->c.>d x Limit -40 40 Mult 25.4 Add 2.5 Inc

where “?” is the character (usually a letter) to be formatted, each “n” can be any numeral, and “x” is an optional character.

Caa

The number following the C denotes the column number at which this word starts.

Note   There is a space after the number to separate this information from the next part. (Columnar only)

Sb

The numeral after the S determines how many spaces this word will take in the NC block.

Note   The column number and spaces number are used only for columnar programs. (Columnar only)

+ (plus sign)

This causes the post to output a plus sign on the number if it is not negative. It must be the first formatting character in this line of the POSTFORM file, if used.

X +>3.>4

INC File Value

NC Code Output

2.5

X+2.5

-1.3000

X-1.3

0.2135

X+.2135

When no sign is entered, the value is output without a sign.

X >3.>4

INC File Value

NC Code Output

2.5

X2.5

-1.3000

X1.3

0.2135

X.2135

- (minus sign)

This causes the post to output a minus sign on the number if it is indeed a negative value. It must be the next formatting character if a minus sign is ever to be used for this character address.

X ->3.>4

INC File Value

NC Code Output

2.5

X2.5

-1.3000

X-1.3

0.2135

X.2135

When both the + and - signs are entered the appropriate sign is output with the value.

X +->3.>4

INC File Value

NC Code Output

2.5

X+2.5

-1.3000

X-1.3

0.2135

X+.2135

> (greater than)

This symbol indicates the number of numerals to output for the letter code. When the decimal is placed before this symbol it indicates the number of numerals after the decimal. When it is placed before the decimal it indicates the number of numerals before the decimal. This symbol causes no leading zeroes to be output in the address. When this symbol is not used, the post will add leading zeroes so that the number of digits will always be the number that follows the greater than sign.

X >3.>4

INC File Value

NC Code Output

2.5

X2.5

-1.3000

X1.3

0.2135

X.2135

This Word address without the first > symbol forces the output of leading zeroes.

X 3.>4

INC File Value

NC Code Output

2.5

X002.5

-1.3000

X001.3

0.2135

X000.2135

This Word address without both > symbols forces the output of leading and trailing zeroes.

INC File Value

NC Code Output

2.5

X002.5000

-1.3000

X001.3000

0.2135

X000.2135

X 3.4

c (a numeral)

This is always a single digit that indicates the number of digits available. In this example, it is the number of digits before the decimal point.

If the above > symbol is used, then this is the maximum number of digits that can appear before the decimal point.

If the above > symbol is not used, then this is the number of digits that will always appear before the decimal point.

G >2

INC File Value

NC Code Output

01

G1

00

G0

3

G3

G 2

INC File Value

NC Code Output

01

G01

00

G00

3

G03

. (decimal point)

The presence of the decimal point in the line indicates that the address outputs a decimal point. If this character is not used, it will not be output in the NC code.

X >3.>4

INC File Value

NC Code Output

2.5

X2.5

-1.3000

X1.3

0.2135

X.2135

When the decimal point is not placed in the Word address format, it is not output in the NC code. The following example shows that this may not be suitable code for the machine. When the decimal is not in the Word address the > symbols should be removed to ensure proper NC code as displayed in the next example.

X >3>4

INC File Value

NC Code Output

2.5

X25

-1.3000

X13

0.2135

X2135

X 34

INC File Value

NC Code Output

2.5

X0025000

-1.3000

X0013000

0.2135

X0002135

d (another numeral)

This is always a single digit that indicates the number of digits available. In this example it is the number of digits before the decimal point.

If the above > symbol is used, then this is the maximum number of digits that can appear before the decimal point.

If the above > symbol is not used, then this is the number of digits that will always appear before the decimal point.

G>2

INC File Value

NC Code Output

01

G1

00

G0

3

G3

G 2   

INC File Value

NC Code Output

01

G01

00

G00

3

G03

x - OUTPUT character

This is used to replace a character described in the format with another character in the NC program. This is useful when the same letter must be formatted differently when used in different places. In some controls, any negative Z value with a minus is usually below the Z0 point, but in the case of drilling cycles, no minus sign is required for the Z. The example below shows that the letter Z is output when the letter A is used in the POSTFORM file.

A >3.>4 Z

Below is a sample line of a POSTFORM sequence using this output character.

G81 X[h] Y[v] A[d] F[frate]

This line shows the NC code output using the line in the POSTFORM file.

G81 X2.5 Y1.25 Z.5 F20.

In other words, the post formats for A, but outputs a Z word address.

Note   When the open parenthesis “(“ is used as the output character, as in the case of the Dynapath conversational control, the closed parenthesis ")" is automatically coded at the end of the character output. The following code shows this use for G codes in the Dynapath post.

G 02 (

INC File Value

NC Code Output

01

(01)

00

(00)

3

(03)

The output letter can be suppressed by placing empty quotes at the end of the letter format. For example this can be used to suppress the letter N for line numbers. Below, the letter N is suppressed while the line number is output.

N >4 ""

The examples use the following sequence line.

G0 G90 S[speed]

INC File Value

NC Code Output

1

1 G0 G91 S1000

23

23 G0 G90 S1000

3237

3237 G0 G90 S1000

When the "" symbols are not placed in the Word address the output is as shown below.

INC File Value

NC Code Output

1

N1 G0 G91 S1000

23

N23 G0 G90 S1000

3237

N3237 G0 G90 S1000

Note   The Output character can be used to get around many common formatting problems.

Columnar style

The output character for columnar style programs works slightly differently when formatting a columnar style program. The Spaces line designates a format as columnar. If no output character is specified, a space will be output in place of the letter, instead of the letter itself. In the examples with Columnar style formats, the T is repeated at the end of the T format line. When the letter is not repeated at the end of the line, the letter is not output in the NC code.

Note   The output letter must be placed on the line before any modifiers.

Limit

This format limits the acceptable value for the word address. When this limit is reached an error message is output to the screen for you to make a correction. The first numeral indicates the minimum value for the output and the second numeral indicates the maximum value. The example below indicates that the value of the S word can be between 0 and 5000. When the file is post processed, the Word address is error checked for the limit set in the format.

S 4 Limit 0 5000

INC File Value

NC Code Output

1

S1

6000

ERROR Message

3237

S3237

When the lower limit is above zero, the output uses this value when the INC file value is less than the limit.

S 4 Limit 250 5000

INC File Value

NC Code Output

1

ERROR Message

6000

ERROR Message

3237

S3237

Note   Limit checking is not performed on Replace statements.

Note   Limit values are absolute. When the output is incremental, the absolute value of the letter is checked for the limit.

Mult

The value after this command is used as a multiplier for all the values that will output for this word. The value entered can be either a number value or a Word Address Letter. The current value of the Word Address letter is used for the Mult function. The following example will output metric values.

INC File Value

NC Code Output

11

X279.4

2.5

X63.5

.2135

X5.4229

X ->3.>4 Mult 25.4

Note   Division is accomplished by multiplying by the inverse. Mult .03937 converts metric to inches.

DivBy

The value after this command is the denominator used to divide into all the values that will output for this word. The value entered can be either a number value or a Word Address Letter. The current value of the Word Address letter is used for the DivBy function.

The following example will divide all X values by Pi (3.14159).

INC File Value

NC Code Output

12

X3.8197

2.5

X.7957

.2135

X.0679

X ->3.>4 DivBy 3.14159

DivInto

The value after this command is the numerator used in all the divisions by the values that will output for this word. The value entered can be either a number value or a Word Address Letter. The current value of the Word Address letter is used for the DivInto function.

Division by zero will display a warning, leave the letter value un-modified and the post will continue.

DivInto can be used to produce reciprocals. The following example will output reciprocals for pitch.

INC File Value

NC Code Output

Q[20]

Q.05

Q[28]

Q.0357

Q[14]

Q.0714

Q ->3.>4 DivInto 1

Add

The value after this command will be added to all the output for this word. The value entered can be either a number value or a Word Address Letter. The current value of the Word Address letter is used for the Add function. The example below can be used to shift the output location of any character. Add a negative number to subtract.

INC File Value

NC Code Output

11

X21.

-2.5

X7.5

.2135

X10.2135

X ->3.>4 Add 10

Abs/Inc

All output for this word will be incremental. The default is absolute. It can be coded although it is not necessary. The example below outputs the Y values incrementally. The examples below indicate the Y incremental move values based on the starting point of Y0. The INC file values are absolute locations output by SURFCAM from Y0.

INC File Value

NC Code Output

11

Y11.

-2.5

Y-13.5

.2135

Y2.7135

Y ->3.>4 Inc

IncSign

Used as a qualifier for rotary axis positioning. When added to the Word address format, it causes the sign of the output to designate the direction of rotation.

These example A axis motions are within the 118 degree to 350 degree marks of the rotary table and begin at 260 degrees.

INC File Value

NC Code Output

270

A+270.

118

A-118.

350

A+360.

A ->3.>3 Limit -359.999 0 Incsign

A ->3.>3 Limit -359.999 0

INC File Value

NC Code Output

270.

A+270.

118.

A+118.

350.

A+360.

IncFrom

This is used to define the Word address as incremental from the letter entered. This is typically used for 4 axis Wire EDM programming. The example below outputs the U value incrementally from the last absolute value of X. The INC file values are the successive absolute X axis values.

U ->3.>4 IncFrom X

INC File Value

NC Code Output

X value

U value

 

1.

2.

U1.

2.5

-3.2

U-5.7

.2135

.125

U.0995

Modal

The Modal modifier prevents the post from repeating the same values on later lines when the value has not changed. The INC file values are successive lines.

F >2 Modal

The following sequence line is used for this example.

X[h] Y[v] F[frate]

INC File Value

NC Code Output

X

Y

F

 

0

0

1.

X0 Y0 F1.

1.5

2.5

1.

X1.5 Y2.5

2.

3.

1.

X2. Y3.

1.3

2.

2.

X1.3 Y2. F2.

Note   Modal Word address letters can also be specified with the ModalLetters command.

Force

This modifier requires the post to output the letter on each line. When the letter is required on each line without the value, use the Modal modifier with the Force modifier.

F >2 Force

The following sequence line is used for this example.

X[h] Y[v] F[frate]

INC File Value

NC Code Output

X

Y

F

 

0

0

1.

X0 Y0 F1.

1.5

2.5

1.

X1.5 Y2.5 F1.

2.

3.

1.

X2. Y3. F1.

1.3

2.

2.

X1.3 Y2. F2.

F >2 Modal Force

The following sequence line is used for this example.

INC File Value

NC Code Output

X

Y

F

 

0

0

1.

X0 Y0 F1.

1.5

2.5

1.

X1.5 Y2.5 F

2.

3.

1.

X2. Y3. F

1.3

2.

2.

X1.3 Y2. F2.

X[h] Y[v] F[frate]

The order in which these modifiers are placed on the line is not important. The order in which they are performed is not dependent upon the order in the line. The performance order is as follows:

   1.   The original value is multiplied with Mult.

   2.   Addition is accomplished after Mult.

   3.   The result of these two is checked for defined limits.

   4.   The result is then converted to incremental when Inc or IncFrom is used.

Return to SURFCAM Index


Your Ad Here