CLAD Practice Questions

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

B) Tick Count (ms) Because the tick count is the only timer that rolls over to 0

Which timing function can result in logic errors when it rolls over to zero?

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.

e. Both B. and C Bc with the presence a coercion dot, LabVIEW converts the data to the larger of the two data types. This requires the creation of a memory buffer to store the coerced data

All of them!

3. Which of the following apply to Property Nodes? (More than one answer may apply.) a. Property Nodes allow attributes of front panel objects to be programmatically manipulated. b. Property Nodes can be used to update the values contained in a front panel object. c. More than one Property Node can be used for a single front panel object. d. Property Nodes can be used to programmatically generate a Value Change event

d. Yes, since the Error Out terminal from the subVI is not wired in the calling VI. Since automatic error handling is enabled in the main VI, and the error terminals of the subVI are not wired, LabVIEW automatically handles the error by displaying a dialog.

A VI has Automatic Error Handling enabled. It calls a SubVI that has Automatic Error Handling disabled. The Error Out terminal of the SubVI is unwired in the calling VI. The SubVI returns an error to the calling VI. Will an error dialog be posted because of Automatic Error Handling? a. No, since the SubVI has Automatic Error Handling disabled b. Yes, since he SubVI has Automatic Error Handling disabled c. No, since the Error Out terminal from the subVI is not wired in the calling VI. d. Yes, since the Error Out terminal from the subVI is not wired in the calling VI.

C Because B will only clear errors, not warnings. C makes it so that you can clear errors or warnings. A and D are obviously wrong. Good job.

A VI takes an input error cluster. If the cluster contains an error or a warning with code = 1 or code = 2, the VI should clear the error or warning. Which diagram implements this functionality?

d. Unknown We don't know how many time this VI has been run, so shift registers could hold any values

After 3 iterations, what will be the value at indicator D? a. 0 b. 10 c. 3 d. Unknown

a. Arrays to be automatically traversed from one iteration to the next and d. Arrays to be automatically accumulated at loop boundaries Because auto-indexing is a feature for loops interacting with arrays. Array functions themselves do not have iterative auto-indexing features.

Auto-indexing at loop boundary is a feature that allows: (More than one answer may apply.) a. Arrays to be automatically traversed from one iteration to the next b. Array functions to automatically index array elements c. Functions that use arrays to automatically index them d. Arrays to be automatically accumulated at loop boundaries

c. No, because you should always wire data directly into indicators when possible

Does this code snippet demonstrate an appropriate use of a Property Node? a. Yes, because updating the value via a Property Node uses less memory than writing to the terminal b. Yes, because updating the value via a Property Node allows for error checking c. No, because you should always wire data directly into indicators when possible d. No, because Property Nodes should only be used with more complex data types

b. case structure

For implementing state diagrams that allow future application scalability, the best choice for a base structure is? a. Sequence structure b. Case structure c. Formula node d. Object-Oriented structure

d. No Even though automatic error handling is enabled, all of the functions have error clusters wired to their outputs. This prevents LabVIEW from interrupting execution and displaying a dialog to the user even though an error has occurred. If any of the functions had no error cluster wired to their outputs, then LabVIEW would display a dialog and suspend execution.

For the VI shown in the following block diagram, automatic error handling is enabled. If the file C:\data.txt does not exist, will an error dialog box pop up? a.Yes, each time the error from the Open/Create/Replace Filefunction is returned b.Yes, each time a loop iteration completes c.Yes, but only once, not on each iteration of the loop d.No

c. Pre and post increment (++) and decrement (--) as in the C language

Formula nodes accept which of the following operations? a. Basic programming language instructions Inputand Print b. Embedding of SubVIs within the Formula Node c. Pre and post increment (++) and decrement (--) as in the C language d. The use of nested Formula Node structures

D) 14 bytes 2 Headers= 2*4byte (length&dimension) = 8 byte 6 1 Byte Array Data 8+6=14

