Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
@@ -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 global stop library for LabVIEW parallel loops and multi-module applications, providing a unified, lightweight, and thread-safe stop mechanism.

## 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 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, while `-1` identifies the global stop flag.
- The internal flag array is automatically extended when the input index exceeds current size.

## Recommended Workflow

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

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
75 changes: 48 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,48 @@
# 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)

�W� LabVIEW 撟嗉�敺芰銝�璅∪�蝔��撅€�迫嚗lobal Stop嚗�嚗�靘�銝€�蝠��蝥輻�摰��甇X�嗚€�

## 銝餉��寞€�

![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 �嚗�撟嗅皛∟雲�∩辣�嗉圻��甇U€�

## 摰�箏

- 雿輻 Functional Global Variable嚗GV嚗�摮�甇X�敹蝏�暺恕 32 銝芸�撠�嚗€�
- `Index` �其��箏�璅∪��迫雿�`-1` 隞�”�典��迫雿€�
- 敶��亦揣撘��箏��摨行嚗��冽�敹蝏��芸�拙���

## �刻�雿輻瘚�

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`
- `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
38 changes: 18 additions & 20 deletions src/LabVIEW-GlobalStop-Library.vipb
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,24 @@
</Custom_Action_VIs>
<VI_Package_Configuration_File>LabVIEW-GlobalStop-Library.vipc</VI_Package_Configuration_File>
<Description>
<One_Line_Description_Summary>Global Stop library for labview</One_Line_Description_Summary>
<Description>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
<One_Line_Description_Summary>Global stop library for LabVIEW parallel loops and multi-module applications</One_Line_Description_Summary>
<Description><b>Overview</b>
LabVIEW GlobalStop Library provides a lightweight and thread-safe global stop mechanism for parallel loops and multi-module applications.

<b>Key VIs</b>
- 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.

<b>Implementation</b>
- 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.

<b>Development Environment</b>
- LabVIEW 2014
- VIPM 2020.3</Description>
<Copyright/>
<Packager>NEVSTOP</Packager>
Expand Down
Loading