Sie sind auf Seite 1von 6

Berbano,Megan Pearl U.

EC41FB1 / ECE 401


EXERCISE NO. 2
(Prelim)

Placing a two numeric control and indicator on front


panel and naming them x, y, Sum, and Average
respectively.

Placing an add and divide function in the block


diagram. That can be accessed in the Functions >
Express > Arith & Comparison > Numeric. Click and
drop the add and divide node in the BD.

Pressing ctrl+E to toggle between front panel and


block diagram. The changes saved on front panel will
also be saved in block diagram.

Connecting x and y to the input terminals of add

function and connect to the sum. The sum can be


connected to the x terminal of divide function.
Terminal icons, by default, are viewed as icon.
For more compact BDs, right-click on a terminal icon,
then uncheck the View As Icon option.
Creating a constant 2 to obtain the average of two
inputs.

Editing the VI icon to easily determine the subVI.

Run the VI, putting an inputs 6 and 5 and obtaining


its sum and average.

Put a two knobs and naming them input 1 and input 2.


Adjust the size of input 1 by changing it to Byte I8.

Open the subVI act01-01 and connect the terminals.


Add a function greater or equal and create a
constant 9.

Placing a gauge, numerical indicator and round LED.


Name then average, sum and warning respectively.

Enclose the entire program in a While loop structure


in the block diagram.

5. Save and run the VI. Adjust the knob and verify the functionality of the VI.

Question: How does the VI work? Discuss the functionality as observed from running the VI.
The user will set a value in the two input knobs the sum will be seen in the indicator and the average in the gauge. If
the average of two input reaches to 9 or more than the round LED warning will light up.
6. Set the value of the Input 2 knob to zero. Note: The value at which the knob is set can be seen while it is being
adjusted. Make adjustments to the knob of Input 1 and observe the value at the Sum numeric indicator.
Question: What can be said about the set of values that the Input 1 takes? What is the data type of Input 1? What,
then, can be inferred with the set of values that is represented by the data type like that of Input 1?
The input 1 knob has an interval of one in its value. From DBL we changed its data type into Byte I8. And makes the
values set into one unit interval.
Question: Differentiate I64, I32, I16 and I8 data types.

7. Set the value of Input 1 knob to zero, then make adjustments to the knob of Input 2, while observing the value of
the numeric indicator.
Question: What is the data type of Input 2? Compare the observations that have been made with the data types of
Input 1 and Input 2.
The data type of Input 2 Knob is Double Precision (DBL). It has a precision in values set by input 2.
Question: Differentiate the data types EXT, DBL, SGL, and FXP.

8. Stop the program from running by pressing the Stop button in the FP or by clicking the Stop icon in the BD or FP.
Place a numeric indicator in the FP and in the BD then connect the output of the Greater or Equal? node to the input
of this indicator.
Question: What happens? Why? What are the possible indicators that can replace this numeric one

An error occurs because they are of different types. The greater or equal node is Boolean can be true or false while
the indicator has a value of real numbers.
Question: Compare the wires connecting the indicators to the tunnels. Why is this so?
Tunnel is an output loop and connected it to indicator which is another output. You should add a source or change
the indicator into control.
Question: Describe the functionality of the program. Compare the output of the Output with Indexing and Output
without Indexing indicators.
The output without indexing indicators will just make the LED light up to know the average of two input reaches or
more than 9 and without knowing the exact values. While the output with indexing, you will be aware of the output
obtain by the users input and you can tell exactly the values.

Das könnte Ihnen auch gefallen