You are on page 1of 3

LAB 8

APRIL 2022 SESSION

ENGINEERING SOFTWARE APPLICATIONS


(BEE 1081)

NAME :
MATRIC / STUDENT NO :
DATE :
LECTURER : DR MOHAMAD HUSHNIE HARON

FEEDBACK FROM LECTURER

FEEDBACK FROM STUDENT

Page 1 of 5
LAB 8

OBJECTIVE: To utilize array in LABVIEW for calculating the minimum, maximum and
average temperatures.

THEORETICAL BACKGROUND:
An array, which consists of elements and dimensions, is either a control or an indicator –
it cannot contain a mixture of controls and indicators. Elements are the data or values contained
in the array. A dimension is the length, height, or depth of an array. Arrays are very helpful when
you are working with a collection of similar data and when you want to store a history of
repetitive computations.

Array elements are ordered. Each element in an array has a corresponding index value,
and you can use the array index to access a specific element in that array. In NI LabVIEW
software, the array index is zero-based. This means that if a one-dimensional (1D) array contains
n elements, the index range is from 0 to n – 1, where index 0 points to the first element in the
array and index n – 1 points to the last element in the array.

PROCEDURE/METHOD:

1. Open a new VI and build the following front panel using the following tips.

a) Go to Numeric palette to the front panel. Right-click the Numerical


Indicator and label as Current Iteration.
b) Go to Boolean palette to the front panel. Right-click the Stop Button and
label as Stop.
2. Build the block diagram as shown in the next page.

a. Select Select a VI… and choose Thermometer.vi (from previous


exercise).
b. Right-click on Thermometer.vi and select Create >> Indicator
c. Re-label the indicator as Current Temperature
d. Select the While Loop on the Programming»Structures palette.
e. Click and drag a selection rectangle around the blocks shown above

f. Place the Wait Until Next ms function located on the


Programming»Timing palette and create a constant of 250. This
causes the While Loop to execute every 0.25s (250ms).
g. Place the Array Max & Min function located on the
Programming»Array palette. This function returns the
maximum and minimum temperature.
h. Add the Mean VI located on the Mathematics»Probability and
Statistics palette. This VI returns the average of the temperature
measurements.

e. Right-click the output terminals of the Array Max & Min function and
Mean VI and select Create»Indicator from the shortcut menu to create
the Max, Min, and Mean indicators.
f. Label the Max indicator as Max Temp, Min indicator as Min Temp,
and Mean indicator as Mean Temp.

3. Save the VI as Temperature Logger.vi.


4. Display the front panel and run the VI.
5. Write a lab report based on the experiment you have done.

You might also like