How many bytes does LabVIEW write to the file when the code executes? A) 5 Bytes B) 6 Bytes C) 12 Bytes D) 14 Bytes

c.An input is required. and d.A broken run arrow will result unless the input is wired

If an input name on the Show Context Help window is in bold for a SubVI, which of the following conditions are true? (More than one may be correct) 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

c. State machine A state machine can be used to achieve the same functionality as a sequence structure. However, state machines allow the developer to programmatically determine the sequence at run-time. This makes the state machine implementation more scalable.

If possible, a Sequence structure should be replaced with a(n): a. Event structure b. For loop c. State machine d. While loop

D) Index 4! Search 1D Array literally searches an array for some value. Because string comparisons and searches in LabVIEW are case-sensitive and exact

The "start index (0)" input terminal of Search 1D Array is unwired.What value is displayed in the index of elementindicator after this code runs? A) 0 B) 2 C) 3 D) 4

C) 5 Because 4+1=5 and the value to be displayed in the Numeric Indicator only depends on the final iteration, when the value of the numeric is read and incremented.

The VI begins execution with the value of Numeric as 1. At the end of the 3rd loop iteration (i=2), the user changes the front panel control Numeric to value 4. What will be the final value of the front panel Numeric Indicator after the VI completes execution? A) 2 B) 4 C) 5 D) 6

C) -128 Because the maximum positive number that a I8 can represent is 127. When the sum of two I8 number is greater than 127, theanswer wraps around to -128

The VI begins execution with the values of datatype I8 of X= 127 and Y= 1. What value will be displayed in the X+Yindicator after the VI completes execution? A) 0 B) 128 C) -128 D) -127

a. Begins timing at program start and completes upon a multiple of the PC timer

The Wait Until Next ms Multiple function: a. Begins timing at program start and completes upon a multiple of the PC timer b. Begins timing after the code in the loop has completed and expires when the multiple of the (user) input time expires c. Begins timing after the code in the loop has completed and expires when the (user) input time completes d. Begins timing at program start and waits until the code in the loop has completed

C) To allow the processor time to complete other tasks

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

a. True Rings can use any numeric representation while enums can use only unsigned integers.

The data type of a Ring can be any of the allowable data types, whereas the numerical representation of the data type of an Enum can only be of unsigned data type. a. True b. False

D) Indeterminate Because race conditions exist because there is no coordination between the loops. (No way to know for sure which will complete first.)

The following VI has two parallel While Loops, and runs for 11 ms. What color is the Stop Boolean when the VI completes execution? A) Blue B) Green C) Both colors will be present D) Indeterminate

B) 0 The integers shown are unsigned 8-bit integers. The range for 8-bit integers is 0-255. The product of 2 times 128 is 256. As 256 is a number larger than the allowable 255, thus 256 wraps to 0

The value in Control ais 2 and in Control bis 128. What value does the Resultindicator display after the VI executes? A) -128 B) 0 C) 255 D) 256

C) The input data will be copied and converted to a different data type

What do coercion dots indicate? A) Incompatible data types B) A mathematical operation will be performed on the data C) The input data will be copied and converted to a different data type D) The location where an error will occur

D) Removes one reference to the queue and returns any remaining element

What does the Release Queue function do? A) Transfers the queue reference to other callers B) Sorts all queue elements in order and returns them as an array C) Clears all elements from the queue D) Removes one reference to the queue and returns any remaining element

B) Overwrites; maintain a history of

Unlike graphs, which display an entire waveform that ________ the data already displayed, charts update periodically and __________ the data previously displayed. A) Maintains a history of; overwrite B) Overwrites; maintain a history of C) Appends to; overwrite D) None of the above

b. Access to the properties of Front Panel objects in SubVIs

What functionality do Control References provide? a.Ability to add controls and indicators to a VI programmatically b.Access to the properties of Front Panel objects in SubVIs c.Control of multiple DAQ inputs through alias names d.Ability to wire from controls to functions and SubV

