Example Code

Search through data to determine when data exceeds threshold

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This VI will search through a known set of data, and determine when the data exceeds a certain value.
Description
 When the data exceeds that value, another array is created, and the corresponding indexes of "data to be copied" will populate that array. When the data does not meet that threshold, the new array instead contains 0s.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Specify the data to copy;
  2. Specify the column of data to search and the element threshold;
  3. Run the VI and check the copied data.

 

Additional Information or References
VI Block Diagram

 code.png

 

  **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
bsvare
Member
Member
on

You have rube in this code:

Rube Clean.png

Certified-LabVIEW-Architect_rgb.jpgCertified_TestStand_Architect_rgb.jpg


"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books

Chantastic!
NI Employee (retired)
on

I appreciate the comment, but I have to say I have no idea what a rube is. Would love an explanation if you have time

bsvare
Member
Member
on

A rube is short for Rube Goldberg code.  Rube Goldberg is famous for creating machines that are overly complicated to do simple things. It's used by this community to attribute complex code to do something that can be significantly simplier. There's a great thread to read examples of these and how they can be simplier here: http://forums.ni.com/t5/BreakPoint/Rube-Goldberg-Code/td-p/399999

Certified-LabVIEW-Architect_rgb.jpgCertified_TestStand_Architect_rgb.jpg


"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books

Chantastic!
NI Employee (retired)
on

Great, thanks for the information! Appreciate it.