Flushing NC channel (#FLUSH, #FLUSH CONTINUE, #FLUSH WAIT)

The single NC blocks of an NC program are read in continuously by an interpreter module, converted to an internal representation and output to the NC channel for further processing (program decoding) In the NC channel, the data is then read in by further modules (tool radius compensation, contour preparation, etc.), edited and passed through to the interpolator.

This processing step has a buffering effect on the NC channel with the result that program decoding is always ahead of actual execution of commands in the interpolator.

The buffering effect on the NC channel can then lead to a delay in motion block supply to the interpolator and stop axis motions.

The commands #FLUSH and #FLUSH CONTINUE deselect the buffering effect of the NC channel. All buffered NC blocks are immediately processed and executed in their programmed sequence.

These commands are especially helpful to bridge the time gap of large non-motion relevant NC program parts between two motion blocks and to avoid needless stops in axis motion.

Attention

attention

The commands for flushing the NC channel (#FLUSH, #FLUSH CONTINUE, #FLUSH WAIT) can not be used with active TRC, polynomial contouring or HSC mode.

Release Note

release_note

As of Build V2.10.1503.08, the commands for flushing the NC channel can be used with active polynomial contouring. In this case, contouring is suppressed in the motion block before and after a command to flush the NC channel.

Syntax:

#FLUSH

The #FLUSH statement forces all NC blocks (control commands, path motions) decoded before the command to be passed through to the interpolator. However, decoding of the part program is continued without interruption.

The interpolator is generally stopped for a short time at the end of the last path motion before #FLUSH even if the next motion block generated by the continuation of part program decoding is already present.

Programing Example

prg_example

Flush NC channel

A WHILE loop containing many non-motion relevant NC blocks is programmed between the motion blocks N10 and N210 (e.g. parameter calculations, variable accesses etc.). As a result, the motion block N10 in NC channel and the preparation of motion block N210 are delayed. #FLUSH forces the NC channel to pass through all motion blocks to the interpolator before the WHILE loop. It can then start with executing the path motion up to and including N10.

N05  G01 F1000 G90 X150

N10  X200

N20  #FLUSH

N30  $WHILE    

N40    P1 = [P2 * P3] + V.E...

N50    V.L....

...

N200 $ENDWHILE

N210 X250

...

M30

Mode of operation of #FLUSH between 2 motion blocks
Mode of operation of #FLUSH between 2 motion blocks

Syntax:

#FLUSH CONTINUE

A stop at block end of the last motion block can be avoided by adding CONTINUE. If the next motion block is already present in the interpolator, the motion is executed without any interruption. Only if no further motion block is present does the interpolator go to wait state.

Programing Example

prg_example

#Flush Continue

A WHILE loop containing many non-motion relevant NC blocks is programmed between the motion blocks N10 and N210 (e.g. parameter calculations, variable accesses etc.). As a result, the motion block N10 in NC channel and the preparation of motion block N210 are delayed. #FLUSH CONTINUE forces the NC channel to pass through all motion blocks to the interpolator before the WHILE loop. It can then start with executing the path motion up to and including N10. If the next motion block N210 is present in the interpolator before the end of N10, the motion is continued without interruption.

N05  G01 F1000 G90 X150

N10  X200

N20  #FLUSH CONTINUE

N30  $WHILE ...

N40    P1 = [P2 * P3] + V.E...

N50    V.L....

...

N200 $ENDWHILE

N210 X250

...

M30

Mode of operation of #FLUSH CONTINUE between 2 motion blocks
Mode of operation of #FLUSH CONTINUE between 2 motion blocks

Syntax:

#FLUSH WAIT

By contrast to #FLUSH and #FLUSH CONTINUE, program decoding is also interrupted by the command #FLUSH WAIT. All NC blocks before this command are output to the NC channel and executed in interpolator The NC channel is then "flushed”. All axes are stopped and the interpolator and program decoder have the same state, i.e. they are synchronised. Only when this state is reached does program decoding continue automatically.

Attention

attention

If synchronised or unsynchronised (MOS) M/H functions or #MSG commands were output previously to the PLC, the controller waits until they are adopted and synchronised by the PLC. Program decoding is interrupted until this state is reached.

Programing Example

prg_example

#Flush Wait

#FLUSH WAIT interrupts program decoding and forces the NC channel to pass through all motion blocks to the interpolator before the WHILE loop. When the interpolator has executed block N10 and position X200 is reached, program decoding continues.

N05  G01 F1000 G90 X150

N10  X200

N20  #FLUSH WAIT

N30  $WHILE ...

N40    P1 = [P2 * P3] + V.E...

N50    V.L....

...

N200 $ENDWHILE

N210 X250

...

M30

Mode of operation of #FLUSH WAIT between 2 motion blocks
Mode of operation of #FLUSH WAIT between 2 motion blocks