Block search (Type 1, 3, 4,)
Block search and selection of start position
In block search mode the user has the possibility to start a program at an intermediate position (restart position). In this case it is necessary to restore the total program context (program parameters, axis positions, ) at that given start position.
The restart position could be a location, where the program has been previously interrupted. After doing some measurement of work piece (moving the axis away) or changing the tool the user wants to continue the program at the previous interrupt position with different parameters (e.g. tool radius). The user than specifies the restart position within the program where he wants to continue and starts the program in block search mode right from the start.
The start position even could lie inside a NC block. Due to this fact for all block search types optionally the already moved distance within this block can be defined, where the real execution shall continue.
Up to the restart position no physical movement of axis is executed within block search (just the NC program is decoded in kind of a simulation mode).
After reaching the start position the axis have to be moved from actual position to the command and also spindles have to reach the last active commanded revolution (back to contour).
The program continues than as it has been started without block search mode.
To switch the machine functions correctly, the PLC receives the technology functions during block search in the same way as in normal mode. These functions also has to be acknowledged.
The selection and deselection of the block search mode is synchronized with PLC. In this way a specific handling of some special technology commands is possible, if the PLC supports this (Group handling, activation of special functions before deselection of block search mode).
Block search type 1: Start position and end position by file offset
This block search type provides the enabling of a processing section within the NC program by the definition of a start/end position via file offsets. At the start position the processing is activated and executed until the end position is reached. At the end position the processing is stopped and the NC program is finished at once. If no end position is defined, the processing is executed until NC program end M30.
The file offset defines the start position as the distance to the beginning of the NC program file. The use of the file offset is only possible, if within the NC program no contour influencing functions (e.g. polynomial contouring, HSC) are active. Only under these conditions the file offset really represent the correct start position.
The user is responsible for the correct determination of the file offset, whereas each file offset defines the first position of an NC block line in the corresponding NC program (main program, global sub program).
To determine the position where the NC-program shall be continued/ended in normal execution the file offset and other parameters can be passed during start of block search.
Type: 1
Start position
Parameter: file offset,
file name,
identifier, whether the file is in main (0) or sub program path (1),
pass counter (optional)
covered distance within block (optional)
End position (optional)
Parameter: file offset,
file name,
identifier, whether the file is in main (0) or sub program path (1),
pass counter (optional)
Example
Start in main program at file offset 100 in the first run on the block beginning, finish at file offset 239
Block search type 3: Start position by block count
The block count is a counter, which is incremented for each decoded NC-line from program start. It is also continuously incremented in comment lines, blank lines, loops and during subprogram calls. During normal execution the block count is displayed to PLC or HMI. To determine the position where the NC-program shall be continued in normal execution the block count can be passed as parameter during start of block search.
Type: 3
Parameter: block count,
covered distance within block (optional)
Example with block count
Start at block count 12
Block search type 4: Start position by block number
The block number is the number of a NC line of the NC program. The user (or NC generating system) is responsible to identify each line, which may be located later on, with an unique block number.
Type: 4
Parameter: block number,
covered distance within block (optional)
Start position by block number and pass counter
Within loops a block number is passed several times, so the block number is not unique all the time. In this case the processing start can be defined by an additional pass counter (optional).
Type: 4
Parameter: block number,
pass counter,
covered distance within block (optional)
Art und Quelle der Gefahr After reaching the restart position in NC program and start (continue) of program execution no automatic prepositioning of machine axes is done with default parameter settings. !! |
Example with block number
Start at block number 60
Example with block number and pass counter
Start at block number 60, in the 5. loop cycle