MC_TouchProbe
The function block MC_TouchProbe records an axis position at the time of a digital signal (touch probe function). The position is captured via an external hardware latch and is therefore highly accurate and independent of the cycle time. The function block controls this mechanism and determines the externally recorded position.
The parameters involved may have to be set in the drive parameters. For the servo terminal the parameters can be found in the objects DMC Setting (0x8030) or DMC Features (0x8031). |
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 operation is to be aborted in the meantime, the function block MC_AbortTrigger must be called with the same TriggerInput data structure. Otherwise no new cycle can be initiated. |
Signal curve
Inputs
VAR_INPUT
Execute : BOOL;
WindowOnly : BOOL;
FirstPosition : LREAL;
LastPosition : LREAL;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The command is executed with a rising edge, and the external position latch is activated. |
WindowOnly | BOOL | If WindowOnly = TRUE, only one position within 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, "Done" becomes TRUE. The recording window can be interpreted in terms of absolute or modulo values. For this purpose, the "ModuloPositions" flag must be set accordingly in the TriggerInput data structure. In the case of absolute value positions there is exactly one window. With modulo positions, the window is repeated within the modulo cycle defined in the axis parameters (e.g. 0 to 360°). |
FirstPosition | LREAL | Initial position of the recording window, if "WindowOnly" is TRUE. This position can be interpreted as an absolute or modulo value. For this purpose, the "ModuloPositions" flag must be set accordingly in the TriggerInput data structure. |
LastPosition | LREAL | End position of the recording window, if "WindowOnly" is TRUE. This position can be interpreted as an absolute or modulo value. For this purpose, the "ModuloPositions" flag must be set accordingly in the TriggerInput data structure. |
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
TriggerInput : TRIGGER_REF;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis data structure | |
TriggerInput | Data structure for describing the trigger source. This data structure must be parameterized before the function block is called for the first time. |
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorId : UDINT;
RecordedPosition : LREAL;
RecordedData : MC_TouchProbeRecordedData;
END_VAR
Name | Type | Description |
---|---|---|
Done | BOOL | TRUE if an axis position was successfully detected. The position is sent to the output "RecordedPosition". |
Busy | BOOL | TRUE as soon as the function block is active. FALSE if it is in the default state. |
CommandAborted | BOOL | TRUE if the process is interrupted by an external event, e.g. by the call up of MC_AbortTrigger. |
Error | BOOL | TRUE, if an error occurs. |
ErrorID | UDINT | If the error output is set, this parameter supplies the error number. |
RecordedData | MC_TouchProbeRecordedData | Data structure with complementary information relating to the logged axis position at the time of the trigger signal |
Requirements
Development environment | PLC libraries to include |
---|---|
TwinCAT 3.1.4024.11 | Tc3_DriveMotionControl |