Design Architecture
Main Page
A) Sequential Programming
B) State Machine
C) Parallelism
Sample Questions:
1) 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
2) If possible, a Sequence structure should be replaced with a(n):
a) Event structure
b) For loop
d) While loop
3) The following block diagram represents which common type of VI architecture?
a) Multiple Case Structure VI
b) General VI
c) State Machine VI
d) Parallel Loop VI
4) What is one disadvantage of using the State Machine VI architecture?
a) A State Machine can only 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
5) Which of the following is a type of multiple loop design pattern?
a) Master\Slave
b) State Machines
c) Simple Architecture
d) General Architecture
6) In the standard state machine architecture, if two state transitions need to happen at the same time, we can only define one transition and the other will be lost.
a) True
b) False
7) What are the three main phases of a general architecture design pattern?
a) Open file, read from file, write to file
b) Startup, main application , shutdown
c) Read data, perform calculation, store data
d) Run, loop, stop
8) Which type of architecture is best an application which takes an input value, scales it, and displays the result?
a) Simple state mechine
b) State mechines
c) Mater\slave
d) General Architecture
9) Design patterns can be used as a starting point to create a program.
a) True
b) False
10) Project templates use type definitions to quickly change all instances of a data type.
a) True
b) False
11) Free labels in our template VIs help us to
a) Build an executable
b) Speed up the execution of the code
c) Customize the template to our specific needs
12) It is a good idea to give project template VIs a filename prefix to avoid cross-linking of VIs.
a) True
b) False
13) Which of the following is not contained within the Simple State Machine template project?
a) Type Definition controls
b) A pre –build executable
c) Supporting Vis
d) Documentation
14) Full-featured project templates simplify the process of creating a project-based application.
a) True
b) False
15) What does the producer/consumer with events design pattern use to communicate data between loops?
a) Local variable
b) Queue
c) Shared variable
d) Notifiers
16) The user interface event handler design pattern is much more efficient than polling the controls.
a) True
b) False
17) How can the user interface event handler design pattern be modified to respond to VI and control events?
a) By merging the code within each event
b) By defining multiple events with the same code functionality
c) By defining new event cases
d) All of the above
e) None of the above
18) Which events does the user interface event handler design pattern detect?
a) Moves or clicks of the mouse
b) A change in value of a control
c) Keyboard key presses
d) All of the above
19) Event-based design patterns provide efficiency gains because they only respond when an event occurs.
a) True
b) False
20) Which is the best way to enforce order of operations?
a) Using dataflow, such as connecting error clusters together in the desired order.
b) Placing functions and Vis next to one another in the order in which they should execute.
c) Using a sequence structure.
d) None of the above
21) Which option should you see to transition to only possible state?
a) Select Function
b) Transition Array
c) Default transition
d) None of the above
22) If possible, a Sequence structure should be replaced with a(n):
a) Event structure
b) For loop
c) State machine
d) While loop
23) Why is the sequence local terminal displayed as unassigned in Frame 0 of the stacked sequence structure?
a) The developer chose not to wire the value to any terminal in this frame
b) The value is available only to frames after frame 1
c) The data type of the terminal is incompatible with the data type of Value
d) The developer disabled the terminal
24) What value does the Result F2 indicator display after the VI containing this Stacked Sequence structure executes?
a) 0
b) 25
c) 40
d) 65
25) Which of the following will cause an event to be captured by the LabVIEW Event Structure?
a) Changing a Front Panel control’s Value via a mouse click on the control
b) Changing a Front Panel control’s Value property via a property node
c) Changing a Front Panel control’s Value via a control reference
d) Changing a Front Panel control’s Value via a local variable
26) When the user clicks the Button control, how many times is the Increment function called?
b) 1
c) 2
d) 3
27) 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 occur
28) Which of the following will cause an event to be captured by the LabVIEW Event Structure?
a) Changing a value on a Front Panel control via a mouse click
b) Update of a Front Panel control using a property node
c) Programmatic update of a Front Panel control via a control reference
d) Using VI Server to update a Front Panel control
29) Which of the following will cause an event to be captured by the LabVIEW Event Structure?
a) Changing a value on a Front Panel control via a mouse click
b) Update of a Front Panel control using a property node
c) Programmatic update of a Front Panel control via a control reference
d) Using VI Server to update a Front Panel control
30) Which of the following will cause an event to be captured by the LabVIEW Event structure?
a) Changing a value on a front panel control via a mouse click
b) Update of a front panel control using a property node
c) Programmatic update of a front panel control via a control reference
d) Using VI server to update a front panel control
31) Which structure used for capturing user interface and dynamic events?
a) Case Structure
b) Event Structure
c) Sequence Structure
d) None of the above
32) Which allows you to write highly efficient code that waits for events to happen, rather than inefficient code that periodically checks whether events have happened?
a) Case Structure
b) Event Structure
c) Sequence Structure
d) None of the above
33) What is an event anyway?
a) You press a front panel Boolean.
c) The mouse cursor enters the VI window.
d) All of the above
34) Each case of an Event Structure can be registered to handle one or more events.
35) When an Event Structure executes, it will wait until an event has occurred and then execute exactly one case frame the case that is configured to handle the event that has occurred.
36) You can create and edit an Event Structure only in the LabVIEW Full and Professional Development Systems
37) When we first place an Event Structure on the block diagram, it will be preconfigured with only one event case that is set to handle the Timeout event.
38) The Timeout event is a special event that gets triggered if no other events (that the Event Structure is configured to handle) happen before the timeout value occurs.
39) What is the default timeout value (if unwired) in the event structure?
a) -1
b) 1
c) 0
d) NaN
40) The default timeout value (if unwired) is -1 in event structure, which means?
a) "Never time out" or "wait indefinitely."
b) Wait some time
c) Don’t wait
d) None of the above
41) which is used for configuring event cases of an Event Structure, alongside the front panel control that is configuring as an event source?
a) Edit Event dialog
b) Correct Event dialog
c) Show Event dialog
d) Make Event dialog
42) Without using an Event Structure, we can detect events such as pressing a Boolean control by periodically testing the value of the control. This technique is called?
a) Polling
b) Roaming
c) Calling
d) Waiting
43) An Event Structure will capture events that occur at any time while the VI is running, not just while the Event Structure is waiting. When the VI first starts running, the Event Structure creates an event queue, behind the scenes, for buffering events. As events occur, they are put into this event queue. When the Event Structure does execute, it dequeues the oldest event from the queue (First In First Out [FIFO]). If no events are in the queue, it will wait until the next event occurs. So, the bottom line is that the Event Structure will never "miss" events that happen while it is handling events, or after it handles events (before the While Loop reiterates and calls the Event Structure again). Those events will remain in the event queue until the Event Structure has handled them
44) The node on the left side of an Event Structure's event case, which contains event data.
45) The node on the right side of an Event Structure's event case, which is available only for Filter Events and is used for writing filtered event data or for discarding the event.
46) An event which cannot be filtered is called notify event
47) A special type of event that may be filtered programmatically inside an Event Structure. The data may be filtered or the event may be filtered, altogether. Filter Events will have an Event Filter Node on the right side of the event case.
48) We can distinguish notify events from filter events in the Edit Events dialog from the color of the arrow icon to the left of the event name in the Events listbox notify events have a green arrow next to them, and filter events have a red arrow next to them
49) The Event Structure also has a feature called Dynamic Events, which allows you to programmatically specify which controls will be handled by the event cases. You can pop up on the frame of the Event Structure and select Show Dynamic Event Terminals to show the terminals to which you can wire an Event Registration Refnum created using the Register For Events node
50) The dynamic event terminals, shown as follows, are available by right-clicking the Event structure and selecting Show Dynamic Event Terminals from the shortcut menu.
51) The Event structure guarantees that every single event will be detected, whereas it’s possible to miss very fast events when using polling.
a) True
b) False
52) Which of the following cannot trigger an event?
a) Turning off the Monitor
b) Clicking the Mouse
c) Hardware timers
53) Pressing a key on the keyboardWhile faster, the Event structure is less efficient than polling because it requires a significant amount of CPU usage.
a) True
b) False
54) Which of the following is not a part of the Event structure?
a) Timeout Terminal
b) Event Data Node
c) Event Selector Label
d) Initialization Terminal
55) The Event structure eliminates the need to continuously poll the front panel.
a) True
b) False
56) Based on how frequently certain events occur, some sections of code may run very often, while other sections of code may not run at all.
a) True
b) False
57) Which of the following is true about Event structures?
a) Event structure should be placed within a while loop
b) Avoid configuration two event structure s to have the same event
c) Value change can be used to detect changes in any given value
d) All of the above
58) The Event structure will execute continuously until a condition is met.
a) Tue
b) False
59) When are filter events used?
a) To override event data
b) To validate event data
c) To change event data
d) All of the above
60) When is it best to use notify events?
a) To respond to an event after it has occurred and LabVIEW has processed it
b) To Customize how a program responds to interations with the user interface.
c) To participate in the handling of the event



