Example Code

Set Control Values by Index (Signalling) in 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 shows you how to use the Set Control Values by Index function.

 

Description

Depending on the order that controls are placed on the front panel, you can modify its values based on the Set Control Values by Index function. Additionally, this function also allows the change to be picked up by an event structure.

 

Requirements

  • LabVIEW 2013 (or compatible).

 

Steps to Implement or Execute Code

  1. In the block diagram, put in the corresponding control values in the constants as required.
  2. Run the program.
  3. Notice that the values in the controls have been modified accordingly.

Additional Information or References 

Block Diagram

capture.JPG

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

__________________________
Aidan H

Applications Engineer
National Instruments UK & Ireland

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

Comments
sfanale
Member
Member
on

Just to note, this code uses the tabbing order of the controls, not the control index, to send the value chnage signal. I'd reccommend adding an input for an array of control references that you want to modify. these references can be used to grad the control indexes too.