A TWO-DIMENSIONAL ARRAY can be generated easily using two nested For Loops, i.e. by placing one For Loop inside the other as shown below Figure. In this case, the outer loop will correspond to the rows of the array and the inner one to the columns. In the example shown in Figure, the two-dimensional array generated consists of five rows and four columns.
If you would like to Enrich your career with an Android certified professional, then visit Mindmajix - A Global online training platform: “LabVIEW training” Course.This course will help you to achieve excellence in this domain.
Scalar values are indicated by a thin wire, ONE-DIMENSIONAL ARRAYS are indicated by a thick wire and two-dimensional arrays are indicated by two wires with color appropriate to the data type. Arrays of larger dimensions are also indicated by two wires, but with greater spacing. A three-dimensional (3D) array, a (i, j, k) will have ‘i’ indicating the page, ‘j’ the row, and ‘k’ the column. One can consider the array to be like a pack of cards, with the page indicating the card in the deck. All indices start from zero. The below Figure shows the wires corresponding to a scalar as well as one-dimensional, two-dimensional, and three-dimensional arrays.
String Data Type
A string is a sequence of displayable or nondisplayable ASCII characters. Strings provide a platform-independent format for information and data. Some of the more common applications of strings include the following:
LabVIEW represents numeric data as floating-point numbers, fixed-point numbers, the integers, the unsigned integers, also complex numbers. The Double and Single precision, as well as Complex numeric data, is represented with the color orange in LabVIEW. All Integer numeric data is represented with the color blue.
Certain data types also provide extended configuration options. As an example, you can associate physical units of measure with floating-point data, which including complex numbers, you can configure the encoding as well as a range for fixed-point data.
LabVIEW stores Boolean data as 8-bit values. The Boolean can be used in LabVIEW to represent a 0 or 1, a TRUE or FALSE. In case if the 8-bit value is zero, then the Boolean value is FALSE. Any nonzero value represents TRUE. The Common applications for Boolean data include representing digital data and serving as a front panel control that acts as a switch that has a mechanical action often used to control an execution structure such as a Case structure. A Boolean control is typically used as the conditional statement to exit a While Loop. LabVIEW, the color green represents Boolean data.
Most Express VIs accepts and/or returns the dynamic data type, that appears as a dark blue terminal.
Using the Convert to Dynamic Data and Convert from Dynamic Data VIs, you can convert floating-point numeric or Boolean data of the following data types:
Wire the dynamic data type to an indicator that can best present the data. The indicators include a graph, the chart, or numeric, or Boolean indicator. Because dynamic data undergoes an automatic conversion to match the indicator to which it is wired, the Express VIs can slow down the block diagram execution speed.
The dynamic data type is for use with Express VIs. Most other VIs and functions that are shipped with LabVIEW do not accept this data type. Use a built-in VI or function to analyze or process the data the dynamic data type includes, we must convert the dynamic data type.
Sometimes it is beneficial to group data related to one another. To use arrays and clusters to group related data in LabVIEW. The ARRAYS combine data of the same data type into one data structure, and clusters combine data of multiple data types into one data structure.
An array consists of elements and dimensions. Elements are the data that make up the array. A dimension is a length, height, depth of an array. The array can have one or more dimensions and as many as (231) – 1 element per dimension, memory permitting.
Clusters group data elements of mixed types. An example of a cluster is the LabVIEW error cluster, which combines a Boolean value, numeric value, a string. The cluster is similar to a record or a struct in text-based programming languages.
Bundling several data elements into clusters eliminates wire clutter on the block diagram and reduces the number of connector pane terminals that subVIs need. The connector pane has 28 terminals. In case your front panel contains more than 28 controls and indicators that you want to pass to another VI, then group some of them into a cluster and assign the cluster to a terminal on the connector pane.
An enum (enumerated control, constant or indicator) is a combination of data types. Enum represents a pair of values, string, numeric, enum can be one of a list of values. As an example, if you created an enum type called Month, possible value pairs for a Month variable like January-0, February-1, through December-11.
Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!
|LabVIEW Training||Sep 30 to Oct 15||View Details|
|LabVIEW Training||Oct 03 to Oct 18||View Details|
|LabVIEW Training||Oct 07 to Oct 22||View Details|
|LabVIEW Training||Oct 10 to Oct 25||View Details|
I am Ruchitha, working as a content writer for MindMajix technologies. My writings focus on the latest technical software, tutorials, and innovations. I am also into research about AI and Neuromarketing. I am a media post-graduate from BCU – Birmingham, UK. Before, my writings focused on business articles on digital marketing and social media. You can connect with me on LinkedIn.
Copyright © 2013 - 2023 MindMajix Technologies