ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Example Code

Fire an Event Structure Using Data in a File

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 demonstrates the way of triggering a event structure using data in a file.

 

Description

An event structure can be very helpful when needing to "watch" for a user input and react to that input.  In some applications, you may want that event structure in place, but also the functionallity of inputing data from a file.  This simple VI demonstrates how this is possible.  This also can be used with Simulation Interface Toolkit to fire the events needed from a file.  The trick is to use a property node of the control and write to the Val(Sgnl)instead of just Value.  The first option fires that event that you need.

 

Requirements

Software:

  • Labview 2012 (or compatible) 

 

Steps to Implement or Execute Code

1. Modify the data in data.txt file
2.Run the VI

 

Additional Information or References

VI Block Diagram

 124ud.PNG

 

 

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

 

 

 

 

 

 

National Instruments
Applications Engineer

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