Distance covered from program start (#DISTANCE PROG START)

Distance from program start

Every motion block can be identified by the covered distance from program start. The distance is displayed on the PLC interface during the process (see section HLI: Covered distance - path increments, section Covered distance - path increments). The distance is formed as the sum of the main axis motions of all previous motion blocks. If a motion block contains no main axis motion, the distance of the tracking axis that moves at its dynamic limit is added.

Distance from program start
Distance from program start

Notice

notice

To approach the identical position in the block search, the original contour may not be changed in the definition of position by distance. This means that, if tool radius compensation is active, an identical tool must be replaced in block search.

However, if starting is executed with different tool geometries, the “Distance from program start” changes.

Distance display, NC commands

To render this independent of the starting axis position, the distance display can be controlled by the following commands in the NC program.

#DISTANCE PROG START ON

modal

#DISTANCE PROG START OFF

modal

#DISTANCE PROG START CLEAR

non-modal

 

 

ON

Distance of following motion blocks is evaluated for display (default after program start).

OFF

Distance of following motion blocks is not evaluated for display.

CLEAR

The current distance is set to 0 (default at program start)

Influence of starting movement is prevented by NC commands
Influence of starting movement is prevented by NC commands

Programing Example

prg_example

#DISTANCE PROG START

%example

N10 #DISTANCE PROG START OFF

N20 G01 G90 X0 Y0 Z0 F1000

N100 G92 X33 Y55        ; Offset -> position of part

N110 X0 Y0 Z0           ; Starting movement of geometry

N120 #DISTANCE PROG START ON

N130 X100               ; distance = [ 0, 100]

N140 Y100               ; distance = [ 100, 200]

N150 X0                 ; distance = [ 200, 300]

N160 Y0                 ; distance = [ 300, 400]

N170 #DISTANCE PROG START OFF

N200 G92 X600 Y700        ; Offset -> position of part

N210 X0 Y0 Z0           ; Starting movement of geometry

N220 #DISTANCE PROG START ON

N230 X100               ; distance = [ 400, 500]

N240 Y100               ; distance = [ 500, 600]

N250 X0                 ; distance = [ 600, 700]

N260 Y0                 ; distance = [ 700, 800]

N270 #DISTANCE PROG START OFF

M30

Position in block by distance

If a block is stopped or interrupted, the actual distance from program start can be read on the PLC interface (see section HLI: Covered distance - path increments) and the continuation position can be specified more exactly by this distance display.

Example

example

Continuation position with current block split by distance from program start

Block search type                                4

Block number                                 30

Distance since program start        16 mm

Continuation position is within block N30

Continuation position with current block split by distance from program start
Continuation position with current block split by distance from program start

Example

example

Search for continuation position by distance from program start over several blocks

Block search type                          4

Block number                                 30

Covered distance         234.79 mm

Continuation position is within block N50

Search for continuation position by distance from program start over several blocks
Search for continuation position by distance from program start over several blocks

Attention

attention

A homing run G74 or a measurement run G100 are movements which are ended by an external signal. The signal is simulated during block search up to the specified block limit (Phase 1).

If block search is additionally extended by specifying the covered distance (Phase 2), no commands such as G74 or G100 may occur in this section of the NC program since they cannot be simulated there. However, if this type of command occurs, an error message is output.

Example

example

G74, G100, #FLUSH WAIT during search for continuation position

Block search type                     4

Block number                            30

Covered distance         495.12 mm

Continuation position is within block N100

G74, G100, #FLUSH WAIT during search for continuation position
G74, G100, #FLUSH WAIT during search for continuation position

Notice

notice

The continuation position can only be moved by tracking, i.e. towards program end, beyond the specified block limit (solid green section).

Moving the continuation position to a position already skipped in block search is not possible. This is prevented and a warning is output.

Example

example

Continuation position by distance from program start before current block

Block search type                     4

Block number                            30

Covered distance         2 mm

Continuation position is within block N20

Warning is output

Continuation position by distance from program start before current block
Continuation position by distance from program start before current block