To eliminate the broken wire, you can use the shortcut (Ctrl+B). If you try to run your program (Figure 12), you will notice that the run arrow is broken now indicating that there is an error preventing the program from running. In order to know the source of the error, click on the broken arrow and an error list appears to help you identify the error. Close the error list window to proceed to the next step. Undo the last 2 actions (Ctrl+Z) to return the knob control in place.
FEAA200 : Introduction to Engineering and Architecture Experiment I-parts a & b 12 Choose the correct answer: Constants are (Outputs/Inputs) Indicators are (Outputs/Inputs) Controls are (Outputs/Inputs) Constant has corresponding terminal on front panel (T/F) Function palette is obtained from (block diagram/front panel) Front panel contains the program logic (T/F) Control has its wiring terminal on the (left/right) side Block diagram contains (program logic/ user interface) Different forms of controls and indicators can be found in the (controls palette/function palette) Every indicator on the front panel has a corresponding block on the block diagram (T/F)
FEAA200 : Introduction to Engineering and Architecture Experiment I-parts a & b 13 C. TASK 2: CALCULATE BILL Write a program that allows the user to input quantities of 3 items along with their prices according to the table below and calculates the bill total and displays the result in a numeric indicator. Item Quantity Price Pencil Input by user (numeric) Constant (2$) Book Input by user (numeric) Input by user (knob shape) Bag Input by user (numeric) Input by user (vertical pointer slide shape) Hints: You can use multiple multiplication and addition blocks from the numeric palette as needed Since addition block takes only 2 inputs, you can use multiple addition blocks To change the labels of controls and indicators (i.e. name them as pencil quantity, bag price, …), you can double cl ick on the label (on either the front panel or block diagram) and modify the name as needed. The slide and knob are by default limited to a range of 0-10. You can increase the range by double clicking on the maximum value on the front panel and typing the desired value. Figure 13 shows an intermediate step (incomplete version) of your VI. Complete the VI according to the specifications (table), input sample quantities and prices, run your program, and validate the result obtained. Figure 13 Intermediate (incomplete step) of bill calculation
FEAA200 : Introduction to Engineering and Architecture Experiment I-parts a & b 14 D. TASK 3: INSTANTANEOUS BILL CALCULATION The objective is to keep the program running and calculating the result in real time while the user varies the inputs (prices or quantities). Previously, the user inputs the data and should run the program to get the result, if the user needs to input new data, the program should be run again. To run the program continuously, a while loop 9 (LABVIEW structure) should be used (Figure 14).
You've reached the end of your free preview.
Want to read all 23 pages?
- Fall '16
- ........., Engineering and Architecture