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 has to be extended.
An interrupted milling head stops the travel. After being repaired, the path can be continued with block search.
Extend the application by
Function block instance in the interpolation task that saves the preprocessing position
Function block instance in the path task that shortens a path element
For more information, see: SMC_BlockSearchSavePos, SMC_BlockSearchPos, and SMC_BlockSearch
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 function block has to run in the task of the interpolator. The interpolator program in the example is named "CNC".
Declare an instance of the
SMC_BlockSearchSavePos
function block in the program that the interpolation performs.bssp: SMC_BlockSearchSavePos;
Connect the
ipo
input of theSMC_BlockSearchSavePos
instance to the interpolator instance.Connect the
bExecute
input to a control variable that is set in the application when the CNC program is canceled (for example if thebAbort
input of the SMC_Interpolator instance was set). The position stored at theePos
output is used as follows for the block search by means ofSMC_BlockSearc
. After interruption,bExecute
has to be reset with a rising edge.
Part of the program that performs the interpolation with the instance of the SMC_BlockSearchSavePos
function block in CFC.

Using block search
An instance of the SMC_BlockSearch
function block has to 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.
Declare an instance of the
SMC_BlockSearch
function block in the program that the path preprocessing performs.bs: SMC_BlockSearch;
Implement the triggering of the
bExecute
input of theSMC_BlockSearch
instance.The position saved previously with the
SMC_BlockSearchSavePos
function block has to be passed as theepos
input of theSMC_BlockSearch
function block.
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.