100% found this document useful (1 vote)
167 views13 pages

Examen Module Complémentaire Labview: Exercise 1 (7 PTS)

This document contains an exam for a LabVIEW module complementaire course. It includes two exercises and a quiz with 32 multiple choice questions about LabVIEW programming concepts and functions. The first exercise describes a sample VI and asks students to analyze its front panel, block diagram, and algorithm. The second exercise asks students to draw the block diagram for a VI that calculates and stores values in an array. The quiz questions cover topics like documentation, data types, loops, arrays, charts, and file I/O.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
167 views13 pages

Examen Module Complémentaire Labview: Exercise 1 (7 PTS)

This document contains an exam for a LabVIEW module complementaire course. It includes two exercises and a quiz with 32 multiple choice questions about LabVIEW programming concepts and functions. The first exercise describes a sample VI and asks students to analyze its front panel, block diagram, and algorithm. The second exercise asks students to draw the block diagram for a VI that calculates and stores values in an array. The quiz questions cover topics like documentation, data types, loops, arrays, charts, and file I/O.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

République Tunisienne

Ministère de l’Enseignement Supérieur


Université de Tunis El Manar
Ecole Nationale d’Ingénieurs de Tunis
Département Génie Electrique

Examen Module Complémentaire LabVIEW


Année universitaire 2019/2020 Documents non autorisés
Classes : 3AGE1, 2 & 3 Durée : 2H
Date : mercredi 30 octobre 2019 à 8H30 Nombre de pages : 13
Enseignants : K. Ben Saad & J. Haggège

Exercise 1 (7 pts)

Let’s consider the VI whose Front Panel is given by Figure 1 and Block Diagram is represented on
Figures 2 to 6, while Figure 7 represents the context help of some functions used in the VI.

1. What are the types of the elements appearing on the Front Panel?
2. Describe precisely the structures used in the Block Diagram.
3. Explain what this VI is doing and draw a flowchart of the implemented algorithm.
4. How many times the While Loop executes?
5. Propose a solution to make it execute only once, when the “Apply action” control is pressed.

Figure 1

1/13
Figure 2

Figure 3

Figure 4

2/13
Figure 5

Figure 6

Figure 7

3/13
Exercise 2 (3 pts)

Draw the Block Diagram of a VI that calculates and stores in an array the first ten elements of
the sequence defined by the following recursive equation:
un +=
1 un + 5

u0 = 0

Quizz (10 pts)

1. How do you document a VI so that the description appears in the Show Context Help
popup window?
a. Use the VI Properties Documentation window
b. Type in the Show Context Help window
c. Create a free label on the front panel
d. Edit the LabVIEW help files

2. Can a wire be used to pass data between loops that are intended to run in parallel?
a. Yes
b. No

3. Which of the following describes a Tab Control?


a. A control that outputs ASCII values equal to the selected tab label
b. A type of enumerated control
c. A control that outputs a cluster of the controls / indicators on the tabs
d. A controls that outputs the tab order of the controls on the front panel

4. A coercion dot indicates that:


a. The data types are consistent
b. A polymorphic operation will be performed on the data
c. A data buffer is created to handle data conversion
d. Data values are being coerced because they are out of range

5. In the figure below, what will Result equal when this calculation is executed?

a. 55
b. 70
c. 65
d. Indeterminate

4/13
6. The function of a Cluster is to:
a. Allow grouping of mixed data types into logical structures.
b. Present data on the Front Panel using charts or graphs.
c. Provide a means of differentiating between data types on the Block Diagram.
d. Separate data objects by data type on the Front Panel.

7. Can Probes be attached to objects on the Front Panel:


a. Yes.
b. No.

8. What is the result in subarray after the following code has executed?

a. A 1-D Array of {8, 5, 7}


b. A 1-D Array of {10, 8, 5}
c. A 1-D Array of {10, 8, 5, 7}
d. A 1-D Array of {7, 10, 8, 5}

9. In the figure below, the output of Array Size is

a. a 1-D Array of {2, 3}


b. a 1-D Array of {3, 2}
c. 2
d. None of the above

10. What is the result of the following Array subtraction?

a. A 1-D Array of {-25, 25, 50}


b. A 1-D Array of {-25, 25}
c. A 2-D Array of {{-25, -50, -50} , {50, 25, 25}}
d. A 1-D Array of {75, -50, 25}

5/13
11. Which of the following allows you to plot any set of points, evenly distributed or not?
a. Waveform Graph
b. Waveform Chart
c. XY Graph
d. Both A. and C.

12. The Wait function can be added to While Loops:


a. To free up available memory.
b. To allocate memory used by the CPU.
c. To allow the processor time to complete other tasks.
d. To reserve which processor the code is running on.

13. Which of the following methods is NOT a method to create a 1-D Array:
a. Place an Array Shell on the Front Panel and drag a Control into the shell.
b. Use a While Loop with auto-indexing disabled.
c. Use a For Loop with auto-indexing enabled.
d. Use the Initialize Array function.

14. Which of the following statements is true regarding the execution of the following code?

a. The loop will iterate 51 times.


b. The loop will iterate 50 times.
c. The loop will iterate 49 times.
d. A For Loop that has a 50 wired to the count terminal will perform the same operation.

15. Which of the following accurately describes the output that results from execution of the
following loop?

6/13
a. The last three values from the DAQ Assistant will be displayed.
b. A running average of all measurements will be displayed.
c. An average of the last four measurements will be displayed.
d. None of the above

16. Which of the following statements is NOT valid:


