MC_TouchProbe

MC_TouchProbe 1:

The MC_TouchProbe function block records an axis position at the point in time of a digital signal (measuring probe function). The position is usually not recorded directly in the PLC environment, but via an external hardware latch, and is thus very accurate and independent of cycle time. The function block controls this mechanism and determines the externally recorded position.

Prerequisites

The prerequisite for the position acquisition is suitable encoder hardware that is able to latch the recorded position. The following equipment is supported, for example: SERCOS drives, the Beckhoff AX2000 with SERCOS and Lightbus interfaces and the Beckhoff KL5101 Encoder Bus Terminals. The digital trigger signal is wired into this hardware and, independently of the PLC cycle, triggers the recording of the current axis position.

These end devices have to be configured to some extent so that a position recording is possible. For details, read Measuring probe evaluation with AX2xxx-B200 (Lightbus), Measuring probe evaluation with AX2xxx-B750 (SERCOS), AX5000 Probe Unit and AX5000 Function of a probe unit.

Restrictions

Irrespective of the hardware used, MC_TouchProbe can only record one edge of a probe unit at a time. If both edges are to be recorded, for example, then the block must be restarted after the first edge with a changed parameterization. Edges that follow one another in quick succession therefore cannot be recorded. In order to avoid this problem, you are referred to the extended function block MC_TouchProbe_V2.

MC_TouchProbe 2:

After a measuring probe cycle has been initiated by a rising edge on the Execute input, this is only terminated if the outputs Done, Error or CommandAborted become TRUE. If the process is to be interrupted at an intermediate point in time, the function block MC_AbortTrigger with the same TriggerInput data structure must be called up. Otherwise no new cycle can be initiated.

Signal curve

MC_TouchProbe 3:

Inputs

VAR_INPUT
Execute       : BOOL;
WindowOnly    : BOOL;
FirstPosition : LREAL;
LastPosition  : LREAL;
END_VAR

Execute

The command is executed with the rising edge and the external position latch is activated.

WindowOnly

If this option is active, only one position inside the window between FirstPosition and LastPosition is recorded. Positions outside the window are rejected and the external position latch is automatically newly activated. Only if the recorded position lies inside the window does Done become TRUE.
The recording window can be interpreted in terms of absolute or modulo values. In this connection the flag ModuloPositions in the structure TriggerInput is to be set accordingly. In the case of absolute value positions there is exactly one window. In the case of modulo value positions the window repeats itself within the modulo cycle defined in the axis parameters (e.g. 0 to 360 degrees).

FirstPosition

Initial position of the recording window, if WindowOnly is TRUE. This position can be interpreted as an absolute or modulo value. In this connection the flag ModuloPositions is to be set appropriately in the structure TriggerInput (see below).

LastPosition

Final position of the recording window, if WindowOnly is TRUE. This position can be interpreted as an absolute or modulo value. In this connection the flag ModuloPositions is to be set appropriately in the structure TriggerInput (see below).

MC_TouchProbe 4:

Outputs

VAR_OUTPUT
Done             : BOOL;
Busy             : BOOL;
CommandAborted   : BOOL;
Error            : BOOL;
ErrorID          : UDINT;
RecordedPosition : LREAL;
END_VAR

Done

Becomes TRUE, if an axis position has been recorded successfully. The position is sent to the output RecordedPosition.

Busy

Becomes TRUE as soon as the function block is active, and becomes FALSE when it has returned to its initial state.

CommandAborted

Becomes TRUE if the process is interrupted by an external event, e.g. by the call up of MC_AbortTrigger.

Error

Becomes TRUE, as soon as an error occurs.

ErrorID

If the error output is set, this parameter supplies the error number

RecordedPosition

Axis position recorded at the point in time of the trigger signal

Inputs/outputs


VAR_IN_OUT
Axis         : AXIS_REF;
TriggerInput : TRIGGER_REF;
END_VAR

Axis

Axis data structure

TriggerInput

TRIGGER._REF data structure for describing the trigger source