b.If two state changes occur at the same time, only the first state change will be handled and the second will be lost

What is one disadvantage of using the State Machine VI architecture? a.A State Machine canonly traverse states in order b.If two state changes occur at the same time, only the first state change will be handled and the second will be lost c.The diagram becomes significantly larger when changing from a general architecture to a State Machine d.State Machines cannot acquire data or use DAQ functions

D) Loop 1 runs forever and Loop 2 never runs Because the first loop never stops because False is wired to the conditional terminal. Since the first loop never stops, the second loop can't start as it does not have all its inputs

What is the behavior when the code executes? A) Loop 1 and Loop 2 run simultaneously B) Both loops run one time and stop C) Loop 2 runs after Loop 1 stops D) Loop 1 runs forever and Loop 2 never runs

A) Because A is an Enum and a Type Def, which are the requirements for the case selector inputs of a FGV.

What is the best choice for the case selector input for a Functional Global Variable design pattern?

b. Connect the error wire directly to the Stop terminal

What is the best method to stop a While loop on an error condition? a. Compare the Status boolean of an error cluster with a constant and wire it to the Stop terminal b. Connect the error wire directly to the Stop terminal c. Create an Event structure to handle the error event d. Use the Error Handler VI to automatically handle the error

B) To step through the block diagram when execution is paused

What is the purpose of these block diagram toolbar buttons? A) To display the data flowing through wires as the VI runs B) To step through the block diagram when execution is paused C) To start or skip SubVIs D) To run the VI in continuous or single run mode

d.Latch When Released

What mechanical action of a Boolean would you use to mimic a button on a Windows dialog? a.Switch Until Released b.Switch When Released c.Latch UntilReleased d.Latch When Released

B) Element2 i=4 so it is the fifth iteration!!!! Not the fourth!!! Stupid!!!

What value is displayed in the Outputindicator when the fifth iteration (i=4) of Loop 2 completes? A) Element1 B) Element2 C) Element3 D) Element1Element2Element3

C) 5 Since the loop doesn't iterate at all due to the empty array with size 0

What value is displayed in the Value Out indicator after the VI completes execution? A) 0 B) 4 C) 5 D) 6

C) Because you always go with the size of the smallest array

What value is displayed in the X+Y indicator after the code completes execution?

C)

What value will be displayed in the subarrayindicator after the following code has executed?

C. 3 Bc the block diagram places the coercion dot on the border of the terminal where the conversion takes place. The data is not coerced until after the addition, at which point it rounds to the nearest integer. 1.2+1.5=3 (DBL) then conversion

What will "Result" be after running the VI? A. 2 B. 2.7 C. 3 D. NaN

B) Step Over

When a VI is paused, clicking on the _________ button allows you to bypass a node in the Block Diagram without single-stepping through the node. A) Step Into B) Step Over C) Step Out D) Step Through

D) Error Codes

When clicking a broken run arrow, the Error list window shows all of the following EXCEPT: A) Items with errors B) Errors and warnings C) Details about the warnings D) Error Codes

c. 2 Because the event case shown handles two events: the Mouse Down event on the Button control, and the Mouse Down Event on the pane, or front panel. These two events occur simultaneously, so the event structures queues them up, and handles one and then the other. Thus two iterations occur, and the value in the shift register is incremented twice.

When the user clicks the Button control, how many times is the Increment function called? a. 0 b. 1 c. 2 d. 3

b.Scope Chart

Which Chart update mode should be used to draw new data from left to right, then clear the chart and draw new data again from left to right?a.Strip Chart b.Scope Chart c.Sweep Chart d.Step Chart

a. Data Space and d. Code

Which VI memory components are ALWAYS resident for a SubVI? a.Data Space b.Front Panel c.Block Diagram d.Code

