Skip to content

Post-Processor Output

Post-Processor Output commands vary slightly depending on the application in which they are being used. The specific behavior for each application is described in the following sections:

Vericut

Vericut Inspection Probe Cycle Programming

Vericut Composites Programming and Vericut Composite Probing

Vericut

There are two types of post-processor language statements that generate output to files, "Out" and "Log". "Out" writes to a G-Code file and "Log" writes to an auxiliary file. A third language statement, "Show", sends messages to the product’s status area. The syntax for all three statements is the same;

Out string_expression

Log string_expression

Show string_expression

It is important to note that the order that Out, Log, and Show command appear in the post-processor is important. This is because the Out command causes the variable to be incremented, while the Log and Show commands do not. Log and Show commands should be placed before an Out command when used together in the post-processor.

The string_expression can take advantage of some extra features of the language. In its simplest form, an expression could be a string constant;

Out "(Load Palette)"

or it could involve concatenation of constants, string variables and textual register properties.

Out "Job " & jobName & ", Spindle Speed " & S.Output

Remember that a string expression cannot contain a number variable, because there is no way to specify the format required. If you need to output a number, you should probably be using a register instead. If necessary, you could use a register just for this purpose;

Temp.Format = "s4.2"

Temp.Current = toolDia

Out "Tool Diameter = " & Temp.Output & "mm"

A reference to a register variable that does not have a property qualifier will use the Current property if a number is expected, and the Output property when a string would make sense. Thus this last example could be simplified to;

Temp.Format = "s4.2"

Temp = toolDia

Out "Tool Diameter = " & Temp & "mm"

To explore this topic further, let's use a sample that will be much more common. The GOTO subroutine for a 3-axis machine needs to output lines similar to the following;

N12 G01 X1.25 Y2.375 Z4.5 F200

Probably the G, X, Y, Z and F registers will be modal, so that their values will only be output when they have changed. The N register will always change so it doesn't matter whether we think of this as being modal or not. Let's assume that the Prefix property for each register except N includes a leading space. With the rules that we have introduced so far, you could write a statement to generate the required G-code lines as follows;

Out N.Output & G.Output & X.Output & Y.Output & Z.Output & F.Output

Or more concisely;

Out N & G & X & Y & Z & F

Here is another way that may not initially seem to have any advantage over the prior implementation.

Out "<N><G><X><Y><Z><F>"

The key here is that the register references are now embedded in a string constant, using the "<" and ">" characters. So if the output line has some constant elements and some register values, it can be specified without using concatenation. The last line of our earlier example could be written;

Out "Tool Diameter = <Temp>mm"

It is sometimes necessary to force output of a modal register's value whether it has changed or not. A good example would be the need to re-specify the feed rate after a head change, even though the feed rate for the new head may be the same as that for the prior one. There are two ways to do this. The first involves artificially changing the register's Previous property so that it doesn't match the Current value. The Zap function is provided for this purpose and you could have;

Zap F

somewhere in one of the subroutines involved in a head change. The other technique is a variant of the "" syntax. By placing an exclamation point in front of the register name, "<!register>", you will force output of that register's value.

The Increment property of the N register should always be set to a positive value, in the segment of your VcPost file that is outside all subroutines.

N.Increment = 1

Each time an "Out" statement includes the N register, its value will automatically be incremented. If the balance of the output line is modal registers, and none of them have changed, then no output is generated and the N register will not be changed. A "Log" statement does not cause any register values to be incremented.

Vericut Inspection Probe Cycle Programming

There are two types of post-processor language statements that generate output to files, "Log" and "Out". "Log" only writes to a log file of the post-processor's activities, but "Out" directs output both to the log file and to the G-Code file. Input lines from the APT source are also sent to the log file, but this does not require any language statements in the VcPost. The syntax for the output statements is;

Log string_expression

Out string_expression

But in each case the string_expression can take advantage of some extra features of the language. In its simplest form, an expression could be a string constant;

Out "(Load Palette)"

or it could involve concatenation of constants, string variables and textual register properties.

Log "Job " & jobName & ", Spindle Speed " & S.Output

Remember that a string expression cannot contain a number variable, because there is no way to specify the format required. If you need to output a number, you should probably be using a register instead. If necessary, you could use a register just for this purpose;

Temp.Format = "s4.2"

Temp.Current = toolDia

Log "Tool Diameter = " & Temp.Output & "mm"

A reference to a register variable that does not have a property qualifier will use the .Current property if a number is expected, and the .Output property when a string would make sense. Thus this last example could be simplified to;

Temp.Format = "s4.2"

Temp = toolDia

Log "Tool Diameter = " & Temp & "mm"

To explore this topic further, let's use a sample that will be much more common. The GOTO subroutine for a 3-axis machine needs to output lines similar to the following;

N12 G01 X1.25 Y2.375 Z4.5 F200

Probably the G, X, Y, Z and F registers will be modal, so that their values will only be output when they have changed. The N register will always change so it doesn't matter whether we think of this as being modal or not. Let's assume that the .Prefix property for each register except N includes a leading space. With the rules that we have introduced so far, you could write a statement to generate the required G-Code lines as follows;

