Uploaded by IVAN ZHOU

EI Lab 4 - Arrays and data manipulation in LabVIEW(1)

advertisement
DR. LUIS C. BÁSACA PRECIADO
ELECTRONIC INSTRUMENTATION
LABORATORY EXERCISE NO. 4
ARRAYS AND DATA
MANIPULATION IN LABVIEW
1.
Design a VI in which the user must manually fill in an array of one dimension (10 double-type elements).
a.
Use numerical controls to enter the data and create an array from the data.
b.
Display on screen and graph the contents of the array.
c.
Reverse the order of the array elements, display on the screen, and graph.
d.
Insert the number 9999 into a user-given position in the array.
e.
Front Panel Example
DR. LUIS C. BÁSACA PRECIADO
2.
ELECTRONIC INSTRUMENTATION
Design a VI that reads the Lab4ex2_data.csv file and stores the elements of the file in an array (array1).
a.
Display the size of array1.
b.
Create an array (array2) of one dimension (20 double-type elements), initialize its elements to 5, and
sum array1 and array2.
c.
Display on the screen and graph the contents of the resulting array gives the sum (array3).
d.
Take array1 and array2 and concatenate their values into a single array (array4).
e.
Front Panel Example
DR. LUIS C. BÁSACA PRECIADO
3.
ELECTRONIC INSTRUMENTATION
Design a VI that does the following:
a.
Create a one-dimensional array (50 double-type elements) that is initially filled with 0's.
b.
Automatically populate the array with random numbers.
c.
Reverse the order of the array elements, display on the screen, and graph.
d.
Display the largest, smallest, and average number of elements in the array.
e.
Save the resulting array to a file named “Lab4ex3_data.csv”.
f.
Front Panel Example
Report requirements:
• Abstract
• Introduction
• Theoretical framework: Description of functions used in development.
• Development of each exercise, include images.
• Research questions:
o What are the basic operations on arrays in LabVIEW and how are they implemented?
o How does LabVIEW facilitate data manipulation through array functions, and what are some common
use cases?
o What are the advantages and limitations of using arrays for data storage and manipulation in LabVIEW
compared to other data structures?
• Conclusions
• Use the IEEE format to generate your laboratory report.
• Attach the report (pdf) and the virtual instrument (.vi) file in the Blackboard activity.
Download