Sunteți pe pagina 1din 10

UNIT III – PROGRAMMING TECHNIQUES

1. What is mean by Waveform chart?


The waveform chart is a special numeric indicator that displays one or more plots. The
waveform chart is located on the Controls»Graph Indicators palette. Waveform charts can
display single or multiple plots.

2. Define array.
Arrays group data elements of the same type. An array consists of elements and
dimensions. Elements are the data that make up the array. A dimension is the length, height, or
depth of an array.

3. What are the restriction for arrays?


Restrictions for Arrays
 We can create an array of almost any data type, with the following exceptions:
 We cannot create an array of arrays. However, we can use a multidimensional array or
use the Build Cluster Array function to create an array of clusters where each cluster
contains one or more arrays.
 We cannot create an array of non-XY graphs because a graph is an array data type and an
array cannot contain another array.
 We cannot create an array of charts.

4. What is one dimensional array?


One Dimensional Arrays
One Dimensional arrays have elements and indices. Below is a 10-element, one-dimensional
array. Notice that the first element has index 0, the second element has index 1, etc.

5.What is two dimensional array?


Two Dimensional Arrays
Two-dimensional arrays require two indices: a row index and a column index. These are used
like addresses to "look up" data elements in the array. Both indices are zero-based as in one-
dimensional arrays. Below is a five-row, seven-column array which can hold 35 data elements.
6. What is Array size?
Array Size

The Array Size Function returns the number of elements in an array it is wired to.

7. How to initialize arrays?


Initialize Array

Initialize Array crates an array of dimension size elements containing the element value.
8. Define build arrays?

Build Array

Build Array links multiple arrays. It appends elements to an array.

And it concatenates multiple arrays

9. What is Subset array?

Array Subset

Array Subset returns a portion of an array starting at index and containing length elements.
10. Define Polymorphism?

LabVIEW arithmetic functions like Add, Multiply, Divide. Etc. are polymorphic. This means
that the data structures on their inputs can be either scalar or array. If any inputs are of the array
data structure, the output will be an array data structure. If the inputs have array structures of
different sizes, the output will be an array that is the same size as the smallest input array.

11. What is operation of File I/O function?


File I/O operations pass data to and from files. Use the File I/O VIs and functions located
on the Functions»File I/O palette to handle all aspects of file I/O.

12. What is the use of File I/O function?(Nov09)


 Open and close data files
 Read data from and write data to files
 Read from and writ to spreadsheet-formatted files
 Move and rename files and directories
 Change file characteristics
 Create, modify, and read a configuration file
 Write to or read from LabVIEW Measurements files.

13. Define Array size and Array subset.


Array Size.Returns the number of elements in each dimension of an array. If
the array is n-dimensional, the size output is an array of n elements.
Array Subset.Returns a portion of an array starting at index and containing
length elements.

14. What are all graphs available?


 Waveform Graph . Plot an array of numbers against their indices
 Express XY Graph . Plot one array against another
 Digital Waveform Graph . Plot bits from binary data.
15. Define XY graph.
Definition. The XY Graph Indicator is a Cartesian graphing indicator used to plot multi-valued
functions like circular shapes, mathematical functions or waveforms with varying time bases.
Waveform graphs are designed to plot evenly-sampled waveforms. XY Graphs specify actual
points using their (X,Y) coordinates. The XY graph expects an input of bundled X and Y arrays.
Below is an example of an XY graph displaying a one-cycle Sine array versus one-cycle Cosine
array on an XY graph, which produces a circle.
To create an XY Graph, pop-up on the Front Panel > Controls > Graph > XY Graph

16. Define graph indicator.


Definition .Graph indicators are 2D displays of one or more data arrays in what are called plots.
There are two types of graphs: Waveform Graphs and XY Graphs. Their Front Panel display
looks the same, but they are functionally very different.

Both graphs often utilize Cluster data structures to control the incoming data display, so the
Bundle function is frequently used. For Waveform Graphs, the bundled components include the
initial X value, the delta X value (increment or spacing between X values), and the Y array data.

17. What are the types of waveform graph.

 Single-Plot Waveform Graphs


 Multiple-Plot Waveform Graphs

18. What is mean by single plot waveform graph?Below is an example of a single-plot waveform
graph displaying a 1D array of random numbers. This time the output is wired through a bundle
function with numeric constants setting the Initial X to 10 and the Delta X to 2. Notice that the
graph starts at 10 on the X axis and that the increment spacing is twice as wide (the X axis range
is between 10 and 210).
19. What is mean by multiple plot waveform graph?

You can create a multiple-plot waveform graph of two 1D arrays by combining the arrays with a
Build Array function which creates a 2D array. Below is an example. Notice that because the 2D
array is directly wired to the waveform graph, the Initial X is zero and Delta X is 1. Bundle
functions could be inserted between the loop output and the Build Array function to control the
graph display.

