Touch probe sources
Touch probe of the drive
When the touch probe function of the drive is used, a "high-precision" position detection takes place. In order to optimally use this function, the relevant drive data should be mapped as process data. If this is not the case, the touch probe signals are accessed via SDO. The disadvantage is the that events are not immediately available in the control and that data may get lost in case of a continuous measurement.
- Use/configuration MC_TRIGGER_REF :
The drive controller provides two pieces of information for a TP event that has occurred:
-
TP Position
-
TP Timestamp
If only the position of the associated motion axis is used or evaluated in the application for the TP event, it is sufficient to map the TP position associated with the event.
-
The time stamp (dwRecTimeStamp) displayed in the structure L_MC1P_TpReceiveData is calculated in the motion axis.
If the TP event is used in the application independently of the position of the associated motion axes, it is advisable to map the TP timestamp associated with the event to achieve greater accuracy. In this case, mapping the TP position is not necessary.
-
The TP position is then calculated in the motion axis based on the timestamp and the actual position.
Overview of drive touchprobe events and the associated process data
|
Name |
TP Controlword |
TP Statusword |
TP Position |
TP Timestamp |
|---|---|---|---|---|
|
DigIn 1 (positive edge) or zero pulse |
0x60B8 / 0 |
0x60B9/0 |
0x60BA/0 |
0x2D01/1 |
|
DigIn 1 (negative Edge) |
0x60BB/0 |
0x2D01/2 |
||
|
DigIn 2 (Positive Edge) or Zeropulse |
0x60BC/0 |
0x2D01/3 |
||
|
DigIn 2 (negative Edge) |
0x60BD/0 |
0x2D01/4 |
||
|
DigIn 3 (Positive Edge) or Zeropulse |
0x2D02/1 |
0x2D02/2 |
0x2D03/1 |
0x2D01/5 |
|
DigIn 3 (negative Edge) |
0x2D03/2 |
0x2D01/6 |
||
|
DigIn 4 (Positive Edge) or Zeropulse |
0x2D03/3 |
0x2D01/7 |
||
|
DigIn 4 (negative Edge) |
0x2D03/4 |
0x2D01/8 |
External touch probe source
When an external touch probe source is used (e..g Fast I/O), a "high-precision" position detection takes place. The ExternalDelayComp variable serves to carry out an additional dead time compensation.
- Use/configuration MC_TRIGGER_REF :
Example
VAR
stTriggerRef1: MC_TRIGGER_REF; // structure
MC_TouchProbe1: MC_TouchProbe; // Fb END_VAR
Program:
...
stTriggerRef1.TouchProbeSource := 2 ; // selection source touch probe event
stTriggerRef1.TouchProbeChannel := 1 ; // selection touch probe channel (only relevant with TouchProbeSource = 1 or 2)
stTriggerRef1.TouchProbeSignal := 1 ; // selection touch probe signal (only relevant with TouchProbeSource = 1)
stTriggerRef1.TouchProbeEdge := 1 ; // 1 configuration of the edge evaluation
stTriggerRef1.TouchProbeMode := 1 ; // selection touch probe mode
stTriggerRef1.ExternalDelayComp := 0 ;
stTriggerRef1.ExternalTPSource := FastIO_InRef;
MC_TouchProbe1(
Axis:= i700_Motion_Axis,
TriggerInput:= stTriggerRef1,
Execute:= ,
WindowOnly:= ,
FirstPosition:= ,
LastPosition:= ,
Done=> ,
Busy=> ,
CommandAborted=> ,
Error=> ,
ErrorID=> ,
ActivationLevel=> ,
ValueStored_PosEdge=> ,
RecPosition_PosEdge=> ,
ValueStored_NegEdge=> ,
RecPosition_NegEdge=> ,
NewValueStored_PosEdge=> ,
NewValueStored_NegEdge=> ,
RecData=> );
...
Simple digital input
When a "normal" I/O is used as touch probe source, no "high-precision" position detection takes place. The position of the current cycle is output. The ExternalDelayComp variable is used to carry out an additional dead time compensation.
- Use/configuration MC_TRIGGER_REF :
|
Name |
Configuration |
|
|---|---|---|
|
TouchProbeSource |
3: Simple digital input |
|
|
ExternalTPDigIn |
Pointer to Boolean input
|
|
|
Note!
Direct access to an address of the I/O image is not possible; the input must be copied to a variable previously:
|
Externally connected drive as touch probe source for any axis (e.g. encoder)
When using the touch probe function for an external encoder connected to the FB input Axis, a "highly accurate" position detection can be carried out via a touch probe event of another axis . To be able to use this function, the axis must be transferred as a touch probe source via ExternalTPFromAxis. In addition, the relevant drive data must be mapped as process data. In this combination, it makes sense to include the associated timestamp of the TP event in the mapping.