MCA_TouchProbeOBIO (FB)
FUNCTION_BLOCK MCA_TouchProbeOBIO
A binary input can be used to save a counter value at rising edge.
- 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.
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
EnableBOOLwill enbale the touch trigger with a rising edge
ChannelBYTE0..3, refers to the Touchprobe channel (different from PTO channel)
InvertBOOLby default, use rising edge. With Invert=TRUE, falling edge is used
ContinuousModeBOOLwith 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.
AxisAxis_RefReference to PTO Axis.
Output
ValidBOOLIndicates CounterTouchPosition is ready. Will be TRUE when TouchProbe is found, just 1 cycle with ContinuousMode=TRUE
BusyBOOLErrorBOOLPTO_ErrorIDAC500_OnboardIO.Error_IDError code. For error details refer to AC500_OnboardIO library Enum Error_ID
TouchPositionLREAL[u] captured counter value, valid with ReadyTouch.