a. You can make a Cluster of Clusters.
b. You can make an Array of Arrays.
c. You can make a Cluster of Arrays.
d. You can make an Array of Clusters.

17. Which of the following statements is true?


a. The default setting for a tunnel into or out of a For Loop has auto-indexing enabled if
the data being passed is an array.
b. The default setting for a tunnel into or out of a While Loop has auto-indexing disabled
if the data being passed is an array.
c. Both A. and B. are true
d. None of the above

18. Which of the following statements is true regarding the use of Coercion Dots?
a. Coercion Dots improve program performance.
b. Coercion Dots represent a conversion from one data type to another.
c. Coercion Dots increases memory usage
d. Both A. and B.
e. Both B. and C.

19. The following breakpoint does which of the following:

a. Causes the VI to abort


b. Causes the VI to pause
c. Causes the VI to single step over the addition
d. Causes the VI to single step over the indicator

7/13
20. Which of the following is NOT a component of an Error Cluster?
a. Status.
b. Code.
c. Source.
d. VI name

21. What is the value in XOR Result after the following code has executed?

a. 0
b. 1
c. True
d. False

22. Which of the following statements regarding the index of Arrays are NOT true:
a. The index is used to access a particular element of an Array.
b. The index ranges from 1 to n.
c. A 2-D Array has both a column index and a row index.
d. The index ranges from 0 to n-1.

23. Clusters provide a user with which of the following benefits?


a. Clusters allow a logical grouping of related data elements.
b. Clusters increase the number of Connector Pane terminals of SubVI’s.
c. Clusters help to reduce wire clutter on the Block Diagram.
d. Both A. and C.

24. Which chart update mode plots new data from left to right, then clears the chart and plots
the newer data?
a. Strip Chart
b. Scope Chart
c. Sweep Chart
d. Step Chart

8/13
25. What value is displayed in the Value Out indicator after the VI completes execution?

a. 0
b. 4
c. 5
d. 6

26. How many errors does LabVIEW display at the end of execution?

a. No Errors
b. One Error
c. Two Errors
d. Three Errors

27. Which of the following statements is TRUE about the following code segment?

a. The loop will execute once and the indicator Iteration will have a value of one
b. The loop will execute once and the indicator Iteration will have a value of zero
c. The loop will execute continuously and the program will have to be aborted
d. The loop will not execute and the indicator Iteration will have a value of zero

9/13
28. Why is a shift register used for the file refnum input on the For Loop?

a. If the Values to Write to File array is empty, the For Loop will run zero times, but the
refnum value will be passed through to the shift register output
b. The Write to Text File function modifies the value of the refnum on each For Loop
iteration
c. It is the only way to prevent the For Loop from building an array at the refnum output
terminal
d. No reason. A regular tunnel would provide identical functionality to the shift register

29. The following SubVI is loaded into memory and then run. At some later time it is still in
memory and is run a second time.
What is the value is displayed in the Sum indicator when the SubVI completes execution the
second time it is run?

a. 5
b. 10
c. There is no way to know
d. 0

30. Which of the following is FALSE about File I/O using binary or TDMS file formats?
a. Binary files can accept any LabVIEW data type
b. TDMS can accept any LabVIEW data type
c. TDMS is generally faster in writing than binary
d. Binary file I/O can be used by all versions of LabVIEW

10/13
31. What value is displayed in the Result indicator after the VI completes execution?

a. 3
b. 2
c. 1
d. 0

32. After the VI starts running, the user clicks the "Event1" button twice. The event structure
has no other event cases.
What will be displayed in the "Time 1" indicator when the VI stops executing?

a. 0
b. 1
c. 2
d. Undetermined

11/13
33. You have written a LabVIEW VI with three parallel code paths. All three error cluster
wires are wired into a Merge Errors function.
What error is reported to the user?

a. Error 1014, because Merge Errors outputs the first error to occur chronologically
b. Error 7, because Merge Errors outputs the first error wired in to it from the top down
c. Error 1, because Merge Errors outputs the most significant error of the errors wired in
to it
d. All three errors are reported, because Merge Errors concatenates the errors into a
single error message to display to the user.

34. Which of the following are benefits of instrument control?


a. Automate processes
b. Improve productivity and repeatability
c. One platform for multiple tasks
d. Limited to only one type of instrument

35. A SubVI is created by selecting the code from a block diagram.


How many terminals will the SubVI have?

a. 3
b. 4
c. 5
d. 6

12/13
36. What settings should be selected for a custom control so that all copies of the control are
of the same data type yet have the flexibility to use different colors and styles?

a. Control
b. Type Def.
c. Strict Type Def.
d. Flex Def.

37. If an input name on the Show Context Help window is in bold for a SubVI, which of the
following conditions are true?
a. Input values must be scalar.
b. An input is recommended, but not required.
c. An input is required.
d. A broken run arrow will result unless the input is wired.

38. The most efficient method for creating an array is:


a. Using a For loop with Auto-indexing
b. Placing a build array function in a While loop
c. Initializing an array and then replacing elements in a While loop
d. Using a While loop with Auto-Indexing

39. Which of the following is NOT a traditional debugging feature used to help find errors in
a VI:
a. Highlight Execution.
b. Single Stepping
c. Breakpoints
d. Stop Values

40. What VI is typically used to terminate an Error Cluster wire and to display any error
message?
a. Merge Errors
b. One Button Dialog/Two Button Dialog
c. Generate Front Panel Activity
d. Simple Error Handler

13/13

You might also like