This function block configures and starts position capture.
The function block returns the axis position when a trigger event occurs. The trigger parameters of the drive are provided by the device implementation.
Executing the function block MC_AbortTrigger while MC_TouchProbe is busy aborts the function for the referenced trigger input.
A new rising edge at the input Execute overwrites and restarts the active trigger function.
Library name: PLCopen MC part 1
Namespace: PLCO
Input |
Data type |
Description |
---|---|---|
Axis |
Axis_Ref |
Reference to the axis for which the function block is to be executed. |
Execute |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. This function block can be restarted while it is executed. The target values are overwritten by the new values at the point in time the rising edge occurs. |
ifTrigger |
MC_Trigger_Ref |
Edge to trigger position capture. Refer to MC_Trigger_Ref for a description. |
Output |
Data type |
Description |
---|---|---|
Done |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. oFALSE: Execution has not been finished, or an error has been detected. oTRUE: Execution terminated without an error detected. |
Busy |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. oFALSE: Function block is not being executed. oTRUE: Function block is being executed. |
CommandAborted |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. oFALSE: Execution has not been aborted. oTRUE: Execution has been aborted by another function block. |
Error |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. oFALSE: Function block is being executed, no error has been detected during execution. oTRUE: An error has been detected in the execution of the function block. |
ErrorID |
ET_Result |
This enumeration provides diagnostics information. |
RecordedPosition |
DINT |
Returns the captured position value in user-defined units when a trigger event occurs. Value range: -2147483648...2147483647 Default value: 0 |
Use the function block MC_AbortTrigger to abort the execution of the function block MC_TouchProbe.
ErrorId |
Cause |
Corrective |
---|---|---|
AxisInvalid |
No axis is specified for the input Axis or specified axis does not support the required function. For MC_Touchprobe and MC_AbortTrigger: Specified axis does not support capture. |
Connect the axis for which the function block is to be executed to the input Axis. For MC_Touchprobe and MC_AbortTrigger: Use an axis that supports capture. |
CaptureSourceAlreadyInUse |
The same capture source is used for two function blocks MC_TouchProbe. |
Only use a single MC_TouchProbe with a given capture source at a time. |
DeviceAccessFailed |
Error detected writing/reading via the service channel in Sercos phase 4. |
Reduce the frequency of access to the service channel with FB_WriteIDN and/or FB_ReadIDN. |
InvalidCaptureSource |
The specified capture source does not exist. |
Verify that the capture source is supported by the device. |
InvalidConfiguration |
The configuration for MC_TouchProbe is invalid. |
Verify the configuration for MC_Touchprobe. |
InvalidDigitalInputConfiguration |
The configuration of the digital input of the controller for the encoder is invalid. |
Verify correct configuration of the digital input for the encoder. |
NoBusCommunication |
The fieldbus is not in the state Operational (Sercos: phase 4). |
Verify that the fieldbus is in the state Operational (Sercos: phase 4) at the rising edge of the input Execute and during the execution. |
NoEncoderSupplyDetected |
No encoder power supply |
Ensure correct encoder power supply. |
RealTimeConfigurationOfParameterFailed |
The IDNs could not be mapped in the real-time channel. |
Verify that cyclic data can be used and that it is possible to map the IDNs for this device. |
UnexpectedReturnValue |
Indeterminable return value from system. |
Contact your Schneider Electric representative. |