Example Code

Write and Read Graph Cursor Position with INI File 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

Overview
This example VI shows how to read the (x,y) cursor location from a waveform graph via property node and save it to a config (INI) file, then read the saved cursor location back from the config file to write it back to the waveform graph.


Description
Program is implemented in flat sequence with three second waits so that you can watch the program as it happens. Be sure to create a config file by making a new text file and saving it as "Config.ini" (without the quotation marks), then pointing to the directory that contains that config file on your front panel. Be sure you are pointing to the same directory for both file paths as you will be reading and writing to one config file.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Create config file by creating new text file and saving as "Config.ini" without the quotation marks.
  2. Select the path in configuration file path write and configuration file path read control.
  3. Run the VI

 

Additional Information or References
VI Snippet

00.png

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

Micah M.
National Instruments
NIC AE Specialist - Test

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