跳到主要内容

Overview Node-RED 自定义块

本参考文档提供在 OV80i Node-RED 环境中可用的所有 Overview 自定义节点的技术规格。这些专用节点扩展了 Node-RED 的标准功能,以支持视觉检测工作流。

Overview Custom Nodes Architecture

OV80i 含有预装的自定义节点,专为机器视觉应用设计。这些节点为检测操作提供标准化接口,并确保与工业自动化系统的兼容性。

节点类别:

  • Inspection Logic Nodes - 处理并评估检测结果
  • Data Processing Nodes - 格式化并转换检测数据
  • I/O Control Nodes - 与硬件输入和输出接口
  • System Control Nodes - 管理相机功能与状态

All Block Outputs Node

ABO

目的与功能

“All Block Outputs”模块是统一管线系统中的关键组件。它负责在每次相机捕获后输出数据。它汇总并处理所有 AI 块数据,确保输出信息全面且详细。

功能

本模块以 JSON 对象形式输出数据。数据包含来自多种 AI 处理过程的信息,如检测、对齐、分类和分割。每次捕获的输出都经过精心结构化,以为检测过程提供有价值的洞察。

数据字段

检查数据

  • Inspection ID: 一个滚动的 16 位整数,在每次检测时递增
  • Inspection Time: 捕获的 ISO 8601 格式时间戳
  • Image URL: 捕获图像的 HTTP URL(jpg)

对齐数据

  • Success: 指示部件是否已成功对齐
  • Center Location X: 对齐部件中心的 x 坐标
  • Center Location Y: 对齐部件中心的 y 坐标
  • Confidence: 对齐置信度(0-1)
  • Matched Angle: 相对于模板的匹配角度

分类数据

Predictions:

  • ROI ID: 预测区域感兴趣区域 (ROI) 的 ID
  • ROI Name: 预测 ROI 的名称
  • Confidence: 预测类别的置信度(0-1)
  • Predicted Class: 预测类别的名称

分割数据

  • Confidence Score Threshold: 用于处理分割模型输出的阈值(0-1)

Blob:

  • Center X: Blob 中心的 x 坐标
  • Center Y: Blob 中心的 y 坐标
  • Pixel Count: Blob 的总像素数(面积)
  • Major Axis Length: 主轴在像素中的长度
  • Minor Axis Length: 次轴在像素中的长度
  • ROI ID: 预测 ROI 的 ID
  • ROI Name: 预测 ROI 的名称
  • Predicted Class: 该 Blob 的预测类别名称

Classes:

  • Predicted Class: 类别名称
  • Number of Blobs: 该类别中的 Blob 数量
  • Pixel Count: 该类别所有 Blob 的总像素数(面积)

分类块逻辑节点

CB

目的与功能

本节点(“Classification Block Logic”)用于在分类块输出上设定并评估规则。该节点的输出为布尔值(true/false),取决于是否所有规则通过还是任一规则通过。

功能

默认情况下若未设置任何规则,当所有检查返回的分类均为“pass”时,输出为 true;若任一分类不是“pass”,输出将为 false。该节点通过规则设置提供自定义能力,使对分类结果应用更精确的条件成为可能。

关键特性

  • 允许在分类块输出上设置特定规则
  • 基于规则评估的布尔输出(true/false)
  • 默认行为确保当所有检查都返回“pass”时输出为 true,若任一不为“pass”则输出为 false
  • 可配置的置信度阈值,以实现更精确的规则设置
  • 与其他组件暂无直接连接,便于未来灵活集成

使用场景

  • 通过验证所有检查输出是否符合定义的“pass”标准,确保质量控制的一致性
  • 可自定义的规则设置,以适应各种检查要求
  • 为自动化决策过程提供清晰的通过/不通过输出

PLC 节点数据格式化

FDPN

目的与功能

“PLC Format Node”旨在将块输出格式化为默认的 PLC 格式,以确保与各种 PLC(可编程逻辑控制器,Programmable Logic Controller)系统的兼容性,遵循其特定的字节序要求。

功能

该节点将块的输出数据格式化为目标 PLC 系统所需的字节序。常用的两种字节序是:

  • Little-endian: 通常由 Allen-Bradley PLC 使用
  • Big-endian: 通常由 Siemens PLC 使用

通过正确格式化数据,该节点可实现与相应 PLC 系统的无缝集成与通信,促进数据处理的准确性与可靠性。

关键特性

  • 将块输出格式化为默认的 PLC 格式
  • 支持 Allen-Bradley PLC 的小端字节序
  • 支持 Siemens PLC 的大端字节序
  • 确保与多种 PLC 系统的兼容性与可靠的数据交换
  • 提高自动化控制过程的效率与准确性

使用场景

  • 将 AI 与自动化系统的数据输出与 Allen-Bradley 和 Siemens PLC 集成
  • 确保字节序正确转换,以便 PLC 正确解释数据
  • 在工业自动化环境中简化块输出与 PLC 之间的通信

最终通过/不通过输出节点

FDPN

目的与功能

“最终通过/不通过输出节点”用于设定并存储检查的最终通过/不通过状态。该节点确保检查结果被清晰地定义、传达并以布尔值形式存档。

