Sinumerik 840D have system variables which allow us to update and inquire different positions and behaviors of the cnc machine. No doubt sinumerik 840D is an advanced cnc control, and it gives us great flexibility to program the way we want.
The same way sinumerik 840D has a system variable $P_SEARCH, the $P_SEARCH system variable allow us to know whether block search is active or not.
When making cnc programs there are some point which are okay when we run a cnc program from start, but might be dangerous if called through block search ( there might be subroutines/cycles which you don’t want to start from the middle ).
$P_SEARCH Sinumerik 840 System Variable Values
So when making a cnc program for sinumerik 840D we can use $P_SEARCH system variable. The values for $P_SEARCH are as under
- “1″ or “true” when block search is active
- “0″ or “false” when block search is inactive this is the default value
$P_SEARCH Sinumerik 840 System Variable Usage
Almost every sinumerik 840D cycle have used this system variable, these cycles just make a jump to the cycle end if $P_SEARCH is “true”, so that the cycle can’t be started from the middle.
IF $P_SEARCH MSG("Inside Block Search") ENDIF
or we can use it this way
IF NOT $P_SEARCH MSG("This code will never run Inside Block Search") ELSE