MCA_TouchProbeOBIO (FB)

FUNCTION_BLOCK MCA_TouchProbeOBIO

A binary input can be used to save a counter value at rising edge.

It is possible to use the MCA_TouchProbeOBIO with respect to CounterValue from: OBIO_PTOMotionKernel (FB) or OBIO_PTOSingleLineMotionKernel (FB)
precondition

the respective channel is configured as touch trigger.

precondition

OBIO_PTO_Parameter.Create_PTO_Position=TRUE. Otherwise, a touch trigger has to be applied to the counter which is used to provide DRIVE_ACTUAL_POSITION

Up to 4 touch trigger are possible.

The counter value is saved independently from PLC cycle with a delay of <10 microseconds.

Note

This block should just be called once per cycle otherwise inconsistent values could be send to PRU, if send twice in short time.

InOut:

Scope

Name

Type

Comment

Input

Enable

BOOL

will enbale the touch trigger with a rising edge

Channel

BYTE

0..3, refers to the Touchprobe channel (different from PTO channel)

Invert

BOOL

by default, use rising edge. With Invert=TRUE, falling edge is used

ContinuousMode

BOOL

with ContinuousMode=TRUE and Enable=TRUE, the touch trigger will reenable itself automatically.

In this mode, the output Valid will be true for just 1 cycle.

With ContinuousMode=FALSE, a rising edge at Enable is required to retrigger the next TouchProbe, this will set output Valid=TRUE until Enable=FALSE.

Also with ContinuousMode=TRUE, it is required to call the block every PLC cycle.

Axis

Axis_Ref

Reference to PTO Axis.

Output

Valid

BOOL

Indicates CounterTouchPosition is ready. Will be TRUE when TouchProbe is found, just 1 cycle with ContinuousMode=TRUE

Busy

BOOL

Error

BOOL

PTO_ErrorID

AC500_OnboardIO.Error_ID

Error code. For error details refer to AC500_OnboardIO library Enum Error_ID

TouchPosition

LREAL

[u] captured counter value, valid with ReadyTouch.