-

MC_TouchProbe

Image

The function block will output the axis position when a trigger event occurs. This function block is specifically designed to work with the high speed hardware latches on SERVOPACKs, option cards and modules that support latching. See MC_TRIGGER_REF for details on configuring the structure to capture the position for the desired input.

Parameters

* Parameter Data Type Description Default
VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in the Hardware Configuration (logical axis number).
E TriggerInput MC_TRIGGER_REF Reference to the trigger signal source. This structure identifies which latch signal on the hardware will be latched.
VAR_INPUT
B Execute BOOL Upon the rising edge, all other function block inputs are read and the function is initiated. To modify an input, change the value and re-trigger the execute input. FALSE
E WindowOnly BOOL Not supported; reserved for future use. FALSE
E FirstPosition LREAL Not supported; reserved for future use. LREAL#0.0
E LastPosition LREAL Not supported; reserved for future use. LREAL#0.0
VAR_OUTPUT
B Done BOOL Set high when the commanded action has completed successfully. If another block takes control before the action is completed, the Done output will not be set. This output is reset when Execute goes low.
B Busy BOOL Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted, or Error is true. In the case of a function block with an Enable input, a Busy output indicates the function is operating, but not ready to provide Valid information. (No Error)
E CommandAborted BOOL Set high if the TouchProbe functionality is aborted by MC_AbortTriger. This output is cleared with the same behavior as the Done output.
B Error BOOL Set high if an error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low.
E ErrorID UINT If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low.
B RecordedPosition LREAL Position where trigger event occurred in user units. In accordance with PLCopen, this output is only valid when the Done output is high.

Notes

  1. RecordedPosition will reflect the configuration of the axis, meaning that if the Load Type is configured as rotary (cyclic), RecordedPosition will be modularized to fit within the Machine Cycle. To use the unmodularized latch position on an axis configured for rotary mode, use MC_ReadParameter #1031 [LatchPositionNonCyclic] after the Done output goes high. If using two MC_TouchProbe function blocks for the same axis and the unmodularized position for the axis with TRIGGER_REF.ID=1 is required, use MC_ReadParameter #1033. 
  2. According to the PLCopen specification, when the Execute input goes low, all outputs are cleared. This means that the RecordedPosition will be set to zero. See the example below for a method to copy the RecordedPosition to a variable only when the Done bit is high.
  3. Refer to the appropriate Hardware manual for specifications regarding external encoders and local I/O latches
  4. Please check MC_TRIGGER_REF  for details about setting TRIGGER_REF based on the hardware latch to be detected. Master Configuration for Sigma servos and 050-1BA00 counter module are provided.
  5. MC_AbortTrigger is required to reset latching after any MC_TouchProbe error. For example, if an incorrect trigger reference was used to trigger the probe function, errorID 4396 would be generated. MC_AbortTrigger will have to be successfully executed beforeMC_TouchProbe can be used again.
  6. If the servo configuration uses the servo (module 1 ) and the feedback option card (module 2) for touchprobe functionality, the first module to use the touchProbe functionality will have access to the touchprobe until a PLC restart.

Related Function Blocks

MC_AbortTrigger: Aborts function blocks associated with trigger events.

Y_AX_ProductBuffer : Uses and provides an array of recorded latch positions.

Y_AX_Home_LS_Pulse

Y_AX_HomeTouchProbe

Y_AX_FeedToLength

Y_CA_CamSlave_FeedToLength


Error Description

See the Function Block ErrorID List

Example

If the following logic is programmed on the iC9226 controller with an Sigma-7 servo, the MC_TouchProbe block will record the position of the servo axis (MyAxis) when the input connected to pin 10 is fired. The ArmLatch bit causes MC_TouchProbe to refire as soon as it reports a latch (Not Busy), effectively keeping the function ready to capture any latch at any time.


TriggerData.Bit:=UINT#1; (* EXT1 on SERVOPACK*)

TriggerData.ID:=UINT#0;



Application Example


















 


This help information is valid for iCube Engineer Online Help 2025.6

Copyright © 2025 YASKAWA EUROPE GmbH and © 2025 YASKAWA America, Inc.