Distance control

Commanding distance control

Description

This control unit can influence the distance control of the axis. This is dependent on whether the distance control function is selected in the axis parameters (see P-AXIS-00328).

Data type

MC_CONTROL_DISTANCE_CONTROL, see description of Control unit with usage check

Access

PLC reads state_r and writes command_w + enable_w

ST path

gpAx[axis_idx]^.lr_mc_control.distance_control

Flow control of commanded values

ST element

.command_semaphor_rw

Signal flow

PLC → CNC

Data type

BOOL

Peculiarities

Consumption data item

Access

CNC accepts the commanded values when this element has the value TRUE. After successful acceptance the CNC sets this value to FALSE.

PLC sets this value to TRUE when the commanded value is enabled for acceptance by the CNC. The commanded values can only be updated by the PLC if this element has the value FALSE.

Commanded values

ST element

.command_w

Signal flow

PLC → CNC

Data type

HLI_DISTANCE_CONTROL_COMMAND

Access

PLC writes

Distance control state

ST element

.state_r

Signal flow

CNC → PLC

Data type

HLI_DISTANCE_CONTROL_STATE

Access

PLC is reading

Redirection

ST element

.enable_w

Command for distance control

Description

This entry commands distance control.

Signal flow

PLC → CNC

Data type

HLI_DISTANCE_CONTROL_COMMAND

ST Path

gpAx[axis_idx]^.lr_mc_control.distance_control.command_w

Access

PLC writes

Elements of the data type

ST element

.transition

Data type

UDINT

Value range/Description

See Table - Permissible transitions to command distance control

 

 

ST element

.position

Data type

DINT

Value range

[DINT_MIN, DINT_MAX]

Description

The meaning depends on the commanded transition:

HLI_DIST_CTRL_ON: Command position of the workpiece surface (SET_POS)

HLI_DIST_CTRL_REF: Reference position of the workpiece surface (REF_POS)

Distance control state

Description

This entry reads the distance control state.

Signal flow

PLC → CNC

Data type

HLI_DISTANCE_CONTROL_STATE

ST Path

gpAx[axis_idx]^.lr_mc_control.distance_control.state_r

Access

PLC is reading

Elements of the data type

Element

.actual_state

Data type

UDINT

Access

PLC is reading

Value range/Description

See table: Distance control

Element

.actual_position

Data type

DINT

Unit

0.1 µm or 0.0001°

Access

PLC reads

Description

This data item indicates the current actual position of the workpiece surface detected by the sensing controller.

Characteristics

This data item is entered only if distance control is activated in the axis parameters (see P-AXIS-00328).

Element

.actual_offset

Data type

DINT

Unit

0.1 µm or 0.0001°

Access

PLC reads

Description

This data item indicates the current position offset of distance control by which the axis was moved due to deviations between the actual workpiece surface and the specified position (SET_POS). The following applies in stationary state (constant workpiece surface and position offset completely run out): Position offset = SET_POS – actual_position

Characteristics

This data item is entered only if distance control is activated in the axis parameters (see P-AXIS-00328).

Tables for commanding distance control

The tables below list the permissible values to command distance control and the defined states resulting.

Permissible transitions to command the distance control

Transition

Value

Meaning

HLI_DIST_CTRL_OFF

0

Distance control is deactivated. The program switches to the TURNING OFF state in which the position offset is run out. The state then switches automatically to the INACTIVE state.

HLI_DIST_CTRL_ON

1

Distance control is activated. When activated a command position for the workpiece surface must be transferred in the “position” datum. If no absolute encoder is used, distance control must first be referenced.

HLI_DIST_CTRL_FREEZE

2

The current position offset is frozen. Axis adjustment to the actual workpiece surface is ended.

HLI_DIST_CTRL_REF

3

Referencing distance control if no absolute encoder is used. Referencing is only permitted in the INACTIVE state. With this transition a reference position must additionally transferred in the “position” datum.

HLI_DIST_CTRL_ON_CONST_DIST

4

Activating distance control with continuous distance specification. On activation, a set position must be specified. If the distance sensor supplies no absolute values, distance control must be referenced in advance.

HLI_DIST_CTRL_DRYRUN

5

Activate distance control for pure evaluation of data. No axis tracking in case of changes to the workpiece surface. When activated a command position for the workpiece surface must be transferred in the “position” datum. If no absolute encoder is used, distance control must first be referenced.

HLI_DIST_CTRL_CONST_DIST

6

Activate distance control for pure evaluation of data. No axis tracking in case of changes to the workpiece surface. On activation, a set position must be specified. If the distance sensor supplies no absolute values, distance control must be referenced in advance.

Defined states of distance control

State

Value

Meaning

HLI_DIST_CTRL_STATE_INACTIVE

0

Distance control is deactivated. The specified offset (“actual_offset”) is 0.

HLI_DIST_CTRL_STATE_ACTIVE

1

Distance control is active and adjusts the axis to the workpiece surface.

HLI_DIST_CTRL_STATE_FREEZE

2

Distance control is active. The offset (“actual_offset”) is frozen, i.e. the axis is not adjusted to the workpiece surface.

HLI_DIST_CTRL_STATE_TURNING_OFF

3

Distance control was deactivated. The actual active offset (“actual_offset”) is run out. As soon as the offset is 0, an automatic switch to INACTIVE state takes place.

HLI_DIST_CTRL_STATE_ACTIVE_CONST_DIST

4

Distance control is active and adjusts the axis to the workpiece surface. Continuous specification of the set distance of the tool to the workpiece surface.

HLI_DIST_CTRL_STATE_ERROR

5

Distance control is in error state, e.g. due to an incorrect state transition or due to an error in the position controller. Only a transition to TURNING OFF is possible to exit this state.

HLI_DIST_CTRL_STATE_DRYRUN_CONST_DIST

6

Distance control is active, however axis is not adjusted to workpiece surface. This allows the evaluation of data, for example filter effect without feedback from the control system. Continuous commanding of the set distance of the tool to the workpiece surface.

HLI_DIST_CTRL_STATE_DRYRUN_SETPOS

7

Distance control is active, however axis is not adjusted to workpiece surface. This allows the evaluation of data, for example filter effect without feedback from the control system.