Using Block Search

 

A block search allows for interpolation to continue after an interruption. The stop position is traveled first and the path is traveled unchanged from this position. For this, the program that performs the interpolation and the program that performs the path preprocessing must be extended.

Example

An interrupted milling head stops the travel. After being repaired, the path can be continued with block search.

Extend the application by

See also

Saving the preprocessing position

 

You can use the SMC_BlockSearchSavePos function block for saving the current position on command. At this time, the instance of the func­tion block must run in the task of the interpolator. The interpolator program in the example is named "CNC".

  1. Declare an instance of the SMC_BlockSearchSavePos function block in the program that the interpolation performs.

    Example: SMC_BlockSearchSavePos;

  2. Connect the ipo input of the SMC_BlockSearchSavePos instance to the interpolator instance.

  3. Connect the bExecute input to a control variable that is set in the application when the CNC program is canceled (for example if the bAbort input of the SMC_Interpolator instance was set). The posi­tion stored at the ePos output is used as follows for the block search by means of SMC_BlockSearc. After interruption, bExecute must be reset with a rising edge.

Example

Part of the program that performs the interpolation with the instance of the SMC_BlockSearchSavePos function block in CFC.

_sm_img_interpolation_with_block_search.png

Using block search

 

An instance of the SMC_BlockSearch function block must be called in the same task as the remaining path preprocessing, typically directly before the SMC_CheckVelocities function block. If a rising edge exists at bExecute, then a block search is performed. After starting, the saved position is traveled and the path is traveled unchanged from this position.

  1. Declare an instance of the SMC_BlockSearch function block in the program that the path preprocessing performs.

    bs: SMC_BlockSearch;

  2. Implement the triggering of the bExecute input of the SMC_BlockSearch instance.

  3. The position saved previously with the SMC_BlockSearchSavePos function block must be passed as the epos input of the SMC_BlockSearch function block.

Example: Block search in path preprocessing

PROGRAM CNC_PreparePath
...
PROGRAM CNC_PreparePath
...
VAR
       bs: SMC_BlockSearch;
END_VAR
...
bs(
               ePos:=CNC.bssp.ePos ,
               bExecute:=rncf.bExecuteDecoder ,
               bAbort:= ,
               bAppend:= ,
               poqDataIn:=ncd.poqDataOut ,
               bStartFromSavedPos:=CNC.bssp.bPositionStored ,
               nSizeOutQueue:=SIZEOF(agiBufBlockSearch) ,
               pbyBufferOutQueue:=ADR(agiBufBlockSearch) ,
               bDone=> ,
               bBusy=> ,
               bError=> ,
               wErrorID=> ,
               poqDataOut=> );

The bStartFromSavedPos input can also be activated with a control variable. The control variable can be activated after a cancellation in order to continue again at the last saved position.