# MC_AbortTrigger

The MC_AbortTrigger FB is used to abort commands that are related to trigger events (e.g. MC_TouchProbe).

Blockdiagramm

Parameters of the FB

VAR_IN_OUT
Variable name | Data type | Description
axis | AXIS_REF | Axis reference
TriggerInput | TRIGGER_REF | Reference for the trigger signal source (see chapter entitled Data structure TRIGGER_REF).

VAR_INPUT
Variable name | Data type | Description
Execute | BOOL | Aborts a command of an FB MC_TouchProbe on the rising edge.

VAR_OUTPUT
Variable name | Data type | Description
Done | BOOL | Measuring command is aborted.
Busy | BOOL | Is TRUE while a measuring command is aborted.
Error | BOOL | Is TRUE when an error occurs in the FB.
ErrorID | WORD | Error code.

Behaviour of the FB

- A measurement command is aborted only when the axis is in the "Standstill" or "Continuous Motion" or "Discrete Motion" or "Synchronized Motion" or "Stopping" state. Moreover, no command for aborting of a measurement command must be active in the measurement channel specified by "TriggerInput". The measurement channel must therefore be in the "TP_IDLE" or "TOUCHPROBING" state. If this is not the case, the "error" output is set to FALSE and "error_id" indicates an error value that designates the state the axis is currently in.
- If a command for aborting a measurement command in a measurement channel is active, no further command for aborting in relation to this measurement channel can be sent. Therefore, the FB is not retriggerable. However, if the command is still sent, the “Error” output is TRUE and signals the errorP-ERR-44010 (ERR_PO_AX_TPABORT_RETRIG) at the “ErrorID” output.
- Errors are also generated if the axis reference, the measuring channel or the trigger event of the measurement process were changed when they are commanded in the active state. The following error may occur in these cases:
- P-ERR-44001 (ERR_PO_AX_REF_CHG_WHILE_ACTIVE)
- P-ERR-44011 (ERR_PO_AX_INPREF_TPCH_CHW_ACTIVE)
- P-ERR-44012 (ERR_PO_AX_INPREF_TPMD_CHW_ACTIVE)