Example Code

Select a Random Person with LabVIEW

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

Download All

Overview

This VI takes the names or numbers for a group and then outputs a random winner (or loser).

 

Description

Using a random number generator a random name from the existing list is removed each time "next person" is pressed until they all have been removed or the user stops the program.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI.
2. Push the "Next Person" button in order to select a random name.
3. Keep doing as desired, or until no more names remain.
4. Stop the VI.

 

Additional Information or References

Snippet.png

National Instruments
Applications Engineer

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

Comments
CorbinH
Member
Member
on

I think you forgot to also attach your type def, but I still like the program!

TobyHex
NI Employee (retired)
on

Thanks Corbin

Regards,

Nicholas Kannen

Sent from the users iPhone

On Sep 19, 2010, at 9:38 PM, "Corbin Heard" <web.community@ni.com

National Instruments
Applications Engineer