Example Code

Using State Machine to Determine Warnings

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

Coding that exemplifies how to use a state machine architecture to verify some climate conditions.

 

Description

This VI is intended as an example on how to use the state machine architecture to check different conditions and report them to the user. In it, we enter the current temp, current wind speed, max temp, min temp, and max wind speed in order to have the program output a string corresponding with the current conditions.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Set the parameters for Minimum, Maximum, and Current Temperature.
2. Set the parameters for Maximum, and Current Wind Speed.
3. Select the Run arrow.


Additional Information or References

Snippet.png

Justin Parker
National Instruments
Product Support Engineer

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