MC_TouchProbe_V2

MC_TouchProbe_V2 1:
MC_TouchProbe_V2_00

The MC_TouchProbe_V2 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.

The function of the MC_TouchProbe_V2 function block is similar that of the MC_TouchProbe function block. With several instances, however, it is possible to operate up to two probe units at the same time and in parallel to record the rising and falling signal edges each with an instance. Furthermore, a continuous mode is available that evaluates successive signal edges without renewed activation.

Prerequisites

The prerequisite for the position acquisition is suitable encoder hardware that is able to latch the recorded position. Support is offered for:

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. Beckhoff EtherCAT drives can be configured with the System Manager. Note that the probe unit has to be configured with the "Extended NC Probe Unit" interface.

MC_TouchProbe_V2 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_AbortTrigge_V2 with the same TriggerInput data structure must be called up. Otherwise no new cycle can be initiated.

Signal curve

MC_TouchProbe_V2 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_V2 4:

Outputs

VAR_OUTPUT
Done             : BOOL;
Busy             : BOOL;
CommandAborted   : BOOL;
Error            : BOOL;
ErrorID          : UDINT;
RecordedPosition : LREAL;
RecordedData : MC_TouchProbeRecordedData;
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

RecordedData

Data structure with complementary information relating to the logged axis position at the 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