MC_TouchProbe (FB)ΒΆ

FUNCTION_BLOCK MC_TouchProbe

This function block is designed for recording an axis position when a trigger event is raised.

Note

The function block is intended for single shot operation, that is, only the first event following on a rising edge of Execute is One function block instance should represent exactly one probing command.

Example

Timing and TouchProbe

../../../_images/TouchProbeExample.png

Example

Defining a window, where trigger events are accepted (for modulo axes).

../../../_images/TouchProbeExample2.png
InOut:

Scope

Name

Type

Comment

Inout

Axis

AXIS_REF_SM3

Reference to axis, the position of which is to be recorded at a defined event at the trigger input.

TriggerInput

TRIGGER_REF

Reference to trigger signal source

Input

Execute

BOOL

Rising edge: Starts the execution of the function block.

WindowOnly

BOOL

TRUE: Trigger events will be accepted only within the specified window.

FirstPosition

LREAL

Start position from whereon (in positive direction) trigger events will be accepted (in technical units [u]). Only used if WindowOnly = TRUE.

LastPosition

LREAL

End position up to which trigger events will be accepted (in technical units [u]). Only used if WindowOnly = TRUE.

Output

Done

BOOL

TRUE: Trigger event has been recorded.

Busy

BOOL

TRUE: Execution of function block has not been finished yet.

Active

BOOL

Indicates that the touch probe function is active. It can take some time to activate the touch probe function. As long as Active is FALSE, trigger events may be ignored. The output is reset if Done, Error, or CommandAborted become TRUE.

Error

BOOL

TRUE: Error occurred within the function block.

ErrorID

SMC_ERROR

Error identification

RecordedPosition

LREAL

Position, where trigger event has occurred (in technical units [u]).

CommandAborted

BOOL

TRUE: Command has been aborted by another command.