Create an Array control or indicator on the Front Panel by placing an array shell on the front panel as shown in below Figure (a), and dragging a data object or element, which can be a numeric, Boolean, string, path, refnum, or cluster control or indicator, into the array shell. The array shell automatically resizes to accommodate the new object. The array shell can be selected from Controls >> Modern >> Arrays, Matrix & Clusters palette. The array elements must be Controls or Indicators. You must insert an object in the array shell before you use the array on the Block diagram. Otherwise, the array terminal appears black with an empty bracket. After placing an element in the array shell, you can expand the array either horizontally or vertically to see more elements. Once a data type is assigned to the array shell, the block diagram takes the color and lettering (In [ ] brackets) of the data type. For example, if the data type is a numeric indicator, the color will be orange with [DBL] written inside the terminal. Arrays can be identified easily by their thicker (or double) wires. The below Figure (b) shows an array of numeric controls and the array has four elements. The below Figure (c) shows an array of numeric indicators.
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.
You can create an array constant on the Block Diagram by combining an array with a valid constant, which can be a numeric, Boolean, string, path, refnum, or cluster constant. The element cannot be another array. Following are the steps for creating an array constant in the block diagram.
You can use an array constant to store constant data or as a basis for comparison with another array. Array constants are also useful for passing data into a subVI. The above Figure (d) shows an array of Boolean constants.
A two-dimensional array is analogous to a spreadsheet or table. A two-dimensional array stores elements in a grid. It requires a column index and a row index to locate an element, both of which are zero-based. Two-dimensional arrays are very commonly used in data acquisition applications. For example, when waveforms from several channels are read from a data acquisition (DAQ) board, the data is stored in a two-dimensional array where each column in the array corresponds to data from one channel. To create a two-dimensional array on the front panel, right-click the index display of the array and select Add Dimension from the shortcut menu. You also can use the Positioning tool to resize the index display to have one more dimension. The below Figure shows a two-dimensional array.
To create a multidimensional array on the Front Panel, right-click the index display of the array and select Add Dimension from the shortcut menu. You also can use the Positioning tool to resize the index display until you have as many dimensions as you want. To delete dimensions one at a time, right-click the index display and select Remove Dimension from the shortcut menu. You can also resize the index display to delete dimensions. Use the Positioning tool to resize the array to show more than one row or column at a time. To display a particular element on the front panel, either type the index number in the index display or use the arrows on the index display to navigate to that number. You can also use the scroll bars of an array to navigate to a particular element. Right-click the array and select Visible Items» Vertical Scrollbar or Visible Items»Horizontal Scrollbar from the shortcut menu to display scroll bars for the array as shown in the below Figure.
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||Dec 09 to Dec 24||View Details|
|LabVIEW Training||Dec 12 to Dec 27||View Details|
|LabVIEW Training||Dec 16 to Dec 31||View Details|
|LabVIEW Training||Dec 19 to Jan 03||View Details|
Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.
Copyright © 2013 - 2023 MindMajix Technologies