Example Code

Front Panel Control that Starts and Stops a VI Using 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
Since LabVIEW doesn't have a programmable start button, this example VI uses a method to create that effect.


Description
It uses two states, an "Active" and "Idle" state.  The VI is set to run when opened, and hence is in the "Idle" state when started.  When the Start button on the front panel is pressed the VI changes to its "Active" state.   Pressing the Stop button will return it to the "Idle" state.  


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. VI will be running when opened.
  2. Press the start button to put the VI in an "Active" state and cause the boolean to blink
  3. Press the stop button to put the VI back into the "Idle" state and stop the blinking.

 

Additional Information or References
VI Snippet

00.png

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

Regards,

Hassan Atassi
Director, ni.com

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

Comments
FrancoM
Member
Member
on

Please, Can you post the VI in LabVIEW 2009??

Thanks