.
20. How to create Waveform graph/

To create a Waveform Graph, pop-up on the Front Panel > Controls > Graph > Waveform Graph

21. Define string.


A string is a sequence of displayable or nondisplayable (ASCII) characters. Strings often
are used to send commands to instruments, to supply information about a test or to display
results to the user.

22. Define cluster?


Create a cluster front panel object by choosing Cluster from the Controls»Modern»
Array, Matrix & Cluster palette.
• This option gives you a shell (similar to the array shell when creating arrays).
• You can size the cluster shell when you drop it.
• Right-click inside the shell and add objects of any type.
Note: You can even have a cluster inside of a cluster.
The cluster becomes a control or an indicator cluster based on the first object you place inside
the cluster.
You can also create a cluster constant on the block diagram by choosing Cluster Constant from
the Cluster palette.
• This gives you an empty cluster shell.
• You can size the cluster when you drop it.
Put other constants inside the shell.

23. What are the types of cluster?


 Bundle – Forms a cluster containing the given objects in the specified order.
 Bundle by Name – Updates specific cluster object values (the object must have an
owned label).
 Unbundle – Splits a cluster into each of its individual elements by data type.
 Unbundle by Name – Returns the cluster elements whose names you specify.
Note: You must have an existing cluster wired into the middle terminal of the function to use
Bundle by Name.

24. Define plot legend, scale legend, cursor legend and graph palette.
 Plot Legend—defines the color and style of the plot(s). Resize the legend to display
multiple plots.
 Scale Legend—Defines labels for scales and configures scale properties.
 Graph Palette—Changes scaling and formatting while a VI is running.
 Cursor Legend (graph only)—Displays a marker at a defined point coordinate. You can
display multiple cursors on a graph.

25. Define property node.


Property Node
Owning Palette: Application Control VIs and Functions
Installed With: Base Package
Gets (reads) and/or sets (writes) properties of a reference.
The Property Node automatically adapts to the class of the object that you reference. LabVIEW
includes Property Nodes preconfigured to access VISA properties, .NET properties, and ActiveX
properties.
Details  

26. What is mean by local and global variables?


 Local Variables: Local Variables break the dataflow programming paradigm,
 allowing data to be passed without wires.
 Global Variables :A special kind of VI, used to store data in front panel objects
 for the purpose of data exchange between VI.s.

27. What is FILE I/O?


File I/O operations pass data to and from files. Use the File I/O VIs and functions located
on the Functions»File I/O palette to handle all aspects of file I/O, including the following:
 Opening and closing data files
 Reading data from and writing data to files
 Reading from and writing to spreadsheet-formatted files
 Moving and renaming files and directories
 Changing file characteristics
 Creating, modifying, and reading a configuration file
28. Define strip chart.
The most common waveform chart where the display functions like a window on the data
which is in the form of a scroll. Data is displayed from left to right and at the end the data rolls
off from the left with the newest data all the time on the right

29. What are the three types of waveform chart display modes?

 Strip chart mode


 Scope chart mode
 Sweep chart mode

30. What is scope chart mode?


Scope chart mode - When the data plot reaches the right side of the display, the display goes
blank and starts over from the left side of the display.

31. What is mean by sweep chart mode?


Sweep chart mode - Is like the scope chart, but when the data plot reaches the right side of the
display, a moving vertical line that moves across the display marks the beginning of new data.

32. What are all graphs available?

 Waveform Graph . Plot an array of numbers against their indices


 Express XY Graph . Plot one array against another
 Digital Waveform Graph . Plot bits from binary data.

33. What are all the types of display?


 Analog and digital panel meter
 Strip chart recorder
 Plotter and printer
IMPORTANT UNIVERSITY QUESTIONS.

1. Explain the concept of arrays.(P.NO. 38 – 43) T1

2. Explain the concept of clusters (P.NO. 43 – 46) T1

3. What is mean by graph and explain with an example? .(P.NO. 49) T1

4. Define chart and give an example? .(P.NO. 50 - 57) T1

5. What are the different types of graph and explain with an example for each? .(P.NO. 52) T1

6. How to create local variable and explain with example? .(P.NO. 26) T1

7. How to create global variable and explain with example? .(P.NO. 26) T1

8. Explain about property node briefly? .(P.NO. 53) T1

9. What is string and give an example? .(P.NO. 76 - 87) T1

10. What is FILE I/O and describe it with example? .(P.NO. 65 - 67) T1

REFERENCE BOOKS

1. Sanjeev Gupta, ‘Virtual Instrumentation using Labview’ Tata McGraw Hill,


2004.

2. Gary Johnson, ‘Lab view graphical programming’, II Ed., McGraw Hill, 1999.

3. Lisa K Wells & Jeffrey Travels, ‘Lab view for everyone’, Prentice Hall, 2003

S-ar putea să vă placă și