a. Strip Chart Strip charts start plotting from left to right and continue to scroll while plotting. Scope charts start plotting from left to right and continue until the chart is full. Then the chart is cleared, and plotting resumes at the left. Sweep charts behave similarly to scope charts, except that once the chart is full, sweep charts start plotting at the left and progressively overwrite previously plotted data. There is no such thing as a Step chart in LabVIEW.

Which chart update mode should be used to show running data continuously scrolling from left to right across the chart? a. Strip Chart b. Scope Chart c. Sweep Chart d. Step Chart

a.Graphs; Charts

Which combination of words correctly completes the following statement? Unlike __________, which display an entire waveform that overwrites the data already stored, ___________ update periodically and maintain a history of the data previously stored. a.Graphs; Charts b.Charts; Plots c.Plots; Graphs d.Charts; Graph

B) Step Over

Which is a native debugging feature in LabVIEW? A) Step Back B) Step Over C) Step Around D) Step Above

All of the above

Which of the following apply to Property Nodes? a.Property Nodes allow attributes of front panel objects to be programmatically manipulated. b.Property Nodes can be used to update the values contained in a front panel object. c.More than one Property Node can be used for a single front panel object. d.Property Nodes contained in a SubVI will always cause the front panel to be loaded in memory

B) can be used to update the value of a front panel control or indicator

Which of the following apply to Property Nodes? They: A) allow attributes of files on disk to be programmatically manipulated B) can be used to update the value of a front panel control or indicator C) return an error if you attempt to read a property before it has been written D) can be used to invoke methods on a control

A) Wires Emphasize PARALLEL loops

Which of the following cannot be used to transfer data between two parallel loops? A) Wires B) Queues C) Notifiers D) Local variables

b. A type of enumerated control

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

B) TDMS can accept any LabVIEW data type Because TDMS is limited to a specific subset of LabView data types. It cannot read/write multidimensional arrays or arrays of timestamps

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

b. Bundle the X and Y array pairs together into two clusters and then create an array of these two clusters. Because XY graphs accept a cluster of two arrays, an X array and a Y array to generate a single plot. To generate multiple plots, XY graphs accept an array of these clusters.

Which of the following methods will create an XY Graph with two plots? a. Create a single cluster from two arrays of X values and two arrays of Y values in an X,Y, X,Y pattern. b. Bundle the X and Y array pairs together into two clusters and then create an array of these two clusters. c. Bundle the X and Y array pairs together into two clusters and create a cluster of these two clusters. d. Create a single array of each of the X arrays and Y arrays in an X,Y,X,Y pattern.

d. A SubVI icon can be edited from the functions palette

Which of the following statements is FALSE? a. A SubVI connector pane defines where to wire inputs and outputs b. The color of a SubVI connector pane terminal matches the data type it is connected to c. You must have an icon/connector pane to use a SubVI d. A SubVI icon can be edited from the functions palette

B) You can make an Array of Arrays Because Labview will not allow it: there is no need since you can just simply add more dimensions to an existing array

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

B) It contains exactly 10 elements Since the display index value for columns is '2', that means there are two columns not show (4 elements), along with the 6 visible elements, this array has exactly 10 elements

Which of the following statements is TRUE about Numeric Array? A) It is an indicator B) It contains exactly 10 elements C) It contains exactly 12 elements D) It contains exactly 8 elements

b. Build an n-dimensional array of data with each plot in a separate row (or column) in the array, then wire the array to the Waveform Graph indicator. and c. Bundle the elements of each waveform into a cluster and build an array of these clusters, then wire the array to the Waveform Graph indicator.

Which of the following will allow you to have multiple plots on a Waveform Graph? a. Bundle two 1D arrays of X and Y data together for each plot. Then build an array of these clusters and wire it to the Waveform Graph indicator. b. Build an n-dimensional array of data with each plot in a separate row (or column) in the array, then wire the array to the Waveform Graph indicator. c. Bundle the elements of each waveform into a cluster and build an array of these clusters, then wire the array to the Waveform Graph indicator. d. Both B. and C.

