Overview Node-RED 自定义节点
本参考提供 OV20i Node-RED 环境中可用的所有 Overview 自定义节点的技术规格。这些专用节点扩展了标准 Node-RED 功能,以支持视觉检测工作流。
Overview Node-RED 自定义节点 架构
OV20i 包含为机器视觉应用专门设计的预装自定义节点。这些节点为检查操作提供标准化接口,并确保与工业自动化系统的兼容性。
Node Categories:
- Inspection Logic Nodes - 处理并评估检测结果
- Data Processing Nodes - 格式化并转换检测数据
- I/O Control Nodes - 与硬件输入输出接口
- System Control Nodes - 管理摄像头功能与状态
All Block Outputs 节点
目的与功能
“All Block Outputs”模块是统一流水线系统中的关键组件。它负责在每次摄像头捕获后输出数据。它汇集并处理所有 AI block 数据,确保输出全面且详细。
功能
该模块输出的数据为 JSON 对象。数据包含来自各 AI 处理流程的信息,如 inspection、alignment、classification 和 segmentation。每次捕获的输出都经过精心结构化,以为检测过程提供有价值的洞见。
数据字段
检查数据
- 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(Region of Interest)的 ID
- ROI Name: 预测 ROI 的名称
- Confidence: 预测类别的置信度(0-1)
- Predicted Class: 预测类别的名称
分割数据
- Confidence Score Threshold: 用于处理 segmentation 模型输出的阈值(0-1)
Blobs:
- 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 的总像素数(面积)
Classification Block Logic Node
Purpose and Functionality
The "Classification Block Logic" node is designed to set and evaluate rules on classification block outputs. The output of this node is a boolean value (true/false), which depends on whether all rules pass or any rule passes.
“Classification Block Logic” 节点旨在对 classification block 输出设置并评估规则。该节点的输出为布尔值(true/false),取决于所有规则是否通过或任一规则通过。
Functionality
If no rules are set by default, the output will be true if all inspections return the "pass" class. If any class is not "pass," the output will be false. This node allows for customization through rule setting, enabling more specific criteria to be applied to the classification results.
如果默认未设置任何规则,所有检测返回 "pass" 类别时,输出将为 true;如果任一类别不是 "pass",输出将为 false。通过规则设置,该节点允许进行自定义,从而对分类结果应用更具体的判定标准。
Key Features
- Allows setting of specific rules on classification block outputs -> 允许在 classification block 输出上设置特定规则
- Boolean output based on rule evaluation (true/false) -> 基于规则评估的布尔输出(true/false)
- Default behavior ensures output is true if all inspections return "pass" and false if any do not -> 默认行为确保若所有检测返回 "pass" 则输出为 true,若有任一不是则输出为 false
- Configurable confidence threshold for more precise rule setting -> 可配置的置信度阈值,以实现更精确的规则设置
- No immediate connections to other components, allowing for flexible future integration -> 与其他组件没有直接连接,便于未来灵活集成
Usage Scenarios
- Ensuring consistent quality control by verifying that all inspection outputs meet the defined "pass" criteria -> 通过验证所有检查输出是否符合定义的 "pass" 标准,确保质量控制的一致性
- Customizable rule settings to adapt to various inspection requirements -> 自定义规则设置以适应各种检测需求
- Providing clear pass/fail output for automated decision-making processes -> 提供清晰的通过/不通过输出,便于自动化决策过程
Format Data for PLC Node
Purpose and Functionality
The "PLC Format Node" is designed to format block outputs to the default PLC format. This ensures compatibility with various PLC (Programmable Logic Controller) systems by adhering to their specific byte order requirements.
“PLC Format Node” 旨在将块输出格式化为默认的 PLC 格式。这确保与各种 PLC(可编程逻辑控制器)系统的兼容性,通过遵循它们各自的字节序要求。
Functionality
This node formats data outputs from blocks, converting them into the appropriate byte order based on the target PLC system. The two main types of byte orders used are:
- Little-endian: Typically used by Allen-Bradley PLCs
- Big-endian: Typically used by Siemens PLCs
该节点将来自块的数据输出格式化,基于目标 PLC 系统将其转换为相应的字节序。使用的两种主要字节序为:
- Little-endian: 通常由 Allen-Bradley PLCs 使用
- Big-endian: 通常由 Siemens PLCs 使用
Key Features
- Formats block outputs to the default PLC format -> 将块输出格式化为默认的 PLC 格式
- Supports little-endian byte order for Allen-Bradley PLCs -> 支持 Allen-Bradley PLCs 的 little-endian 字节序
- Supports big-endian byte order for Siemens PLCs -> 支持 Siemens PLCs 的 big-endian 字节序
- Ensures compatibility and reliable data exchange with various PLC systems -> 确保与各种 PLC 系统的兼容性与可靠数据交换
- Enhances the efficiency and accuracy of automated control processes -> 提高自动化控制过程的效率与准确性
Usage Scenarios
- Integrating data outputs from AI and automation systems with Allen-Bradley and Siemens PLCs -> 将 AI 与自动化系统的数据输出与 Allen-Bradley 和 Siemens PLCs 集成
- Ensuring proper byte order conversion for accurate data interpretation by PLCs -> 确保字节序转换正确,以便 PLCs 能准确解释数据
- Streamlining communication between block outputs and PLCs in industrial automation setups -> 精简/简化工业自动化设置中块输出与 PLCs 之间的通信
Final Pass/Fail Output Node
Purpose and Functionality
The "Final Pass/Fail Output Node" is designed to set and store an inspection's final pass/fail state. This node ensures the inspection outcome is clearly defined, communicated, and archived as a boolean value.
Functionality
This node processes the results of an inspection and outputs a boolean value indicating the overall state:
- True: 表示该次检查已通过
- False: 表示该次检查未通过
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 表示失败,true 表示通过
- 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
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: 表示应将捕获保存到库中
- False: 表示不应保存捕获
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 表示不保存,true 表示保存
- 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
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 节点时才存储到库中。
使用场景
- 将序列号、零件号或其他标识符添加到捕获的图像中
- 为存储在库中的捕获提供额外的上下文和信息
- 在分析和回顾期间,便于对捕获结果进行更易识别和引用
- 将元数据与捕获和存储系统中的其他节点和组件集成
输出节点
目的与功能
“Digital Output Node” 旨在控制 OV20i 的 M12 连接器上的输出引脚。该节点根据信号布尔值将引脚打开或关闭。
功能
- True: 将引脚开启
- False: 将引脚关闭
数字输出节点在操作上简单直观,且不具备可编辑属性,确保一致性和可靠性。
针脚配置
针脚编号 | 引线 | 描述 |
---|---|---|
10 | 紫罗兰 | 输出 1 |
11 | 灰色/粉红色 | 输出 2 |
DO 本身没有脉冲配置,因此需要添加一个触发器来创建一个脉冲。
关键特性
- 控制 OV20i 的 M12 连接器上的输出引脚
- 布尔值决定引脚的状态(ON/OFF)
- 无可编辑属性,确保简便性和可靠性
使用场景
- 通过开启或关闭特定输出引脚来实现自动化控制流程
- 与其他控制系统协同运作以实现协同操作
- 为 OV20i 提供用于数字输出控制的简单界面
输入节点
目的与功能
输入节点读取 OV20i 的 M12 连接器上的数字输入状态,从而允许外部信号在 Node-RED 流中触发动作。
关键特性
- 实时输入监控
- 外部设备集成
- 硬件信号检测
板载状态 LED 节点
目的与功能
“Onboard Status LED Node” 旨在控制位于 OV20i 顶部的板载状态 LED。该 LED 能显示多种颜色,包括黄色、橙色和绿色。
功能
- True: 将 LED 点亮
- False: 将 LED 关闭
该节点提供一个简单的界面,用于控制板载状态 LED,便于指示设备的不同状态。
针脚配置
针脚编号 | 引线 | 描述 |
---|---|---|
10 | 紫罗兰 | 输出 1 |
11 | 灰色/粉红色 | 输出 2 |
LED 颜色
- 黄色
- 橙色
- 绿色
Key Features
- 控制 OV20i 上的板载状态 LED
- 布尔值决定 LED 的状态(ON/OFF)
- 支持多种 LED 颜色:黄色、橙色和绿色
- 提供设备状态的可视化指示
使用场景
- 指示 OV20i 的运行状态
- 为各种系统状态或警报提供可视化反馈
- 通过清晰可见的状态指示增强用户界面