# Status data: Access via HLI

The PLC can access the data listed below via the HLI.

Block search active
Description | The interpolator works in block search mode. No axis motion occurs. As long the block search process in the interpolator remains in the HLI_BS_ACTIVE or HLI_BS_WAIT_FOR_PLC_OFF state, this value indicates TRUE.
Signal flow | CNC → PLC
ST path | gpCh[channel_idx]^.bahn_state.block_search_active_r
Data type | BOOL
Value range | [TRUE = active - Interpolator works in block search mode., FALSE]
Access | PLC is reading

Block search, state
Description | Indicates the current state of the block search mode in the interpolator.
Signal flow | CNC → PLC
ST path | gpCh[channel_idx]^.bahn_state.block_search_state_r
Data type | INT
Value range | Constant | Value
HLI_BS_INACTIVE | 0
HLI_BS_WAIT_FOR_PLC_ON | 1
HLI_BS_ACTIVE | 2
HLI_BS_WAIT_FOR_PLC_OFF | 3
HLI_BS_WAIT_RETURN_TO_CONTOUR | 4
HLI_BS_RETURNING_TO_CONTOUR | 5
HLI_BS_WAIT_FOR_CONTINUE_CONTOUR | 6
Access | PLC is reading

Block search states

Covered block motion path
Description | Part of the path motion traversed in the current block in relation to the total path. This status datum contains the current block position referred to the path distance in space in the motion block in per mil sd(t).
Signal flow | CNC → PLC
ST path | gpCh[channel_idx]^.bahn_state.covered_distance_r
Data type | DINT
Unit | 0.1 %
Access | PLC is reading
Special features | If a main axis participates in the motion, the covered path motion is in relation to the block path of the first three axes. If no main axis participates in the motion, the covered path motion is the position lag with the longest motion time in relation to the block path.

Currently covered path in the NC program (PCS)
Description | Reads the current distance covered in the NC program since program start or since the last # DISTANCE PROG START CLEAR NC command. The calculation is based on the current position in the current NC block.
Signal flow | CNC → PLC
ST path | gpCh[channel_idx]^.bahn_state.dist_prog_start
Data type | UDINT (* LREAL)
Unit | 0.1 µm
Access | PLC is reading
Special features | * As of CNC Build V3.1.3104.01 the data element is provided in LREAL forma.

Line counter, NC program
Description | The datum indicates the NC program line which is the source of the command just processed by the interpolator. The value is derived from the number of NC program lines which the decoder has read since the NC program started. All the lines read the decoder are counted, i.e. repeatedly read lines, empty and comment lines. All commands to the interpolator resulting from decoding a NC program line are assigned to the associated line counter.
Signal flow | CNC → PLC
ST path | gpCh[channel_idx]^.bahn_state.block_count_r
Data type | UDINT
Access | PLC is reading

Block search, distance from continuation position
Description | If a NC program is started in block search modus, the NC program is processed in simulative mode (without axis motion) until the continuation position is reached. Block search is then in the HLI_BS_WAIT_FOR_PLC_OFF state and calculates the distance between the actual positions of the axis and the continuation position. If block search is in the HLI_BS_RETURNING_TO_CONTOUR state, this value is refreshed cyclically.
Signal flow | CNC → PLC
ST path | gpCh[channel_idx]^.bahn_state.block_search_path_deviation_r
Data type | UDINT
Unit | 0.1 µm
Value range | [0, MAX_SGN32]
Access | PLC is reading

Stop condition
Description | Displays the condition why the current motion was stopped.
Signal flow | CNC → PLC
ST path | gpCh[channel_idx]^.bahn_state.stop_conditions_r
Data type | DINT
Value range | See Value range of stop conditions with explanations.
Access | PLC is reading

## Value range of stop conditions

Constant in PLC | Value | Explanation
HLI_SC_FEEDHOLD | 0x0001 | Path feed stop
HLI_SC_VFG | 0x0002 | No axis-specific feed enable.
HLI_SC_SINGLE_BLOCK | 0x0004 | Single step mode active.
HLI_SC_M00_OR_M01 | 0x0010 | M00 (programmed stop), M01 (optional stop) is active.
HLI_SC_PLC_ACKNOWLEDGE | 0x0020 | Stop occurs due to waiting for an acknowledgement from the SPS. This may occur as a result of the output of M or H technology functions but is not restricted to them alone.
HLI_SC_OVERRIDE_ZERO | 0x0040 | Override = 0.
HLI_SC_OVERRIDE_RAPID_ZERO | 0x0080 | Override = 0 with rapid traverse blocks
HLI_SC_DELAY_TIME | 0x0200 | Dwell time.
HLI_SC_CHANNEL_SYNC | 0x0800 | Channel synchronisation is active.
HLI_SC_IPO_INPUT_EMPTY | 0x1000 | Input FIFO of the interpolation is empty.
HLI_SC_IPO_INPUT_DISABLED | 0x2000 | Input of function blocks (e.g. motion blocks etc.) disabled.
HLI_SC_WAIT_FOR_AXES | 0x8000 | Stop occurs due to waiting until a commanded axis swap is completed.
HLI_SC_CHANNEL_ERROR | 0x00010000 | An error occurred in the channel.
HLI_SC_WAIT_TECHNO_ACK | 0x00020000 | Waiting for acknowledgement of M/H/ST technology functions.
HLI_SC_W_C_AFTER_COLLISION | 0x00040000 | After a detected collision, waiting for motion resumption.
HLI_SC_SLOPE_SUPPLY_PROBLEM | 0x00080000 | Block supply problem (only occurs in conjunction with HSC slope).

HLI_SC_BACK_INTERPOLATION | 0x00100000 | Back interpolation after tracking mode is active.
HLI_SC_STOP_REVERSIBLE | 0x00200000 | Stop since M00 (programmed stop) is active. However, the NC program can be processed backwards despite M00 (available as of V3.1.3039.01).
HLI_SC_BREAKPOINT_STOP | 0x00400000 | Stop after a breakpoint (stop point) is reached; available as of V3.1.3039.01.
HLI_SC_M0_STOP | 0x02000000 | Stop after an M00 function is reached
HLI_SC_M1_STOP | 0x04000000 | Stop after an M01 function is reached
HLI_SC_INSERT_STOP_AT_DIST | 0x08000000 | Stop after an M function inserted by the Control Unit “Inserting stop marks” is reached.
HLI_SC_DEC_SYN_CHAN_EMPTY | 0x10000000 | Decoder is waiting for synchronisation. NC channel has no jobs.