<< 点击显示目录 >> 主页
mappVision帮助助手 > 机器视觉帮助 > mapp Vision > 编程 > 库 > 核心库 > ViBase > 功能块 功能说明 |
功能块 ViBaseAxisBasedAcquisition 根据轴位置计算机器视觉相机图像采集的时间戳,并在这些时间采集图像。位置直接从相关视觉组件当前使用的视觉应用程序中配置的轴读取。
视觉组件的引用(参见ViComponentType)设置在功能块的输入 MpLink 上。
使用要求
•在所使用的视觉应用程序的图像采集配置中,必须选择一个有效的 mapp 轴组件作为 "触发源"。
•mapp 运动任务类的公差(因为指定的轴位置)必须设置为 "0"。
•所使用的轴必须已被引用,并且在启用功能块时不允许被引用。
•每个视觉组件只允许使用一个功能块。
•功能块运行时不允许更改视觉应用程序。
•不支持功能块与 mapp Vision HMI 应用程序并行操作。
•ARsim 中不支持功能块。
启用功能块后,将检查输入参数、相关配置参数、轴状态和摄像机状态。如果这些参数有效,则开始循环读取轴位置,功能块根据轴位置和指定的 "AcquisitionPositions "计算时间戳。然后,功能块通过设置相应的循环图像采集参数ImageAcquisition和DelayNetTime(n),在计算出的时间戳上进行图像采集。因此,这些数据点在 I/O 映射中不再可见。
属性和关系如下图所示。
在下列情况下,功能块会报错
•轴尚未初始化或初始化失败。
•摄像机未就绪。
•使用了 mapp Vision HMI 应用程序。
如果禁用功能块,图像采集将被重置(即丢弃没有采集图像的时间戳)。
将输入 "更新 "设置为 "真 "后,将在下一个(轴)周期开始时更新下列输入参数。不可能在周期内更新。
•采集参数.周期
•采集参数.采集位置
•AdvancedParameters.AddPositionCompensation(添加位置补偿
•高级参数.添加输出补偿
在更新过程中,不允许更改输入端 AcquisitionParameters.StartPosition 和 AdvancedParameters.DisableNegativeDirection,否则功能块将报错。
当功能块处于激活状态时,如果是周期轴,则不允许修改轴的周期。也不允许修改测量分辨率。
图功能块 ViBaseAxisBasedAcquisition
Function block ViBaseAxisBasedAcquisition calculates timestamps for image acquisitions of the machine vision camera based on axis positions and acquires images at these times. The positions are read directly from the axis configured in the currently used vision application of the associated vision component.
The reference to the vision component (see ViComponentType) is set on input MpLink of the function block.
Requirements for use:
•A valid mapp Axis component must be selected as "TriggerSource" in the image acquisition configuration of the vision application used.
•The tolerance of the mapp Motion task class (because of the specified axis position) must be set to value "0".
•The axis used must already be referenced and is not permitted to be referenced while the function block is enabled.
•Only one function block is permitted per vision component.
•Changing the vision application is not permitted while the function block is in operation.
•Parallel operation of the function block and the mapp Vision HMI application is not supported.
•The function block is not supported in ARsim.
After the function block is enabled, the input parameters, relevant configuration parameters, axis status and camera status are checked. If these are valid, cyclic reading of the axis position is started and the function block calculates timestamps based on the axis position and specified "AcquisitionPositions". The function block then carries out image acquisitions at the calculated timestamps by setting the corresponding cyclic image acquisition parameters ImageAcquisition and DelayNetTime(n). These data points are therefore no longer visible in the I/O mapping.
The properties and relationships are shown in the figure below.
The function block reports an error if
•The axis is not yet initialized or initialization has failed.
•The camera is not ready.
•The mapp Vision HMI application is used.
If the function block is disabled, the image acquisition is reset (i.e. a timestamp that did not result in an image acquisition is discarded).
By setting input Update to TRUE, the following input parameters are updated at the beginning of the next (axis) period. An update within a period is not possible.
•AcquisitionParameters.Period
•AcquisitionParameters.AcquisitionPositions
•AdvancedParameters.AddPositionCompensation
•AdvancedParameters.AddOutputCompensation
Inputs AcquisitionParameters.StartPosition and AdvancedParameters.DisableNegativeDirection are not permitted to be changed during the update; the function block reports an error in this case.
While the function block is active, the period of the axis is not permitted to be modified in the case of a periodic axis. The measurement resolution is also not permitted to be modified.
Fig.: Function block ViBaseAxisBasedAcquisition