Skip to content

Commit

Permalink
add_doc_and_example (#8)
Browse files Browse the repository at this point in the history
* add action yml

* 切换到 lvcicd@lv2014_support

* modify yml

* Update Build_VIPM_Library.yml

* Update Build_VIPM_Library.yml

* Update Build_VIPM_Library.yml

* Update Build_VIPM_Library.yml

* Update Build_VIPM_Library.yml

* Update Build_VIPM_Library.yml

* Create print latest tag.yml

* Update print latest tag.yml

* add check broken VIs

* change action name

* $Tag=$(git tag --list | sort -V | Select -Last 1);

* Update print latest tag.yml

* Update print latest tag.yml

* Update Check_Broken_VIs.yml

* Update print latest tag.yml

* Update print latest tag.yml

* Update print latest tag.yml

* Update print latest tag.yml

* Update print latest tag.yml

* Update README.md

* Update README.md

* update to lvcicd@main

* update example

* remove print latest tag.yml

* update example

* Update README.md

* Update README.md

* update readme

* remove vip/
  • Loading branch information
nevstop authored Nov 8, 2022
1 parent becdaad commit 6812911
Show file tree
Hide file tree
Showing 15 changed files with 179 additions and 29 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/Build_VIPM_Library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This is a basic workflow to help you get started with Actions

name: Build_VIPM_Library

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
branches:
- main
types: [closed]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Build_VIPM_Library:
# The type of runner that the job will run on
runs-on: [self-hosted, lv2014]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# - name: vipm_InstallPackagesByName
# uses: LV-APT/lvCICD@main
# with:
# Operation: vipm_InstallPackagesByName
# Parameter1: 'Git API'

# Runs a set of commands using the runners shell
- name: Build VI Package
id: build-vip
uses: LV-APT/lvCICD@main
with:
LabVIEW_Version: 2014
Operation: vipm_BuildDailyVIP
Parameter1: ${{ github.workspace }}\src\LabVIEW-GlobalStop-Library.vipb
Parameter2: NO

- id: vip-name
run:
$vipName=Split-Path -Path ${{ steps.build-vip.outputs.Result }} -Leaf;
Write-Host "::set-output name=vipName::"$vipName""
shell: powershell

- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: ${{ steps.vip-name.outputs.vipName }}
path: ${{ steps.build-vip.outputs.Result }}
# The desired behavior if no files are found using the provided path.
if-no-files-found: warn
retention-days: 90
36 changes: 36 additions & 0 deletions .github/workflows/Check_Broken_VIs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This is a basic workflow to help you get started with Actions

name: Check_Broken_VIs

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
paths-ignore:
- '.github/**'
- 'vip/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Check_Broken_VIs:
# The type of runner that the job will run on
runs-on: [self-hosted, lv2014]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Runs a set of commands using the runners shell
- id: Check_Broken_VIs
uses: LV-APT/lvCICD@main
with:
LabVIEW_Version: 2014
Operation: VIAn_CheckBrokenVIs
Parameter1: ${{ github.workspace }}


7 changes: 3 additions & 4 deletions GlobalStop.lvproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
<Property Name="server.vi.callsEnabled" Type="Bool">true</Property>
<Property Name="server.vi.propertiesEnabled" Type="Bool">true</Property>
<Property Name="specify.custom.address" Type="Bool">false</Property>
<Item Name="GSTOP.lvlib" Type="Library" URL="../src/user.lib/_NEVSTOP/GlobalStop/GSTOP.lvlib"/>
<Item Name="main1.vi" Type="VI" URL="../main1.vi"/>
<Item Name="main2.vi" Type="VI" URL="../main2.vi"/>
<Item Name="main3.vi" Type="VI" URL="../main3.vi"/>
<Item Name="src" Type="Folder" URL="../src">
<Property Name="NI.DISK" Type="Bool">true</Property>
</Item>
<Item Name="Dependencies" Type="Dependencies"/>
<Item Name="Build Specifications" Type="Build">
<Property Name="NI.SortType" Type="Int">3</Property>
Expand Down
30 changes: 13 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
# LabVIEW GlobalStop Library

提供给LabVIEW 程序使用的全局停止方案。

**优点:简单、高效、易用,STOP FGV的方案也保证了多线程安全。**
[![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)

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` : 初始化STOP FGV,如果ERROR 发生,则全局停止位初始化为 TRUE
- `Reset.vi` :设置STOP FGV为 False,Index 标识模块编号,-1 标识全局停止位
- `Set.vi` : 设置STOP FGV为 True,Index 标识模块编号,-1 标识全局停止位
- `Get.vi` :检查STOP FGV值,如果输入的错误簇为False,会自动调用 `Set.vi` 方法,Index 标识模块编号,-1 标识全局停止位
- `CheckSet.vi` :检查输入的Boolean值,(通常连接到Stop Button上)判断是否需要退出。如果输入的错误簇为False,会自动调用 `Set.vi` 方法,Index 标识模块编号,-1 标识全局停止位


## 实现

- 使用Function Global Variable (FGV)的方式,存储一组(初始默认32个) Boolean 类型的标志数据,不同线程通过读取该FGV判断是否需要停止。
- Index 标识模块编号,-1 标识全局停止位。建议创建将模块列表创建为Enum/Combo Typedef,连接到 Index 输入端。
- 当超出当前定义的标志个数时,会自动扩展 FGV 中的标志Flag 数组长度。
- `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)

LabVIEW 2014 +
## Development Environment

- LabVEW 2014
- VIPM 2020.3
29 changes: 29 additions & 0 deletions doc/README(chz).md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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)

