From 19686d85a5f99ca94920504dba0c5287fb59961a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:28:52 +0000 Subject: [PATCH 1/3] docs: add bilingual README with Chinese default page Agent-Logs-Url: https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/sessions/040d8004-d074-483a-9dbc-652fd2151cd7 Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com> --- README.en.md | 48 ++++++++++++++++++++++++++++++++ README.md | 77 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 98 insertions(+), 27 deletions(-) create mode 100644 README.en.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..2ee039e --- /dev/null +++ b/README.en.md @@ -0,0 +1,48 @@ +# LabVIEW GlobalStop Library + +[中文](./README.md) | [English](./README.en.md) + +[![Check_Broken_VIs](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Check_Broken_VIs.yml/badge.svg)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Check_Broken_VIs.yml) +[![Build_VIPM_Library](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Build_VIPM_Library.yml/badge.svg)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Build_VIPM_Library.yml) +[![GitHub all releases](https://img.shields.io/github/downloads/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/total)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/releases) +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/NEVSTOP-LAB/LabVIEW-GlobalStop-Library)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/releases) + +A simple, efficient, and thread-safe Global Stop solution for LabVIEW parallel loops and multi-module applications. + +## Features + +![Library Pallette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png) + +- `GSTOP INIT.vi`: Initializes the STOP FGV; if an incoming error is detected, the global stop flag is set to `TRUE`. +- `GSTOP RESET.vi`: Resets stop flag to `FALSE`. `Index=-1` means reset the global stop flag. +- `GSTOP SET.vi`: Sets stop flag to `TRUE`. `Index=-1` means set the global stop flag. +- `GSTOP GET.vi`: Gets stop flag by index. `Index=-1` means get the global stop flag. +- `GSTOP CheckSet.vi`: Checks a Boolean input (usually wired to a Stop button) and triggers stop when needed. + +## Implementation + +- Uses a Functional Global Variable (FGV) to store stop flags (32 Boolean flags by default). +- `Index` identifies module-level stop flags; `-1` identifies the global stop flag. +- The internal flag array is automatically extended when index exceeds current size. + +## Recommended Usage + +- Call `GSTOP INIT.vi` once during startup. +- In each loop/module, periodically call `GSTOP GET.vi` or `GSTOP CheckSet.vi` to decide when to exit. +- Call `GSTOP SET.vi` when a fatal error occurs in any module to stop all loops consistently. +- Use a Typedef Enum/Combo for module index management to avoid hard-coded numbers. + +## Examples + +The repository includes the following examples: + +- `src/examples/NEVSTOP/GlobalStop/globalstop-example1.vi` +- `src/examples/NEVSTOP/GlobalStop/globalstop-example2.vi` +- `src/examples/NEVSTOP/GlobalStop/globalstop-example3.vi` + +![Example](https://user-images.githubusercontent.com/8196752/200517986-eb2f3ed4-0931-443e-9bb2-d45b227550c0.png) + +## Development Environment + +- LabVIEW 2014 +- VIPM 2020.3 diff --git a/README.md b/README.md index 8624a89..2b8708f 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,50 @@ -# LabVIEW GlobalStop Library - -[![Check_Broken_VIs](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Check_Broken_VIs.yml/badge.svg)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Check_Broken_VIs.yml) -[![Build_VIPM_Library](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Build_VIPM_Library.yml/badge.svg)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Build_VIPM_Library.yml) -[![GitHub all releases](https://img.shields.io/github/downloads/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/total)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/releases) -[![GitHub release (latest by date)](https://img.shields.io/github/v/release/NEVSTOP-LAB/LabVIEW-GlobalStop-Library)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/releases) - -Simple stop mechanism for parallel loops in LabVIEW. - -## 功能 - -![Library Pallette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png) - -- `Init.vi` : Initialzie Globalstop, if error occurs, GlobalStop will be set to TRUE -- `Reset.vi` : Reset GlobalStop to FALSE. Index=-1 stands for reset all. -- `Set.vi` : Set GlobalStop to TRUE. Index=-1 stands for set all to TRUE. -- `Get.vi` : Get GlobalStop value of index. Set Index=-1 to get the global value of GlobalStop. -- `CheckSet.vi` : Check the boolean input(usually a stop button). - -# Example - -![image](https://user-images.githubusercontent.com/8196752/200517986-eb2f3ed4-0931-443e-9bb2-d45b227550c0.png) - -## Development Environment - -- LabVEW 2014 -- VIPM 2020.3 +# LabVIEW GlobalStop Library + +[中文](./README.md) | [English](./README.en.md) + +[![Check_Broken_VIs](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Check_Broken_VIs.yml/badge.svg)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Check_Broken_VIs.yml) +[![Build_VIPM_Library](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Build_VIPM_Library.yml/badge.svg)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/actions/workflows/Build_VIPM_Library.yml) +[![GitHub all releases](https://img.shields.io/github/downloads/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/total)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/releases) +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/NEVSTOP-LAB/LabVIEW-GlobalStop-Library)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/releases) + +用于 LabVIEW 并行循环/多模块场景的全局停止(Global Stop)库。 + +**特点:简单、高效、线程安全。** + +## 功能 + +![Library Pallette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png) + +- `GSTOP INIT.vi`:初始化 STOP FGV;若输入错误簇为错误状态,会将全局停止位置为 `TRUE`。 +- `GSTOP RESET.vi`:将停止位复位为 `FALSE`。`Index=-1` 表示复位全局停止位。 +- `GSTOP SET.vi`:将停止位置为 `TRUE`。`Index=-1` 表示设置全局停止位。 +- `GSTOP GET.vi`:读取指定索引的停止位。`Index=-1` 表示读取全局停止位。 +- `GSTOP CheckSet.vi`:检查布尔输入(通常连接 Stop 按钮),并在需要时触发停止。 + +## 实现说明 + +- 通过 Functional Global Variable (FGV) 保存一组停止标志位(默认 32 个布尔值)。 +- `Index` 用于区分模块停止位,`-1` 表示全局停止位。 +- 当索引超出当前长度时,内部数组会自动扩展。 + +## 使用建议 + +- 在程序启动阶段调用一次 `GSTOP INIT.vi`。 +- 各并行循环周期性调用 `GSTOP GET.vi` 或 `GSTOP CheckSet.vi` 判断是否退出。 +- 任意模块出现致命错误时调用 `GSTOP SET.vi`,实现全局联动停止。 +- 使用 Typedef Enum/Combo 管理模块索引,避免硬编码。 + +## 示例 + +仓库提供以下示例: + +- `src/examples/NEVSTOP/GlobalStop/globalstop-example1.vi` +- `src/examples/NEVSTOP/GlobalStop/globalstop-example2.vi` +- `src/examples/NEVSTOP/GlobalStop/globalstop-example3.vi` + +![Example](https://user-images.githubusercontent.com/8196752/200517986-eb2f3ed4-0931-443e-9bb2-d45b227550c0.png) + +## 开发环境 + +- LabVIEW 2014 +- VIPM 2020.3 From 3f186abf92a7111f8c97020291f9505a7282c63b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:30:05 +0000 Subject: [PATCH 2/3] docs: fix README palette spelling Agent-Logs-Url: https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/sessions/040d8004-d074-483a-9dbc-652fd2151cd7 Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com> --- README.en.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index 2ee039e..13c49b2 100644 --- a/README.en.md +++ b/README.en.md @@ -11,7 +11,7 @@ A simple, efficient, and thread-safe Global Stop solution for LabVIEW parallel l ## Features -![Library Pallette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png) +![Library Palette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png) - `GSTOP INIT.vi`: Initializes the STOP FGV; if an incoming error is detected, the global stop flag is set to `TRUE`. - `GSTOP RESET.vi`: Resets stop flag to `FALSE`. `Index=-1` means reset the global stop flag. diff --git a/README.md b/README.md index 2b8708f..6800cd7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ## 功能 -![Library Pallette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png) +![Library Palette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png) - `GSTOP INIT.vi`:初始化 STOP FGV;若输入错误簇为错误状态,会将全局停止位置为 `TRUE`。 - `GSTOP RESET.vi`:将停止位复位为 `FALSE`。`Index=-1` 表示复位全局停止位。 From a51cd482ae152e8de9d6df11269096dd65300513 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:41:32 +0000 Subject: [PATCH 3/3] docs: refine bilingual README and update VIPB description Agent-Logs-Url: https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/sessions/b9e1b551-7dee-413b-a041-86fdda529dbd Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com> --- README.en.md | 28 ++++++++++----------- README.md | 36 +++++++++++++-------------- src/LabVIEW-GlobalStop-Library.vipb | 38 ++++++++++++++--------------- 3 files changed, 49 insertions(+), 53 deletions(-) diff --git a/README.en.md b/README.en.md index 13c49b2..38b1e56 100644 --- a/README.en.md +++ b/README.en.md @@ -7,30 +7,30 @@ [![GitHub all releases](https://img.shields.io/github/downloads/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/total)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/releases) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/NEVSTOP-LAB/LabVIEW-GlobalStop-Library)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/releases) -A simple, efficient, and thread-safe Global Stop solution for LabVIEW parallel loops and multi-module applications. +A global stop library for LabVIEW parallel loops and multi-module applications, providing a unified, lightweight, and thread-safe stop mechanism. -## Features +## Key Features ![Library Palette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png) -- `GSTOP INIT.vi`: Initializes the STOP FGV; if an incoming error is detected, the global stop flag is set to `TRUE`. -- `GSTOP RESET.vi`: Resets stop flag to `FALSE`. `Index=-1` means reset the global stop flag. -- `GSTOP SET.vi`: Sets stop flag to `TRUE`. `Index=-1` means set the global stop flag. -- `GSTOP GET.vi`: Gets stop flag by index. `Index=-1` means get the global stop flag. -- `GSTOP CheckSet.vi`: Checks a Boolean input (usually wired to a Stop button) and triggers stop when needed. +- `GSTOP INIT.vi`: Initializes the STOP FGV. If an incoming error cluster is in error state, the global stop flag is immediately set to `TRUE`. +- `GSTOP RESET.vi`: Resets a stop flag to `FALSE`; `Index=-1` means reset the global stop flag. +- `GSTOP SET.vi`: Sets a stop flag to `TRUE`; `Index=-1` means set the global stop flag. +- `GSTOP GET.vi`: Reads a stop flag by index; `Index=-1` means read the global stop flag. +- `GSTOP CheckSet.vi`: Checks a Boolean input (typically wired to a Stop button) and triggers stop when the condition is met. ## Implementation - Uses a Functional Global Variable (FGV) to store stop flags (32 Boolean flags by default). -- `Index` identifies module-level stop flags; `-1` identifies the global stop flag. -- The internal flag array is automatically extended when index exceeds current size. +- `Index` identifies module-level stop flags, while `-1` identifies the global stop flag. +- The internal flag array is automatically extended when the input index exceeds current size. -## Recommended Usage +## Recommended Workflow -- Call `GSTOP INIT.vi` once during startup. -- In each loop/module, periodically call `GSTOP GET.vi` or `GSTOP CheckSet.vi` to decide when to exit. -- Call `GSTOP SET.vi` when a fatal error occurs in any module to stop all loops consistently. -- Use a Typedef Enum/Combo for module index management to avoid hard-coded numbers. +1. Call `GSTOP INIT.vi` once during startup. +2. In each parallel loop, periodically call `GSTOP GET.vi` or `GSTOP CheckSet.vi` to decide whether to exit. +3. Call `GSTOP SET.vi` when any module encounters a fatal error to trigger coordinated global stop. +4. Use a Typedef Enum/Combo to manage `Index` values for better maintainability and to avoid hard-coded numbers. ## Examples diff --git a/README.md b/README.md index 6800cd7..07ba0c1 100644 --- a/README.md +++ b/README.md @@ -7,36 +7,34 @@ [![GitHub all releases](https://img.shields.io/github/downloads/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/total)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/releases) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/NEVSTOP-LAB/LabVIEW-GlobalStop-Library)](https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library/releases) -用于 LabVIEW 并行循环/多模块场景的全局停止(Global Stop)库。 +面向 LabVIEW 并行循环与多模块程序的全局停止(Global Stop)库,提供统一、轻量且线程安全的停止机制。 -**特点:简单、高效、线程安全。** - -## 功能 +## 主要特性 ![Library Palette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png) -- `GSTOP INIT.vi`:初始化 STOP FGV;若输入错误簇为错误状态,会将全局停止位置为 `TRUE`。 -- `GSTOP RESET.vi`:将停止位复位为 `FALSE`。`Index=-1` 表示复位全局停止位。 -- `GSTOP SET.vi`:将停止位置为 `TRUE`。`Index=-1` 表示设置全局停止位。 -- `GSTOP GET.vi`:读取指定索引的停止位。`Index=-1` 表示读取全局停止位。 -- `GSTOP CheckSet.vi`:检查布尔输入(通常连接 Stop 按钮),并在需要时触发停止。 +- `GSTOP INIT.vi`:初始化 STOP FGV;若输入错误簇为错误状态,则立即将全局停止位置为 `TRUE`。 +- `GSTOP RESET.vi`:将停止位复位为 `FALSE`;`Index=-1` 表示复位全局停止位。 +- `GSTOP SET.vi`:将停止位置为 `TRUE`;`Index=-1` 表示设置全局停止位。 +- `GSTOP GET.vi`:读取指定索引的停止位;`Index=-1` 表示读取全局停止位。 +- `GSTOP CheckSet.vi`:检查布尔输入(通常连接 Stop 按钮),并在满足条件时触发停止。 -## 实现说明 +## 实现机制 -- 通过 Functional Global Variable (FGV) 保存一组停止标志位(默认 32 个布尔值)。 -- `Index` 用于区分模块停止位,`-1` 表示全局停止位。 -- 当索引超出当前长度时,内部数组会自动扩展。 +- 使用 Functional Global Variable(FGV)保存停止标志数组(默认 32 个布尔位)。 +- `Index` 用于区分模块停止位,`-1` 代表全局停止位。 +- 当输入索引超出当前长度时,内部标志数组会自动扩展。 -## 使用建议 +## 推荐使用流程 -- 在程序启动阶段调用一次 `GSTOP INIT.vi`。 -- 各并行循环周期性调用 `GSTOP GET.vi` 或 `GSTOP CheckSet.vi` 判断是否退出。 -- 任意模块出现致命错误时调用 `GSTOP SET.vi`,实现全局联动停止。 -- 使用 Typedef Enum/Combo 管理模块索引,避免硬编码。 +1. 程序启动时调用一次 `GSTOP INIT.vi` 完成初始化。 +2. 各并行循环中周期性调用 `GSTOP GET.vi` 或 `GSTOP CheckSet.vi` 判断是否退出。 +3. 任一模块发生致命错误时调用 `GSTOP SET.vi`,触发全局联动停止。 +4. 建议使用 Typedef Enum/Combo 管理 `Index`,避免硬编码并提升可维护性。 ## 示例 -仓库提供以下示例: +仓库包含以下示例: - `src/examples/NEVSTOP/GlobalStop/globalstop-example1.vi` - `src/examples/NEVSTOP/GlobalStop/globalstop-example2.vi` diff --git a/src/LabVIEW-GlobalStop-Library.vipb b/src/LabVIEW-GlobalStop-Library.vipb index 61d545b..8caeb0e 100644 --- a/src/LabVIEW-GlobalStop-Library.vipb +++ b/src/LabVIEW-GlobalStop-Library.vipb @@ -27,26 +27,24 @@ LabVIEW-GlobalStop-Library.vipc - Global Stop library for labview - Simple stop mechanism for parallel loops in LabVIEW. - -## - -![Library Pallette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png) - -- `Init.vi` : Initialzie Globalstop, if error occurs, GlobalStop will be set to TRUE -- `Reset.vi` : Reset GlobalStop to FALSE. Index=-1 stands for reset all. -- `Set.vi` : Set GlobalStop to TRUE. Index=-1 stands for set all to TRUE. -- `Get.vi` : Get GlobalStop value of index. Set Index=-1 to get the global value of GlobalStop. -- `CheckSet.vi` : Check the boolean input(usually a stop button). - -# Example - -![image](https://user-images.githubusercontent.com/8196752/200517986-eb2f3ed4-0931-443e-9bb2-d45b227550c0.png) - -## Development Environment - -- LabVEW 2014 + Global stop library for LabVIEW parallel loops and multi-module applications + Overview +LabVIEW GlobalStop Library provides a lightweight and thread-safe global stop mechanism for parallel loops and multi-module applications. + +Key VIs +- GSTOP INIT.vi: Initialize STOP FGV. If an incoming error is detected, set global stop to TRUE. +- GSTOP RESET.vi: Reset stop flag to FALSE. Index = -1 resets the global stop flag. +- GSTOP SET.vi: Set stop flag to TRUE. Index = -1 sets the global stop flag. +- GSTOP GET.vi: Read stop flag by index. Index = -1 reads the global stop flag. +- GSTOP CheckSet.vi: Check a Boolean input (usually a Stop button) and trigger stop when needed. + +Implementation +- Uses an FGV to store stop flags (32 Boolean flags by default). +- Index identifies module-level stop flags, while -1 identifies the global stop flag. +- The internal stop flag array auto-expands when index exceeds current size. + +Development Environment +- LabVIEW 2014 - VIPM 2020.3 NEVSTOP