C.DBL DBL is the only data type listed that can store non-integer numbers.

Which of these allows storing decimal numbers such as 1.3 or 2.55? A.U32 B.I8 C.DBL D.U8

C. Cluster Bc it has three unrelated components: timestamp, data, dt

Which of these is the Waveform data type most similar to? A.String B.Numeric Array C.Cluster D.Timestamp

b. Key Navigation

Which setting assigns specific keys or key combinations to a front panel control? a.Key Focus b.Key Navigation c.Radix d.Distribute Objects

D) Sequence structures stop when an error is detected

Which statement about sequence structures is FALSE? A) Sequence structures support parallel operations within frames. B) Terminating the execution of a sequence structure before the entire sequence is completed is not possible without aborting. C) Sequence structures execute frames in a sequential order. D) Sequence structures stop when an error is detected

c.Indication that anevent occurred and LabVIEW processed the event

Which statement best describes a Notify event, such as the value change of a Boolean control? a.Indication that an event occurred and LabVIEW did NOT process the event b.Indication that an event occurred and was discarded by the user c.Indication that an event occurred and LabVIEW processed the event d.Indication that an event did NOT occur but specified Event timeout did oc

a. Functional global variable Because you can place critical data or sections of code in functional global variables. Since functional global variables are non-reentrant VIs, the possibility of race conditions is eliminated.

Which variable is commonly used to eliminate race conditions by preventing simultaneous access to code or data? a. Functional global variable b. Local variable c. Global variable d. Shared variable

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 Because for loops can run 0 times, and using a shift register is the r recommended way to preserve pass-through data in this scenario

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.

C) Control references are added for the property and invoke nodes

You are creating a SubVI by selecting a portion of code from an existing VI. The selection contains an implicitly linked property node and an implicitly linked invoke node for two different front panel controls. What new items are placed on the block diagram of the existing VI when the SubVI is created? A) Local variables are added for property and invoke nodes B) Global variables are added for the property and invoke nodes C) Control references are added for the property and invoke nodes D) Control Terminals are added for the property and invoke nodes

c. A type definition containing a cluster.

You are inputting data that represents a circle. The circle data includes an x position, a y position, and a radius. All three pieces of data are double-precision. In the future, you might need to store the color of the circle, represented as an integer. How should you represent the circle on your front panel window? a. Three separate controls for the two positions and the radius. b. A cluster containing all of the data. c. A type definition containing a cluster. d. An array with three elements

b. No

You customize a control, select Control from the Type Def. Status pull-down menu, and save the control as a .ctl file. You then use an instance of the custom control on your front panel window. If you open the .ctl file and modify the control, does the control on the front panel window change? a.Yes b.No

D) because A and B are wrong since they don't strip the current filename from the path and C would only work on Windows

You have been asked to write a VIcalled CLAD505 that will generate a path to test.txt. This txt file is in a folder called CLAD505_Support, and the folder is next to your VI. The VI must run on multiple platforms (Windows, Linux, etc.).

B) Error 7, because Merge Errors outputs the first error wired in to it from the top down

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

C) Configuring a Timeout case within the Event Structure

You must generate code that responds to multiple value change events using a Boolean control while maintaining a latching mechanical action. Which step is not required? A) Including or reading the Boolean control terminal in a loop B) Including the Event Structure within a loop C) Configuring a Timeout case within the Event Structure D) Configuring a Value Change event case for the Boolean control

D.Flatten the data to a binary string and send it to the other environment.

You want to export data from LabVIEW into another environment, but the other environment does not recognize LabVIEW data types. You should: A.Export the data using a property node. B.Unflatten the data from a binary string and send it to the other environment. C.Create a LabVIEW user event to transport the data. D.Flatten the data to a binary string and send it to the other environment.


Kaugnay na mga set ng pag-aaral

Microbiology, Ch 11 Nester's 8/9

View Set