Example Code

Determine Largest Particle in Particle Analysis Report

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

  • Vision Development Module
  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates how to determine the largest particle from a particle report generated by the IMAQ Particle Analysis Report VI.

 

Description

The VI can be given a minimum size, which will be compared to all particles in the report to check if any of them meet this size requirement. If no particles are found that are greater than or equal to the minimum size, the Object Detected? indicator will be false. Along with the largest particle's area and center of mass being reported, a bounding box is created (size 50 x 50 pixels) that can be sent to an IMAQ Overlay VI.

This VI is meant to be used as a subVI in another VI's block diagram. A test VI is attached to demonstrate how to do this.

 

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)
  • Vision Development Module 2012 (or compatible)

 Hardware

  • No hardware required

 

Steps to Implement or Execute Code

  1. Download and extract the attached file "Get Largest Particle from Particle Analysis Report LV2012 NIVerified.zip"
  2. Open both VIs and follow the instructions in Front Panel and Block Diagram and run the program.
  3. You can use the "Main Test VI LV2012 NIVerified.vi" that demonstrates how to use the "Get Largest Particle from Particle Analysis Report LV2012 NIVerified.vi" as a SubVI.

 

Additional Information or References

Get Largest Particle from Particle Analysis Report LV2012 NIVerified.vi - Front Panel.png

 

Get Largest Particle from Particle Analysis Report LV2012 NIVerified.vi - Block Diagram.png

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

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

Comments
shreya111
Member
Member
on

Please convert it to LabVIEW 2012 version.

Poolean
Member
Member
on

Done! It's now included as an additional attachment.