Example Code

Dynamically Update the Values Inside a Text Ring Control

Code and Documents

Attachment

Download All

Overview
This example VI demonstrates the method to dynamically update the values inside a text ring control.

Description

The need may arise within a program to update the values of a control such as an Enum or Ring Control during Run Time. In this case there are a couple of things to be aware of.

Firstly, this is possible by VI Scripting as can be seen here and here.

Secondly, the method used to updcate the Text Ring as in this example can not be used for Enumerated Controls - this alone can be done by VI Scripting.

In the following VI, a simple Property Node can be created from Right Clicking on the Text Ring Control in question. The property to be selected in this case is Strings[].

In this case, it is put in a little more context by the String Search functions used to populate it - this could be any string from any source.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Open the VI " Ring Changer 2012 NIVerified.vi"
  2. Fill the Original String Values with whatever Values.
  3. Fill the String Input with a string that contains "helloworld".
  4. Run the VI and see the results.

 

Additional Information or References
VI Block Diagram

BlockDiagram.png

 

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

Liam A.
National Instruments
Applications Engineer

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