LabVIEW for Everyone: Graphical Programming Made Easy and Fun (3rd Edition)
Confused yet? You'll get a better feel for arrays as you work with them. In this exercise, you will finish building a VI that concatenates two arrays and then indexes out the element in the middle of the new concatenated array.
Build Array Function Build Array function (Programming>>Array palette). In this exercise, concatenates the input data to create a new array in the following sequence: Initial Array + Element 1 + Element 2 + Terminal Array. Build Array Function The function looks like the icon at the left when placed in the diagram window. Place the Positioning tool on the lower-middle edge and resize the function with the resize handles until it includes four inputs. Array Input Element Input The inputs will automatically detect whether you are wiring an array or an element. The symbols at the left indicate whether an input is an array or an element. Array Size Function Array Size function (Programming>>Array palette). Returns the number of elements in the concatenated array. Index Array Function Index Array function (Programming>>Array palette). In this exercise, returns the element in the middle of the array.
You might also want to look through the programs in EXAMPLES/GENERAL/ARRAYS.LLB in the LabVIEW directory, to see some other things you can do with arrays. These examples can be easily found using the NI Example Finder (from the Help>>Find Examples menu) by selecting Browse according to: Directory Structure and then navigating the tree control to general/arrays.llb. |
Категории