提供给LabVIEW 程序使用的全局停止方案。

**优点:简单、高效、易用,STOP FGV的方案也保证了多线程安全。**

## 功能

![Library Pallette](https://cloud.githubusercontent.com/assets/8196752/10752145/8288f624-7cc1-11e5-9700-e3740e08f571.png)

- `Init.vi` : 初始化STOP FGV,如果ERROR 发生,则全局停止位初始化为 TRUE
- `Reset.vi` :设置STOP FGV为 False,Index 标识模块编号,-1 标识全局停止位
- `Set.vi` : 设置STOP FGV为 True,Index 标识模块编号,-1 标识全局停止位
- `Get.vi` :检查STOP FGV值,如果输入的错误簇为False,会自动调用 `Set.vi` 方法,Index 标识模块编号,-1 标识全局停止位
- `CheckSet.vi` :检查输入的Boolean值,(通常连接到Stop Button上)判断是否需要退出。如果输入的错误簇为False,会自动调用 `Set.vi` 方法,Index 标识模块编号,-1 标识全局停止位

## 实现

- 使用Function Global Variable (FGV)的方式,存储一组(初始默认32个) Boolean 类型的标志数据,不同线程通过读取该FGV判断是否需要停止。
- Index 标识模块编号,-1 标识全局停止位。建议创建将模块列表创建为Enum/Combo Typedef,连接到 Index 输入端。
- 当超出当前定义的标志个数时,会自动扩展 FGV 中的标志Flag 数组长度。

## Development Environment

- LabVEW 2014
- VIPM 2020.3
Binary file removed main1.vi
Binary file not shown.
Binary file removed main2.vi
Binary file not shown.
Binary file removed main3.vi
Binary file not shown.
47 changes: 40 additions & 7 deletions src/LabVIEW-GlobalStop-Library.vipb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<VI_Package_Builder_Settings Version="0.6" Created_Date="2015-10-15 14:38:17" Modified_Date="2018-12-10 13:59:54" Creator="Administrator" Comments="" ID="e006e8c88349ab1ec6aa4cc3737ecd79">
<VI_Package_Builder_Settings Version="2018" Created_Date="2015-10-15 14:38:17" Modified_Date="2022-11-08 17:01:34" Creator="Administrator" Comments="" ID="0504dae0df650ed079e9c34bdcca05d2">
<Library_General_Settings>
<Package_File_Name>nevstop_lib_globalstop</Package_File_Name>
<Library_Version>2.0.2.4</Library_Version>
<Library_Version>2022.11.8.4</Library_Version>
<Auto_Increment_Version>false</Auto_Increment_Version>
<Library_Source_Folder>.</Library_Source_Folder>
<Library_Output_Folder>..\storage</Library_Output_Folder>
Expand All @@ -27,14 +27,36 @@
</Custom_Action_VIs>
<VI_Package_Configuration_File>LabVIEW-GlobalStop-Library.vipc</VI_Package_Configuration_File>
<Description>
<One_Line_Description_Summary>Global Stop library</One_Line_Description_Summary>
<One_Line_Description_Summary>Global Stop library for labview</One_Line_Description_Summary>
<Description># LabVIEW GlobalStop Library

https://raw.githubusercontent.com/nevstop/LabVIEW-GlobalStop-Library/master/README.mds</Description>
[![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)

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</Description>
<Copyright/>
<Packager>yaoli</Packager>
<URL>https://github.com/nevstop/LabVIEW-GlobalStop-Library</URL>
<Release_Notes>Fix issue, update Front panel pallette.</Release_Notes>
<Packager>NEVSTOP</Packager>
<URL>https://github.com/NEVSTOP-LAB/LabVIEW-GlobalStop-Library</URL>
<Release_Notes>add cicd check</Release_Notes>
</Description>
<Destinations>
<Toolkit_VIs>
Expand Down Expand Up @@ -90,6 +112,11 @@ https://raw.githubusercontent.com/nevstop/LabVIEW-GlobalStop-Library/master/READ
<Preserve_Hierarchy>true</Preserve_Hierarchy>
<Path/>
</Project_Provider>
<QuickDrop_Plugins>
<LLB>false</LLB>
<Preserve_Hierarchy>true</Preserve_Hierarchy>
<Path/>
</QuickDrop_Plugins>
</Destinations>
<Source_Files>
<Destination_Overrides>
Expand All @@ -110,6 +137,12 @@ https://raw.githubusercontent.com/nevstop/LabVIEW-GlobalStop-Library/master/READ
<Additional_Destination>false</Additional_Destination>
<Additional_Destination_Index>0</Additional_Destination_Index>
</Destination_Overrides>
<Destination_Overrides>
<Path>examples</Path>
<Destination>0</Destination>
<Additional_Destination>false</Additional_Destination>
<Additional_Destination_Index>0</Additional_Destination_Index>
</Destination_Overrides>
<Password_Overrides>
<Path>.</Path>
<Password/>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion vip/VIPM Package Filder.txt

This file was deleted.

Binary file removed vip/nevstop_lib_globalstop-1.0.1.2.vip
Binary file not shown.
Binary file removed vip/nevstop_lib_globalstop-2.0.2.3.vip
Binary file not shown.

0 comments on commit 6812911

Please sign in to comment.