打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
MC_TouchProbe
The MC_TouchProbe function block records an axis position at the point in time of a digital signal (measuring probe function). The position is usually not recorded directly in the PLC environment, but via an external hardware latch, and is thus very accurate and independent of cycle time. The function block controls this mechanism and determines the externally recorded position.
Prerequisites
The prerequisite for the position acquisition is suitable encoder hardware that is able to latch the recorded position. The following equipment is supported, for example: SERCOS drives, the Beckhoff AX2000 with SERCOS and Lightbus interfaces and the Beckhoff KL5101 Encoder Bus Terminals. The digital trigger signal is wired into this hardware and, independently of the PLC cycle, triggers the recording of the current axis position.
These end devices have to be configured to some extent so that a position recording is possible. For details, read Measuring probe evaluation with AX2xxx-B200 (Lightbus), Measuring probe evaluation with AX2xxx-B750 (SERCOS), AX5000 Probe Unit and AX5000 Function of a probe unit.
Restrictions
Irrespective of the hardware used, MC_TouchProbe can only record one edge of a probe unit at a time. If both edges are to be recorded, for example, then the block must be restarted after the first edge with a changed parameterization. Edges that follow one another in quick succession therefore cannot be recorded. In order to avoid this problem, you are referred to the extended function block MC_TouchProbe_V2.
Notice
After a measuring probe cycle has been initiated by a rising edge on the Execute input, this is only terminated if the outputs Done, Error or CommandAborted become TRUE. If the process is to be interrupted at an intermediate point in time, the function block MC_AbortTrigger with the same TriggerInput data structure must be called up. Otherwise no new cycle can be initiated.
Signal curve
Inputs
VAR_INPUT
Execute       : BOOL;
WindowOnly    : BOOL;
FirstPosition : LREAL;
LastPosition  : LREAL;
END_VAR
Execute
The command is executed with the rising edge and the external position latch is activated.
WindowOnly
If this option is active, only one position inside the window between FirstPosition and LastPosition is recorded. Positions outside the window are rejected and the external position latch is automatically newly activated. Only if the recorded position lies inside the window does Donebecome TRUE.
The recording window can be interpreted in terms of absolute or modulo values. In this connection the flag ModuloPositions in the structure TriggerInput is to be set accordingly. In the case of absolute value positions there is exactly one window. In the case of modulo value positions the window repeats itself within the modulo cycle defined in the axis parameters (e.g. 0 to360degrees).
FirstPosition
Initial position of the recording window, if WindowOnly is TRUE. This position can be interpreted as an absolute or modulo value. In this connection the flag ModuloPositionsis to be set appropriately in the structure TriggerInput (see below).
LastPosition
Final position of the recording window, if WindowOnly is TRUE. This position can be interpreted as an absolute or modulo value. In this connection the flag ModuloPositionsis to be set appropriately in the structure TriggerInput (see below).
Outputs
VAR_OUTPUT
Done             : BOOL;
Busy             : BOOL;
CommandAborted   : BOOL;
Error            : BOOL;
ErrorID          : UDINT;
RecordedPosition : LREAL;
END_VAR
Done
Becomes TRUE, if an axis position has been recorded successfully. The position is sent to the output RecordedPosition.
Busy
Becomes TRUE as soon as the function block is active, and becomes FALSE when it has returned to its initial state.
CommandAborted
Becomes TRUE if the process is interrupted by an external event, e.g. by the call up of MC_AbortTrigger.
Error
Becomes TRUE, as soon as an error occurs.
ErrorID
If the error output is set, this parameter supplies the error number
RecordedPosition
Axis position recorded at the point in time of the trigger signal
Inputs/outputs
VAR_IN_OUT
Axis         : AXIS_REF;
TriggerInput : TRIGGER_REF;
END_VAR
Axis
Axis data structure
TriggerInput
TRIGGER._REF data structure for describing the trigger source
MC_TouchProbe_V2
MC_TouchProbe_V2_00
The MC_TouchProbe_V2 function block records an axis position at the point in time of a digital signal (measuring probe function). The position is usually not recorded directly in the PLC environment, but via an external hardware latch, and is thus very accurate and independent of cycle time. The function block controls this mechanism and determines the externally recorded position.
The function of the MC_TouchProbe_V2 function block is similar that of the MC_TouchProbe function block. With several instances, however, it is possible to operate up to two probe units at the same time and in parallel to record the rising and falling signal edges each with an instance. Furthermore, a continuous mode is available that evaluates successive signal edges without renewed activation.
Prerequisites
TwinCAT version 2.11 R2 build 2022 or higher (before that use MC_TouchProbe)
The prerequisite for the position acquisition is suitable encoder hardware that is able to latch the recorded position. Support is offered for:
SERCOS drives
In contrast to MC_TouchProbe, the drive must be configured with an extended interface, in which the parameters S 0 0405 and S-0 0406 are included in the process image. See also ...
EtherCAT SoE drives (E.g. AX5000)
In contrast to MC_TouchProbe, the drive must be configured with an extended interface, in which the parameters S 0 0405 and S-0 0406 are included in the process image. See also ...
EtherCAT CoE drives
The drive must be configured with the parameter 0x60B9 (touch probe status) in the process image.
EL5101, KL5101
Latching of the C track and the digital input is possible. This hardware can only record one signal or edge at a time. Continuous mode is not supported.
The digital trigger signal is wired into this hardware and, independently of the PLC cycle, triggers the recording of the current axis position.
These end devices have to be configured to some extent so that a position recording is possible. Beckhoff EtherCAT drives can be configured with the System Manager. Note that the probe unit has to be configured with the "Extended NC Probe Unit" interface.
Notice
After a measuring probe cycle has been initiated by a rising edge on the Execute input, this is only terminated if the outputs Done, Error or CommandAborted become TRUE. If the process is to be interrupted at an intermediate point in time, the function block MC_AbortTrigger_V2 with the same TriggerInput data structure must be called up. Otherwise no new cycle can be initiated.
Signal curve
Inputs
VAR_INPUT
Execute : BOOL;
WindowOnly : BOOL;
FirstPosition : LREAL;
LastPosition  : LREAL;
END_VAR
Execute
The command is executed with the rising edge and the external position latch is activated.
WindowOnly
If this option is active, only one position inside the window between FirstPosition and LastPosition is recorded. Positions outside the window are rejected and the external position latch is automatically newly activated. Only if the recorded position lies inside the window does Donebecome TRUE.
The recording window can be interpreted in terms of absolute or modulo values. In this connection the flag ModuloPositions in the structure TriggerInput is to be set accordingly. In the case of absolute value positions there is exactly one window. In the case of modulo value positions the window repeats itself within the modulo cycle defined in the axis parameters (e.g. 0 to360degrees).
FirstPosition
Initial position of the recording window, if WindowOnly is TRUE. This position can be interpreted as an absolute or modulo value. In this connection the flag ModuloPositionsis to be set appropriately in the structure TriggerInput (see below).
LastPosition
Final position of the recording window, if WindowOnly is TRUE. This position can be interpreted as an absolute or modulo value. In this connection the flag ModuloPositionsis to be set appropriately in the structure TriggerInput (see below).
Outputs
VAR_OUTPUT
Done             : BOOL;
Busy             : BOOL;
CommandAborted   : BOOL;
Error            : BOOL;
ErrorID          : UDINT;
RecordedPosition : LREAL;
RecordedData : MC_TouchProbeRecordedData;
END_VAR
Done
Becomes TRUE, if an axis position has been recorded successfully. The position is sent to the output RecordedPosition.
Busy
Becomes TRUE as soon as the function block is active, and becomes FALSE when it has returned to its initial state.
CommandAborted
Becomes TRUE if the process is interrupted by an external event, e.g. by the call up of MC_AbortTrigger.
Error
Becomes TRUE, as soon as an error occurs.
ErrorID
If the error output is set, this parameter supplies the error number.
RecordedPosition
Axis position recorded at the point in time of the trigger signal
RecordedData
Data structure with complementary information relating to the logged axis position at the time of the trigger signal
Inputs/outputs
VAR_IN_OUT
Axis    : AXIS_REF;
TriggerInput : TRIGGER_REF;
END_VAR
Axis
Axis data structure
TriggerInput
TRIGGER_REF data structure for describing the trigger source
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
工控:C#如何控制运动卡
You're Doing It Wrong - ACM Queue
devicetree
Using the AXI DMA in Vivado
Keep It Simple: Towards a Simple Realtime Software Design
《数控系统安装与调试》典型实训项目(English version)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服