Connexions

You are here: Home » Content » Strings
Content Actions
Lenses

What is a lens?

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

This content is ...
Affiliated with (?)
This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • This module is included in aLens by: National InstrumentsAs a part of collection:"LabVIEW Graphical Programming Course"

    Comments:

    "A full introductory course on programming with LabVIEW."

    Click the "National Instruments" link to see all content affiliated with them.

    National Instruments
Also in these lenses
  • This module is included inLens: Connexions Books Available for Print on Demand
    By: ConnexionsAs a part of collection:"LabVIEW Graphical Programming Course"

    Comments:

    "This book is available through the Connexions beta version of print-on-demand from online materials."

    Click the "Printable Books" link to see all content selected in this lens.

    Printable Books
Tags

(?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

Strings

Module by: National Instruments

Summary: In this lesson, you will learn how to create string controls and indicators.

A string is a sequence of displayable or non-displayable ASCII characters. Strings provide a platform-independent format for information and data. Some of the more common applications of strings include the following:
  • Creating simple text messages.
  • Passing numeric data as character strings to instruments and then converting the strings to numeric values.
  • Storing numeric data to disk. To store numeric values in an ASCII file, you must first convert numeric values to strings before writing the numeric values to a disk file.
  • Instructing or prompting the user with dialog boxes.
On the front panel, strings appear as tables, text entry boxes, and labels.

Creating String Controls and Indicators

Use the string control and indicator located on the Controls>>Text Controls and Controls>>Text Indicators palettes to simulate text entry boxes and labels. Use the Operating tool or Labeling tool to type or edit text in a string control. Use the Positioning tool to resize a front panel string object. To minimize the space that a string object occupies, right-click the object and select the Visible Items>>Scrollbar option from the shortcut menu.
Right-click a string control or indicator on the front panel to select from the display types shown in the following table. The table also shows an example message for each display type.
Display Type Description Message
Normal Display Displays printable characters using the font of the control. Non-printable characters generally appear as boxes. There are four display types. There are four display types. \ is a backslash.
'\' Codes Display Displays backslash codes for all non-displayable characters. There\sare\sfour\sdisplay\stypes.\n\\\sis\sa\sbackslash.
Password Display Displays an asterisk (*) for each character including spaces. ***************************** *****************
Hex Display Displays the ASCII value of each character in hex instead of the character itself. 5468 6572 6520 6172 6520 666F 7572 2064 6973 706C 6179 2074 7970 6573 2E0A 5C20 6973 2061 2062 6163 6B73 6C61 7368 2E

Tables

Use the table control located on the Controls>>All Controls>>List & Table palette or the Express Table VI located on the Controls>>Text Indicators palette to create a table on the front panel. Each cell in a table is a string, and each cell resides in a column and a row. Therefore, a table is a display for a 2D array of strings. The illustration in Figure 1 shows a table and all its parts.
tableparts.png
Figure 1: 1. Cell Indicated by Index Values, 2. Column Headings, 3. Vertical Scrollbar, 4. Horizontal Scrollbar, 5. Row Headings, 6. Horizontal Index, 7. Vertical Index
Define cells in the table by using the Operating tool or the Labeling tool to select a cell and typing text in the selected cell.
The table displays a 2D array of strings, so you must convert 2D numeric arrays to 2D string arrays before you can display them in a table indicator. The row and column headers are not automatically displayed as in a spreadsheet. You must create 1D string arrays for the row and column headers.

Comments, questions, feedback, criticisms?

Discussion forum

Send feedback