Engineering 103 –UMass Boston

CW 9

(In-Class-Work 9)

 

                                

Plotting a function using 1) For Loop; 2) Evaluation of Single Variable Array; 3) Waveform Graph (see class note for additional instructions)

a)     Make a VI that can plot any function between 0 and 4 (using N=101 points, for example). Use LabVIEW For Loop, Eval Single-Variable Array (version 7.1: under Analyze/Mathematics/Formula/Advanced Formula Parsing; version 8.2: under Mathematics/Scripts&Formulas/1D&2D Eval), and Bundle (under Cluster) to tell the Waveform Graph the initial value, increment for t (the function’s argument), and values of the function. Use cos(t) as the input function to be plotted. Click on the Light Bulb in the Diagram, and then click Run to see how the For Loop and the program work. Save the VI into a LLB file named cw9_XX_Y, as “part a” after selecting Files/Make Current Values as Default.

b)     Make another VI by modifying the VI  in a) such that it uses only 5 points. Note the difference. Then use trial-error method to see what is the smallest number of points that would make the graph look like the actual function. Save the VI into the same LLB file (cw9_XX_Y) as “part b” after doing Files/Make Current Values as Default with this smallest number of points

 

In each team, students working together at a computer numbered between 1 and 10 will submit LabVIEW LLB file cw9_XX_a.llb,  students working at a computer numbered between 11 and 20  will submit LabVIEW LLB file cw9_XX_b.llb, to the files folder in the server. Replace XX by 01 if team 1, etc. Each LLB file should contain two VI’s, named ‘cw9a’ and ‘cw9b’ corresponding to this CW. These files need to be uploaded to the server today to receive credit. Include your names within the files.

 

*Remember that this is an individual work (turn it in, as instructed, with your name and date). Home-works and class-works count 20% toward the course grade. Class-works are done in class.