MC_TouchProbe

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Arms a Fast InputClosed The inputs are taken into account at each cycle depending on the system periodicity (i.e., each millisecond). Under certain circumstances, this can be insufficient when more accuracy is needed or if a quick response is required from the system. To fill the gap, a drive may have some Fast Input connections (generally one or two). When an event happens that triggers a Fast Input (e.g., when a sensor sends a rising edge), the detection of a signal occurs faster. This can be 1000 times more accurate than the system periodicity. The timestamp associated with this input can be provided to the IPC to take corrective action. and returns the latchedClosed The control word is used to activate the drive's latch status machine. The latch control word is processed independently of the EtherCAT® bus cycle. The status word is used to return the drive's latch status. positionClosed Position means a point in space which is described by different coordinates. Depending on the used system and transformation it can consist of a maximum of six dimensions (coordinates).This means three Cartesian coordinates in space and coordinates for the orientation. In ACS there can be even more than six coordinates. If the same position is described in different coordinate systems the values of the coordinates are different. when the Fast Input event occurs.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

0, 1

N/A

No default

On the rising edgeClosed The transition of a digital signal from low to high. AKA: positive edge., request to arm the input to return the latched position.

Axis

AXIS_REF

1, 256

N/A

N/A

Selects the axis the position is latched to.

TriggerInput

TRIGGER_REF

See Description.

N/A

No default

WindowOnly

BOOL

No range

N/A

No default

EnablesClosed Enable signal for the drive, Hardware-Enable with 24V signal to X8, Software-Enable command by setup Software, fieldbus or permanently set. Both are required for enabling the drive. a position latching window.

  • When this input is set, a window is defined by the FirstPosition and LastPosition inputs.
  • Any Fast Input event that occurs outside the window is ignored.
  • The first Fast Input event that occurs within the window latches the axis position.

FirstPosition

LREAL

No range

User units

No default

See the WindowOnly Description about how this input and the LastPosition input define the window.

  • This input is only applicable when the WindowOnly input is high.
  • If the WindowOnly input is low, this input is ignored.

LastPosition

LREAL

No range

User units

No default

See the WindowOnly Description about how this input and the FirstPosition input define the window.

  • This input is only applicable when the WindowOnly input is high.
  • If the WindowOnly input is low, this input is ignored.

Elements

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

 

 

  • Function block has completed.
  • The RecordedPosition output is valid.

Busy

BOOL

 

 

Indicates the specified input is:

  • Arming or is armed.
  • Waiting for the trigger and recording of the position to occur.

CommandAborted

BOOL

 

 

Indicates the move was aborted.

A TriggerAbort function block has executed and canceled this function.

Error

BOOL

 

 

The function block has not completed successfully due to an error.

The ErrorID output indicates the type of error.

See PLCopen Function Block ErrorIDs.

ErrorID

INT

 

 

  • When the Error output is high, this output indicates the type of error.
  • When the Error output is low, this output is undefined.

RecordedPosition

LREAL

 

User units

  • When the Done output goes high, this output returns the latched position.
  • When the Done output is low, this output is undefined.

Remarks

  • This function or function block does not generate any motion.
  • See Function Blocks - General Rules about how inputs and outputs work.
  • This function block captures an axis position
  • When the Execute input transitions from low to high, the control requests the drive to arm its Fast Input to latch the axis position when a Fast Input occurs.
  • The Axis input specifies which axis's position to latch and the TriggerInput input specifies which Fast Input to use and whether to trigger on the rising or falling edge of the Fast Input.
  • When the Fast Input event occurs, the drive latches the axis's position.
    • This function block then returns the latched position at the RecordedPosition output and set the Done output high.
    • This process can be canceled with the AbortTrigger function block.
  • If the WindowOnly input is high, the FirstPosition input and the LastPosition input define a window in which a Fast Input is accepted.
  • Any Fast Input events that occur outside the window is ignored.

Example 1

If First Position ≤ LastPosition, the window in which a Fast Input is accepted is:

FastInputPosition ≥ FirstPosition AND FastInputPosition ≤ LastPosition

Example 2

If First Position > LastPosition, the window in which a Fast Input is accepted is:

FastInputPosition ≥ FirstPosition OR FastInputPosition ≤ LastPosition

This image shows the ladder diagram view of the MC_TouchProbe function block:

Figure 1: MC_TouchProbe

Fast Homing - Inputs

See these topics for more information:

Usage

This function block can be used to:

  • Perform registration
  • Determine the position of a product
  • Measure product length

Limitations

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

(* MC_TouchProbe ST example *)
TriggerInputRef.InputID := 1; //configure InputID
TriggerInputRef.Direction := 1; //configure Direction
TriggerInputRef.TrigID := 0; //configure TrigID
TriggerInputRef.TrigMode := 0; //Capture trigger based on distributed clockClosed Clock signal. time
Inst_MC_TouchProbe( ArmProbe, Axis1, TriggerInputRef, FALSE,0.0, 0.0 );
//Inst_MC_TouchProbe is an instance of MC_TouchProbe function block
ProbeIsDone := Inst_MC_TouchProbe.Done; //store Done output into a user defined variable
ProbeValue := Inst_MC_TouchProbe.RecordedPosition; //store RecordedPosition output into a user defined variable

See Also

MC_AbortTrigger