Professional Documents
Culture Documents
LabVIEW Mostly Missed Question in CLAD
LabVIEW Mostly Missed Question in CLAD
Execute 0 times
If N is a
negative
To zero
Always
Execute 1
A. False, False
B. True, False
C. False, True
D. True, True
3. What is the value of next multiple ms wait if 10ms wired to the input
at the next iteration, supposedly after the end of the 4 th iteration the
time was 37ms.
A. 10ms
B. 100ms
C. 370ms
D. 470ms
CLAD MISSED QUESTIONS
1) What type of graph to use if 100 points of uneven data plot over a period time.
A. Chart
B. Graph
C. XY Graph
D. Intensity Graph
3 row 2 coln
2x2
Feedback Node: use to store the initialization value.
Error occurred once at end Wont run if close file Path dont wire
These cannot be wired together because their data types (numeric, array) do not match.
Figure 1:
Can not run if
bundle by name
does not wire.
Solution:
You can run if
bundle by name
input wired.
Once string value change, the even structure interact with the event.
Stop button wont stop the loop. Program must use Stop button on
menu bar to stop the loop.
DATA TYPES
U8 (positive only) : all 8 bits are being used to represent the value of the number.
For example 2-8 = 250 because 2^8 = 256 6
I8: first bit is used to denote the sing of the number. 7 bits remaining to represent the value -128 to 127
Coersion always select the larger data type.
For more information about data type
Go to Labview help >> search >> ente rdata types table
boolean : 8 bits data type
6 choices of mechanical actions:
Switch When Pressed: change control value each time we click it with the operating tool
Switch when released: only after we release the mouse button during a mouse click.
Switch until released: retains the new value until we release the mouse button. At this time, the
control reverts to its default value, as is the case with the operation of a door buzzer.
Note Latch when pressed: change the value of the control when we click it and retain the value unitl the VI
that reads it once. At this point, the control reverts to its default value, even if we continue to prese the
latch mouse button. This action is useful for stopping a while loop or getting the VI to perform an actionl
button only once each time we se the control
will
not Latch when released: changes the control value only after we release the mouse button. (dialog box).
work When the VI reads once, it reverts to its default value.
with Latch until released: changes the control value when we click it and retains the value until the VI
local reads it once or we release the mouse button depending on which one occurs last.
variab
le Undefined numeric number
NaN : not a number (operation divide by 0)
Error Cluster Includes the following
Status : boolean data type returns true if an error occurs
Code : signed 32 bits integer that identifies the error numerically. Code 0 indicates everything is fine
String: explain error or warnings
Use Simple Error Handling to pop up the dialog.
What Are Strings
Code Display: display more details of the ASCII characters and all non-
displayable characters as their backslash code. This includes spaces, tabs,
linefeeds, and the like.
Hex display is useful to communicate with instruments.
Dynamic Data
three types: control, type def, and strict type 1. Save the control
def. 2. apply the changes.
In Customize mode, we can move and resize the individual components of the control.
LabVIEW can use or create the following file formats: binary, ASCII, LVM, and TDM:
Binary Files are the underlying file format of all other file formats
ASCII file is a specific type of binary file that is a standard used by most programs. They are also called text
files.
LVM is a tab delimited text file you can open with spreadsheet application
TDM binary file created for national instruments. It is usually consists of two separate files: an XML and
binary file for waveform.
When to Use Test (ASCII) Files
Use text format files for your data to make it available to other users or applications if disk space and file I/O
speed are not crucial.
Text Files normally takes more memory than binary and datalog files since its ASCII takes one byte for
each character.
For example: -123.4567 takes 9 bytes
WHAT IS DAQ?
There are 3 pieces of DAQ sosftware that we will explore in this module:
1. Measurement and Automation Explorer (which is called MAX for short). Any installed DAQ
acquisition devices would automatically appear under this tab.
2. NI-DAQmx is the driver level software that can be installed with LabVIEW. Most importantly the NI-
DAQmx installed the DAQmx API, which is a set of Vis used to program DAQ applications.
1000/10000 = 1/10
USING SUBVI
Drag an drop the terminal into the block diagram to create a subVI
CTL + Double Click to go to subVI block diagram.
Required option terminal is only available for inputs, and not for outputs. (appear in bold)
Optional showed dim with no labels.
Instrument control
Generally instrument driver Vis communicate with an instrument using the LabVIEW VISA application programming
interface, or API.
Using Sequential programming
Wiring the error wire through Vis and SubVIs is a very common and preferred method for ensuring
sequential execution.
Flat sequence/stack sequence executes frame after frame.
What Is State Machine?
Create
Constant
Using State Machine
Parallelism
Race condition is difficult to debug because the outcome depends upon the order in which the operating system
executes scheduled tasks.
An ideal way to avoid race conditions is to simply allow only one section of the code to write to any one variable
whenever possible. (use Functional Global Variable or Semaphores) only one task enter at a time
Functional Global Variable
FGV is similar to shared variable, but programmer uses them very often due to the flexibilty to control
data in the shift register.
FGV is a subVI that must not be set to be re-entrant, meaning only one call to the subVI can occur at
a time.
Prevent race conditions.