4. Wait Test.vi Write a program that iterates the following task N = 10,000 times: During...
No answer yet for this question.
Ask a Tutor
Question:
Transcribed Image Text:
4. Wait Test.vi Write a program that iterates the following task N = 10,000 times: During the ith iteration, execute the Wait (ms) icon with milliseconds to wait equal to 1, and then store the resultant value of millisecond timer value (which is the number of milliseconds that have elapsed since your computer was turned on) as the ith element of an array. After this sequence of Nitera- tions, make your program plot the resultant N-element array of millisecond timer value values, after first subtracting off the initial "baseline" value (i.e., the first array element value). Also, display this resultant array in an Array Indicator called Elasped Time (ms) (this indicator can be resized using the ). The block diagram of your VI should appear as shown below. The Index Array icon is used to determine the initial "baseline" value of millisecond timer value (for an explanation of how this icon functions, consult its Help Window). 10000 Wait (ms) 10 Index Array 123 Waveform Graph Elasped Time (ms) JUR (a) Ideally, one would expect that this program produces a straight-line plot with slope equal to 1 and a final array element value equal to 9999 (the index of this element is 9999). Run your program a few times and demonstrate that this ideal expectation is close to, but not exactly, what is observed. (b) To explain your observations, modify your block diagram as shown next. Here, an array of integers, which begins at 0 and then increments by 1, is generated and subtracted from the array of part (a). If the ideal expectation of part (a) is met, this new program should produce an N-element array of zero values. LO000 Wait (ms) Index Array 8 Elasped Time (ms) 11123 13 JUBL Waveform Graph Run your modified program several times. You will most likely observe a plot with one or more discrete steps away from the zero-level. These steps are caused by your processor attending to other business, rather than paying strict attention to Wait (ms). That is, when a step occurs, it is due to the Wait (ms) taking a time in excess of 1 ms to execute. The height of the step mea- sures the excess time. For the steps you observe, what is the typical excess time (in milliseconds)? Is the frequency with which these steps occur depen- dent on prevailing operating conditions (e.g., clicking the mouse or pressing keyboard keys while your VI is running)? [This problem illustrates that Wait (ms) cannot be relied upon for precision millisecond-level timing. If inter- ested, try carrying out a similar investigation of the performance of Wait (ms) when milliseconds to wait equals 10 or 100.] 4. Wait Test.vi Write a program that iterates the following task N = 10,000 times: During the ith iteration, execute the Wait (ms) icon with milliseconds to wait equal to 1, and then store the resultant value of millisecond timer value (which is the number of milliseconds that have elapsed since your computer was turned on) as the ith element of an array. After this sequence of Nitera- tions, make your program plot the resultant N-element array of millisecond timer value values, after first subtracting off the initial "baseline" value (i.e., the first array element value). Also, display this resultant array in an Array Indicator called Elasped Time (ms) (this indicator can be resized using the ). The block diagram of your VI should appear as shown below. The Index Array icon is used to determine the initial "baseline" value of millisecond timer value (for an explanation of how this icon functions, consult its Help Window). 10000 Wait (ms) 10 Index Array 123 Waveform Graph Elasped Time (ms) JUR (a) Ideally, one would expect that this program produces a straight-line plot with slope equal to 1 and a final array element value equal to 9999 (the index of this element is 9999). Run your program a few times and demonstrate that this ideal expectation is close to, but not exactly, what is observed. (b) To explain your observations, modify your block diagram as shown next. Here, an array of integers, which begins at 0 and then increments by 1, is generated and subtracted from the array of part (a). If the ideal expectation of part (a) is met, this new program should produce an N-element array of zero values. LO000 Wait (ms) Index Array 8 Elasped Time (ms) 11123 13 JUBL Waveform Graph Run your modified program several times. You will most likely observe a plot with one or more discrete steps away from the zero-level. These steps are caused by your processor attending to other business, rather than paying strict attention to Wait (ms). That is, when a step occurs, it is due to the Wait (ms) taking a time in excess of 1 ms to execute. The height of the step mea- sures the excess time. For the steps you observe, what is the typical excess time (in milliseconds)? Is the frequency with which these steps occur depen- dent on prevailing operating conditions (e.g., clicking the mouse or pressing keyboard keys while your VI is running)? [This problem illustrates that Wait (ms) cannot be relied upon for precision millisecond-level timing. If inter- ested, try carrying out a similar investigation of the performance of Wait (ms) when milliseconds to wait equals 10 or 100.]
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
In the Learning Activity "Critical Areas of Financial Analysis" you learned how the opinions of other analysts are a way for managers to make decisions. Examine (Bond Ratings) carefully and...
-
The organizing committee for the HCC Celebrates Columbia's 50th Birthday, Inc., has planned a special event commemorating notable people originally from Columbia, MD. The committee has invited the...
-
In this project, we will write a program that controls a quiz show, much like the many popular TV shows. The program will read in a group of questions and their multiple choice answers, storing them...
-
Provide a brief description of the seven basic steps to use JDBC.
-
Show that the integral in Equation (1) of Example 28.14 has the value RC/2.
-
Find all possible Jordan forms of a transformation with characteristic polynomial (x - 2)4(x + 1) and minimal polynomial (x - 2)2(x + 1).
-
Fluid enters a tube with a flow rate of \(0.020 \mathrm{~kg} / \mathrm{s}\) and an inlet temperature of \(20^{\circ} \mathrm{C}\). The tube, which has a length of \(8 \mathrm{~m}\) and diameter of...
-
A company is considering the purchase of a new machine for $72,000. Management predicts that the machine can produce sales of $21,000 each year for the next 8 years. Expenses are expected to include...
-
S Each of the four independent situations below describes a sales-type lease in which annual lease payments of $100,000 are payable at the beginning of each year. Each is a finance lease for the...
-
FIT ($1,200.58 - $221.15 = $979.43 taxable)...................... (86.00)* how did you get the answer 86
-
Consider the following network. The objective is to fill the routing and forwarding tables of node X. N FA0/1 12- FAO/2 FA0/9 X FA0/5 6 W 8- 7. V 3- 4 T U Q1. Draw the shortest-path tree from X Use...
-
Your company is currently investigating the use of Linux. Your manager has asked you to research the feasibility of using Linux in both the server and workstation environments. Your manager would...
-
Evaluate logistics as a supply chain component, including how to measure performance, and key strategies to improve effectiveness. Chose one of the following subjects to address in this week's...
-
In the Criminal Justice field, is there a remedy or prevention to help curb biased decision making? Share your perspective.
-
1. 2. 3. 4. The county borrows $20,000 to acquire equipment with a useful life of 10 years and no anticipated salvage value. We will repay $5,000 of the principal of the debt at the end of each of...
-
You should use the questions listed in each section of Part A of the template to formulate your responses. However, your responses must be in paragraph format , not bullet points or Q & A format....
-
At what time between 6 and 7 are the hands of the clock coincide?
-
The words without recourse on an indorsement means the indorser is: a. not liable for any problems associated with the instrument. b. not liable if the instrument is dishonored. c. liable personally...
-
Bill and Guilda each own 50 percent of the stock of Radiata Corporation, an S corporation. Guilda's basis in her stock is $25,000. On July 31, 2012, Bill sells his stock, with a basis of $40,000, to...
-
Rebecca and Walter Bunge have been married for 5 years. They live at 883 Scrub Brush Street, Apt. 52B, Las Vegas, NV 89125. Rebecca is a homemaker and Walt is a high school teacher. Rebecca's Social...
-
How are qualified dividends taxed in 2012? Please give the two rates of tax which apply to qualified dividends, and specify when each of these rates applies._________________________...
-
Fill in the blanks to make the following statements correct. a. The term quantity demanded refers to ___________ purchases by consumers, whereas quantity exchanged refers to ___________ purchases by...
-
The following diagram describes the hypothetical demand and supply for canned tuna in Canada in 2019. a. Suppose the price of a can of tuna is $4.00. What is the quantity demanded? What is the...
-
Fill in the blanks to make the following statements correct. a. The term quantity supplied refers to ___________ sales by producers, whereas quantity exchanged refers to ___________ sales by...
Study smarter with the SolutionInn App