Clad Study Guide

Páginas: 35 (8508 palabras) Publicado: 7 de octubre de 2011
CLAD Study Guide

Table of Contents

Section 1: LabVIEW Programming Concepts 2
Section 2: LabVIEW Environment 6
Section 3: Software Constructs in LabVIEW 10
Section 4: Programming Vis and functions 17
Section 5: Data Communication and Synchronization VIs and Functions 19
Section 6: VI Server and Functions 22
Section 7: Errors handling VI’s and Functions 26
Section 8: VI Design Patterns29
Section 9: SubVI Design 37
Section 10: Debugging VI’s 39
Section 11: VI Design and Documentation 43
Section 12: Memory, Performance, and Determinism 45
Section 1: LabVIEW Programming Concepts

Data Flow

LabVIEW follows a dataflow model for running Vis.

A block diagram node executes when all its inputs are available. When a node completes execution, it supplies data to its outputterminals and passes the output data to the next node in the dataflow path.

Visual Basic, C++, JAVA, and most other text-based programming languages follow a control flow model of program execution. In control flow, the sequential order of program elements determines the execution order of a program.

Consider the block diagram above. It adds two numbers and then multiplies by 2 from theresult of the addition. In this case, the block diagram executes from left to right, not because the objects are placed in that order but because one of the inputs of the Multiply function is not valid until the Add function has finished executing and passed the data to the Multiply function. Remember that a node executes only when data are available at all of its input terminals, and it supplies datato its output terminals only when it finishes execution. In the second piece of code, the Simulate Signal Express VI receives input from the controls and passes its result to the graph.

You may consider the add-multiply and the simulate signal code to coexist on the same block diagram in parallel. This means that they begin executing at the same time and run independently of one another. If thecomputer running this code had multiple processors, these two pieces of code could run independently of one another (each on its own processor) without any additional coding.
Polymorphism

A programming language feature that allows values of different data types to be handled using a uniform interface.

In LabVIEW: the ability of VIs and functions to automatically adapt to accept input dataof different data types (i.e. Numeric Functions); Useful when performing the same operation on different data types

Section 1 Practice Questions

1. 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?

a. Use the SubVI in a Sequence structure
b. Modifythe SubVI to have dummy inputs that can be used from the calling VI
c. Modify the SubVI to have Error clusters that can be used from the calling VI
d. Modify the SubVI to have a global variable and use it from the calling VI

2. Which of the following does not conform to data flow programming paradigm?

a. Shift Registers
b. Tunnels
c. SubVIs
d. Local Variables

3. In the figure below,what will Result equal when this calculation is executed?
a. 55
b. 70
c. 65
d. Indeterminate

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

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

5. What determines the program order of execution of code in LabVIEW?

a. The time when you entered the code
b. It goes from left to right.
c. The data flow

6. In the following VI,what will be the execution order of functions?

[pic]

[pic]
[pic]
[pic]
[pic]

Section 1 Answers
1. C
2. D
3. B
4. B
5. C
6. C

Section 2: LabVIEW Environment

LabVIEW programs are called virtual instruments (Vis).
Controls are inputs and indicators are outputs.
Each VI contains three main parts:
Front panel – How the user interacts with the VI

Block diagram – The code...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Study Guide Chilean Roma
  • Elementary study guide
  • Technology study guide
  • Study guide answers
  • 1St partial study guide
  • Study Guide For Fraud
  • Chem Study Guide
  • Spanish Study guide

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS