LabView Basics

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Property Nodes

- Use to generate Value Change event - Manipulate attributes/values of front panel objects - Can use multiple property nodes for one front part object

If the value of a is 2 and b is 128, what value does the Result indicator display after the VI executes?

0

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?

1 The events queue up, so if it were not for the TRUE wired to the loop condition, the answer would be 2. However, the loop ends before we can process the second event that is still in the queue.

The time out input terminal of the Dequeue Element function is wired with the value 1. While the VI is running, how long does this Dequeue Element function wait to receive data?

1 millisecond

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

1-D Array of {10, 8, 5, 7} Array Subset returns a section of the input array starting at the provided index with input length

What is the output of the Initialize Array function after the following code has executed?

1-D Array of {3, 3, 3, 3}

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?

10

How many bytes does LabVIEW write to the file when the code executes?

17 bytes Header: 4 bytes per dimension, describe the length of the array in each dimension Dara: 9x1byre numbers 4+4+9=17

What value will be displayed in the Numeric indicator when the VI completes execution?

2

While the VI executes, the user presses and then releases Boolean Control with Switch Until Released mechanical action. Assuming that the starting value of Boolean Control is FALSE, what value does the Result indicator display after execution?

2

When the user clicks the Button control, how many times is the Increment function called?

2 2 Events: Mouse Down on Button control and Mouse Down on pane or front panel

While the VI executes, the user presses and then releases Boolean Control with Switch Until Released mechanical action. The starting value of Boolean Control is FALSE. What value does the Result indicator display after execution?

2 2 events generated

What value is displayed in the Result indicator after the VI completes execution?

2 In three loops only zeros will pass from the register, but the iteration will count 0, then 1 & then 2. Therefore the output from the addition function will be 0+2=2.

What is the value in Shift Register Answer after the following code has executed?

32

What value does the Result F2 indicator display after the VI containing this Stacked Sequence structure executes?

40

What does the Value Out indicator display after the VI executes?

5

What value is displayed in the Value Out indicator after the VI completes execution?

5

What value does the Numeric indicator display after this code executes?

8

Boolean stored as _____

8-bit value

What value is displayed in Result when the code executes?

A 1-D Array of {-25, 25}

What is the result in Array after the following code has executed?

A 1-D array of {1, 4, 3, 2, 1, 0, 8, 6, 2}

subVI

A VI that runs on the block diagram of another VI Appearance: Icon surrounded by yellow field

Strict Typedef

A strict type definition forces everything about an instance to be identical to the strict type definition, except the caption, label, description, tip strip, and default value. As with type definitions, the data type of a strict type definition remains the same everywhere you use the strict type definition.

Which of the following describes a Tab Control?

A type of enumerated control.

Semaphore

A way to limit the number of tasks that can simultaneously operate on a shared, protected resource(ie. writing to global variables or communicating with external instruments). Programming » Synchronization » Semaphore

Key Navigation

Allows programmer to assign keyboard actions to a controlm

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

An average of the last 4 Random Numbers will be displayed

Wait Until Next ms Multiple function

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

Wait Function

Begins timing at program start and waits until the code in the loop has completed

Wire - Green

Boolean

Which of the following statements is TRUE?

Both A and B are True

Queue

Buffered list that maintains a first in/first out (FIFO) order of data items. Programming » Synchronization » Queue Operations Unlike an array, it is not possible to randomly access elements in a queue. It is strictly a buffer that provides you the ability to enqueue (add/insert) and dequeue (subtract/remove) elements. The only way to view all the elements in a queue is to dequeue them one by one. You cannot perform data manipulation to all the elements in a queue.

How to have multiple plots on a Waveform Graph

Build a 2D array of data with each plot in a separate row (or column) in the array, then wire the array to the Waveform Graph indicator. or 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 methods will create an XY Graph with two plots?

Bundle the X and Y array pairs together into two clusters and then create an array of these two clusters.

Which equation is equivalent to the code?

C

Waveform Data Type

Carries data, start time, and dt of a waveform

For implementing state diagrams that allow future scalability, the best choice for a base structure is?

Case Structure

Wire - Red Chain

Class

Notifier

Comms btw multiple VIs or parts of the block diagram. Similar to mailboxes for data, one process sends data to the mailbox and one or several other processes receive data from the mailbox. One benefit: receiving process that stops execution while waiting, and starts only when new data becomes available. This reduces excess processing power being wasted on unneeded polling. Data Communication » Synchronization

Build Specifications

Configurations for source distributions, toolkits, and modules

What is the best method to stop a While Loop on an error condition?

Connect the error wire directly to the Stop terminal.

State Machine

Consist of While Loop containing Case Structure.

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?

Control References are added for property and invoke nodes

Positioning Tool

Cursor Icon Use to select/resize objects

Different Control Pallets

Different display style for front panel

Radix

Display component of integer controls that allows user to select between decimal/binary/octal/hex display

Button - Step Over

Executes a node and pauses at the next node

Icon vs Expandable Node

Express VIs and subVIs can be displayed as either How to: right-click the subVI or Express VI and remove the checkmark next to the View As Icon Note: If expandable node, you, can't enable database access

Why does an error occur when the code executes?

File opened with the incorrect access.

Operating Tool

Finger Point Icon Use to change values of a control

Button - Step Out

Finishes executing the current node and pauses

Components of a VI

Front Panel Block Diagram Icon/Connector Pane

enum

Give user a list of items from which to select Useful - makes choices equivalent to numbers, easy to manipulate in block diagram Each item is pair of values: string and 16-bit int

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.

Graphs; Charts

Wire - Purple Weave

Hardware Resource

Why is a shift register used for the file refnum input on the For Loop?

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 For Loops can run zero times, and using a shift register is the recommended way to preserve pass-through data in this scenario.

Which combination of words correctly completes the following statement? Unlike ___________ Property Nodes, _____________ Property Nodes require _____________ as inputs in order to function correctly.

Implicit; Explicit; Control References

Dependencies

In Project Explorer: VIs and items that VIs under a target require

How long does this Dequeue Element wait to receive data?

Indefinitely

Coercion Dot

Indicates a data type being wired into a terminal that accepts a different but compatible data type (like Int to Dbl)

Bold input name in Context Help Window

Indicates a required input

Cross-Linking

LabView opens sub-VIs based on relative location. If Labview doesn't find a sub-VI in the expected location, it searches for a VI with the same name and uses the first one it finds. It could find a VI created for a different project with the same name, this is Cross-Linking Labview cannot load two VIs with the same name Avoid by: - Avoid working on multiple applications with common dependencies - Maintain organized file folder structure - Avoid copying or moving segments of your app - Avoid common names such as "initialize.vi" - Use Project Libraries for namespacing to qualify common names

Button - Step Into

LabView opens the node or subVI as it hits it while stepping through execution

Which mechanical action of a Boolean would you use to mimic a button on a Windows dialog?

Latch When Released

Which of the following does not conform to the Dataflow programming paradigm?

Local Variables

Icon/Connector Pane

Maps inputs/outputs of the VI Makes it possible to use VI as subVI

You develop a subVI that only outputs a value and need to use this subVI in a (calling) VI. Which of the following is the best way to enforce dataflow to control the execution of the subVI?

Modify the subVI to have Error clusters that can be used from the calling VI

Required Input in Context Help Window

Name of input is in bold

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?

No - All functions have error clusters wired to their outputs. Error messages are collected through those outputs and execution is not interrupted to display the error message

String Display Options

Normal - Display printable chars; non-printable as boxes '\' Codes - Display backslash codes for non-displayable Password - Display * for each char, including space Hex - Display ASCII value for each char in hex

Wire - Orange

Numeric Floating Point

Wire - Blue

Numeric Integer

Unlike graphs, which display an entire waveform that ________ the data already displayed, charts update periodically and __________ the data previously displayed.

Overwrites; maintain a history of

Probe Tool

P in Circle on Arrow Icon Create probe to check intermediate values on wiring diagram

Wire - Dark Green Weave

Path

Which plot will change color first?

Plot 1 because properties are executed top-down.

Strip Chart

Plot from left to right, continue to scroll while plotting

Scope Chart

Plot from left to right, stop plotting when chart is full. Then chart is cleared and plotting resumes from the left

Sweep Chart

Plot from left to right, when chart is full start from the left overwriting the existing chart

Key Focus

Property that determines if a control is currently selected

Control Reference

Provides access to the properties of Front Panel objects in subVIs.

Wire - Dark Green Solid

Reference

Release Queue

Removes one reference to the queue and returns any remaining elements Destroys the queue

How to edit a subVI's Icon

Right-click the icon in upper right of VI and select Edit Icon

Which statement about sequence structures is FALSE?

Sequence structures stop when an error is detected.

Wiring Tool

Spool Icon Use to wire objects together on block diagram

If possible, a Sequence structure should be replaced with a(n)

State Machine

Clicking on the ____________ button allows you to bypass a node in the Block Diagram without singlestepping through the node.

Step Over

Dynamic Data Type

Store info from Express VI Can store any data type

Path Data Type

Store location of a file or directory

Wire - Pink

String

Chart Update Modes

Sweep Chart Scope Chart Strip Chart

You have a front panel control on a top-level VI that you must manipulate from within a SubVI. Which of the following could you pass to the SubVI to accomplish this?

The control's reference

What is an advantage of using a Strictly Typed VI Refnum?

The data types of the target are known at compile time

Which of the following statements is true about the following code?

The loop will execute infinitely and the program will have to be aborted.

Which of the following statements is TRUE regarding the execution of the following code?

The loop will iterate 51 times.

Wire Thickness

Thin -> Thick Scalar -> 1D Array -> 2D Array

Distribute Objects

Tool to organize front panel

Express VIs

Type of subVI you configure with dialog boxes Appearance: Icon surrounded by blue field

Labeling Tool

Typing Cursor in a Box Icon Use to enter text into control, create free labels

Express VI datatype

Use Dynamic Data Type for passing data between Express VIs

You need to programmatically update the value in a numeric control. Which is the most appropriate strategy?

Use a Local Variable

How do you document a VI so that the description appears in the Show Context Help popup window?

Use the VI Properties Documentation window.

Local Variable

Variable that appears on the block diagram but not on the front panel. Right-click existing front panel object or block diagram terminal and select Create»Local Variable

Wire - Purple Checkered

Variant

Execution Highlighting

View an animation of the execution of the block diagram. Shows movement of data using bubbles that move along the wires. Use with single-stepping to see how data moves from node to node through a VI.

Wire - Brown Rope

Waveform

Project Explorer

Window to manage project files

Automatic Tool Selection

Wrench/Screwdriver Icon - next to rectangle shape icon Turn on/Off automatic tool selection

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 posed because of Automatic Error Handling?

Yes, since the Error Out terminal from the subVI is not wired to the calling VI.

Where can you find Error Codes?

You must either look at an output error cluster or an error dialog to find the error code.

Data Value Reference

help manage memory and avoid frequent data copies by using data value references to store large data sets.

Merge Errors VI

only passes on the first error encountered, counting from the top node down.

Shift Register

similar to static variables in text-based programming languages, to pass values from one loop iteration to the next In State Machine, stores state information

By Default: Icon vs Expandable Node

subVI - Icon Express VI - Expandable Node

Race Condition

two or more pieces of code execute in parallel and have access to a shared piece of memory. If each piece of code is independent, there is no way to distinguish the order LabVIEW uses to access the shared resource.


संबंधित स्टडी सेट्स

Essentials of Strength Training and Conditioning Ch. 6

View Set

Incident Response and Computer Crime Investigations

View Set

research methods for behavioral sciences final exam study guide

View Set

Subnet Mask Dotted Decimal vs. CIDR

View Set

Adult Health Chapter 17 - Preoperative Nursing Management

View Set

17. Quiz 3: Stages of Development

View Set

Chapter 3: Proteins, Carbohydrates, and Lipids

View Set