Detailed Description 
  2.12 Block search 
Auxiliary Function Output to PLC (H2) 
Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0 
2-33 
Control response with REPOS  
If the started ASUB is concluded with REPOSA, spindle 1 remains at 111 degrees while 
spindle 2 is repositioned at 77 degrees. 
If a different response is necessary, the program sequence for block search, e.g. "N05 M3 
S..." und "N30 SPOS[2] = IC(...)", requires special treatment. 
Whether block search is active can be ascertained in the ASUB via the system variable 
$P_SEARCH. 
$P_SEARCH == 1 ; block search active 
In the case of incremental positioning after speed control operation, the path to be traversed 
is defined but, in some cases, the final position reached only becomes known during 
positioning. This is the case, for example, during a position calibration on crossing the zero 
mark or switch-on of position control. For this reason, the distance programmed from the 
position as the REPOS position (REPOSA in the ASUB) is assumed to be zero. 
Constraints 
Collected S values 
The meaning of an S value in the part program depends on the feed type that is currently 
active: 
 
G93, G94, G95, G97, G971  The S value is interpreted as the speed 
G96, G961  The S value is interpreted as a constant cutting rate 
If the feed operation is changed (e.g. for a tool change) before output of the system variable 
$P_SEARCH_S, the original setting from the target block in the part program must be 
restored to avoid use of the wrong type of feed. 
Collected direction of rotation 
For output of the direction of rotation, the system variable $P_SEARCH_SDIR is assigned 
default value "-5" at the start of the block search. This value has no effect on output. 
This ensures that when block search is applied across ranges in which spindles are not 
programmed with a direction of rotation, positioning, or axis mode, the last spindle mode is 
retained.  
Programming M19, SPOS, and SPOSA is collected as "M-19" (internal M19) in system 
variable $P_SEARCH_SDIR as an alternative to M3, M4, M5, and M70. 
On output of "M-19", the positioning data are read internally from the system variables 
$P_SEARCH_SPOS and $P_SEACH_SPOSMODE. Both system variables can also be 
written, for example, to make corrections. 
 
 
Note 
Because of the assignments described above (e.g. M[n] = $P_SEARCH_SDIR[n]), the 
values "–5" and "–19" generally remain hidden from the user and only have to be observed in 
the case of special evaluation of the system variables in the ASUB.