Out N.Output & G.Output & X.Output & Y.Output & Z.Output & F.Output

Or more concisely;

Out N & G & X & Y & Z & F

Here is another way, which may not initially seem to have any advantage over the prior implementation.

Out "<N><G><X><Y><Z><F>"

The key here is that the register references are now embedded in a string constant, using the "<" and ">" characters. So if the output line has some constant elements and some register values, it can be specified without using concatenation. The last line of our earlier example could be written;

Log "Tool Diameter = <Temp>mm"

It is sometimes necessary to force output of a modal register's value whether it has changed or not. A good example would be the need to re-specify the feed rate after a tool change, even though the feed rate for the new tool may be the same as the that for the prior one. There are two ways to do this. The first involves artificially changing the register's .Previous property so that it doesn't match the .Current value. The Zap function is provided for this purpose and you could have;

Zap F

somewhere in one of the subroutines involved in a tool change. The other technique is a variant of the "" syntax. By placing an exclamation point in front of the register name, "<!register>", you will force output of that register's value.

The .Increment property of the N register should always be set to a positive value, in the segment of your VcPost file that is outside all subroutines.

N.Increment = 1

Each time an "Out" statement includes the N register, its value will automatically be incremented. If the balance of the output line is modal registers, and none of them have changed, then no output is generated and the N register will not be changed. To illustrate this, we will go back to our early sample GOTO subroutine.

Sub GOTO

  If (G = 0) Then

    If (Z < Z.Previous) Then

      Out "<N><G><X><Y>"

      Out "<N><G><Z>"

    Else

      Out "<N><G><Z>"

      Out "<N><G><X><Y>"

    End If

    Else

      Out "<N><G><X><Y><Z><F>"

  End If

End Sub

With the following APT input;

RAPID

GOTO/1,2,6

RAPID

GOTO/1,2,2

The generated G-Code would be;

N21G00X1.Y2.

N22Z6.

N23Z2.

Note that there is only one output line corresponding to the second GOTO, when both X and Y are unchanged.

Vericut Composites Programming

Vericut Composite Probing

📝 NOTE: The following post-processor language statements that generate output to files apply to both Vericut Composites Programming and to Vericut Composites Probing.

There are two types of post-processor language statements that generate output to files, "Out" and "Log". "Out" writes to a G-Code file and "Log" writes to an auxiliary file. A third language statement, "Show", sends messages to the product’s status area. The syntax for all three statements is the same;

Out string_expression

Log string_expression

Show string_expression

The string_expression can take advantage of some extra features of the language. In its simplest form, an expression could be a string constant;

Out "(Load Palette)"

or it could involve concatenation of constants, string variables and textual register properties.

Out "Job " & jobName & ", Spindle Speed " & S.Output

Remember that a string expression cannot contain a number variable, because there is no way to specify the format required. If you need to output a number, you should probably be using a register instead. If necessary, you could use a register just for this purpose;

Temp.Format = "s4.2"

Temp.Current = toolDia

Out "Tool Diameter = " & Temp.Output & "mm"

A reference to a register variable that does not have a property qualifier will use the Current property if a number is expected, and the Output property when a string would make sense. Thus this last example could be simplified to;

Temp.Format = "s4.2"

Temp = toolDia

Out "Tool Diameter = " & Temp & "mm"

To explore this topic further, let's use a sample that will be much more common. The GOTO subroutine for a 3-axis machine needs to output lines similar to the following;

N12 G01 X1.25 Y2.375 Z4.5 F200

Probably the G, X, Y, Z and F registers will be modal, so that their values will only be output when they have changed. The N register will always change so it doesn't matter whether we think of this as being modal or not. Let's assume that the Prefix property for each register except N includes a leading space. With the rules that we have introduced so far, you could write a statement to generate the required G-code lines as follows;

Out N.Output & G.Output & X.Output & Y.Output & Z.Output & F.Output

Or more concisely;

Out N & G & X & Y & Z & F

Here is another way that may not initially seem to have any advantage over the prior implementation.

Out "<N><G><X><Y><Z><F>"

The key here is that the register references are now embedded in a string constant, using the "<" and ">" characters. So if the output line has some constant elements and some register values, it can be specified without using concatenation. The last line of our earlier example could be written;

Out "Tool Diameter = <Temp>mm"

It is sometimes necessary to force output of a modal register's value whether it has changed or not. A good example would be the need to re-specify the feed rate after a head change, even though the feed rate for the new head may be the same as that for the prior one. There are two ways to do this. The first involves artificially changing the register's Previous property so that it doesn't match the Current value. The Zap function is provided for this purpose and you could have;

Zap F

somewhere in one of the subroutines involved in a head change. The other technique is a variant of the "" syntax. By placing an exclamation point in front of the register name, "<!register>", you will force output of that register's value.

The Increment property of the N register should always be set to a positive value, in the segment of your VcPost file that is outside all subroutines.

N.Increment = 1

Each time an "Out" statement includes the N register, its value will automatically be incremented. If the balance of the output line is modal registers, and none of them have changed, then no output is generated and the N register will not be changed. A "Log" or "Show" statement does not cause any register values to be incremented.