Functionality

This node processes the results of an inspection and outputs a boolean value indicating the overall state:

  • True: Indicates that the inspection has passed
  • False: Indicates that the inspection has failed

This node outputs the pass/fail state and stores the result for future reference and analysis. This node simplifies the decision-making process in automated inspection systems by providing a clear and recorded pass/fail output. It also ensures that all results are archived for traceability and quality control purposes.

Key Features

  • Sets and stores the final pass/fail state of an inspection
  • Outputs a boolean value: false for fail and true for pass
  • Ensures clear and unambiguous communication of inspection results
  • Archives inspection results for future reference and analysis
  • Enhances the efficiency of automated quality control processes
  • Integrates seamlessly with other nodes and components in the inspection system

Usage Scenarios

  • Determining and storing the outcome of quality control inspections in manufacturing
  • Automating decision-making processes based on inspection results
  • Providing a straightforward pass/fail output for integration with downstream systems and processes
  • Ensuring traceability and quality control through archived inspection results

Save to Library Node

savetolibrary

Purpose and Functionality

The "Capture Save Decision Node" determines whether a captured image should be saved to the library. This node outputs a boolean value to indicate the same decision.

Functionality

This node processes the capture data and outputs a boolean value indicating whether the capture should be saved:

  • True: Indicates that the capture should be saved to the library
  • False: Indicates that the capture should not be saved

By providing a clear save/no-save decision, this node helps manage storage resources efficiently and ensures that only relevant captures are archived for future use.

Key Features

  • Determines whether a capture is saved to the library
  • Outputs a boolean value: false for do not save and true for save
  • Ensures efficient management of storage resources
  • Helps in archiving relevant captures for future reference and analysis
  • Integrates seamlessly with other nodes and components in the capture and storage system

Usage Scenarios

  • Deciding whether to save captured images during automated inspections
  • Managing storage resources by only saving relevant captures
  • Providing a straightforward save/no-save output for integration with downstream systems and processes
  • Ensuring important captures are archived for traceability and quality control

Capture Metadata Node

CMN

Purpose and Functionality

The "Metadata Assignment Node" is designed to set the metadata associated with each capture. This metadata can include information such as a serial number, part number, or other relevant details. The assigned metadata will appear in the library alongside the captured data.

功能

此节点允许为每次捕获添加元数据。元数据以键为字符串、值可以是字符串或数字的对象形式进行结构化。这样可以确保每次捕获都附带重要的上下文信息,便于将来识别和引用。

关键特性

  • 为每次捕获分配元数据
  • 元数据可包含序列号、部件号或其他相关信息
  • 结构为键为字符串、值为字符串或数字的对象
  • 确保库中的捕获数据附带上下文信息
  • 提高捕获数据的可追溯性和识别性
  • Capture Metadata 仅当存在 Pass/Fail 节点时才会存储到库中

使用场景

  • 向捕获图像添加序列号、部件号或其他标识符
  • 为存储在库中的捕获提供额外的上下文和信息
  • 在分析和回顾过程中便于更易识别和引用捕获
  • 将元数据与捕获与存储系统中的其他节点和组件集成

输出节点

CMN

目的与功能

“Digital Output Node”旨在控制 OV80i 的 M12 连接器上的输出引脚。该节点根据布尔值将引脚开启或关闭。

功能

  • True: 将引脚打开
  • False: 将引脚关闭

数字输出节点在操作上简单直接,且不具备可编辑属性,确保简单性与可靠的性能。

针脚配置

针脚 #引出线描述
5输出 0
11输出 0
12输出 1
备注

DO 本身没有脉冲配置,因此需要添加触发器来创建脉冲。

关键特性

  • 控制 OV80i 的 M12 连接器上的输出引脚
  • 布尔值决定引脚的状态(ON/OFF)
  • 无可编辑属性,确保简单性与可靠性

使用场景

  • 通过开启或关闭特定输出引脚来实现自动化控制过程
  • 与其他控制系统集成以实现协同操作
  • 为 OV80i 提供用于数字输出控制的简洁界面

输入节点

input

目的与功能

输入节点读取 OV80i 的 M12 连接器上的数字输入状态,允许外部信号在 Node-RED 流中触发动作。

关键特性

  • 实时输入监控
  • 外部设备集成
  • 硬件信号检测

板载状态 LED 节点

OBL

目的与功能

“板载状态 LED 节点”旨在控制位于 OV80i 顶部的用户自定义板载状态 LED(LED 3)。该 LED 可以显示多种颜色,包括黄、橙、绿。

功能

  • True: 将 LED 打开
  • False: 将 LED 关闭

该节点提供用于控制状态 LED 的简单界面,便于指示设备的不同状态。

LED Colors

  • 黄色
  • 橙色
  • 绿色

Key Features

  • 控制 OV80i 上的板载状态 LED
  • 布尔值决定 LED 的状态(ON/OFF)
  • 支持多种 LED 颜色:黄色、橙色和绿色
  • 提供设备状态的可视化指示

Usage Scenarios

  • 指示 OV80i 的运行状态
  • 为各种系统状态或警报提供可视化反馈
  • 通过清晰且可见的状态指示器提升用户界面