Labview RM
Labview RM
Presented By
Prof. Bharati B. Sayankar
What You Need To Get
Started
Computer running
LabVIEW 8.5 or later
and Windows 2000 or later
Academic Development Stages
1.Platform Requirements
Cross-Compiler
Language
Target Board
Emulator
Multiple Scope
How LabVIEW Play Role?
5
Hardware Connections
SC-2075
BNC-2120
NI-ELVIS
SCB-68
How LabVIEW Play Role?
6
5,100 employees
More than 1,000 products
600 Alliance Partners
Advanced Food
ATE Military/Aerospace Research Petrochemical Processing Textiles
9
How does LabVIEW work?
LabVIEW programs are called:
Virtual Instruments (VIs)
because their appearance and
operation imitate actual instruments.
However, they are analogous to main programs,
functions and subroutines from popular language
like C, Fortran, Pascal, …
The G Language:
10
GetTempCAL(HeaterMat);
SetTempCAL(HeaterMat);
LockCAL(HeaterMat);
Guiding Principle:
A node does not run until
data sits at all its wired inputs.
Data Dependency
Why use LabVIEW?
• Easy to Learn - Intuitive.
12
• Easy to Use.
• No Syntax.
• Source code reads like schematic.
• Speed of development.
• Ready made controls for many instruments.
• Support.
• Easy and instant debugging.
• Power – Instant Parallel threads.
• No memory concerns. (Within Reason)
• As versatile as text-based languages.
Session Topics
13
What is LabVIEW?
LabVIEW Environment
LabVIEW Project
Parts of a VI
Menus & Palettes
Configurations
LabVIEW Data Types
LabVIEW Data Flow
Open and Run LabVIEW
14
Open Existing:
-VI
-Project
What is a Virtual Instrument (VI)?
15
–
Controls = inputs
–
Indicators = outputs
2. Block Diagram
Graphical source code
–
Data travels on wires from control terminals through
functions to indicator terminals
–
Blocks execute by data flow
3. Icon/Connector Pane
•
Graphical representation of a VI
•
Means of connecting VIs (subVIs)
Example 5: Creating Sub-VIs
Mid Level
• Array Manipulation (Transpose, interpolate,
subset...)
• String Manipulation (Search, format,
replace...)
• Time and Date
Built in Functions:
High Level
• File I/O
• Device communication (GPIB, serial etc…)
• Network communication (TCP, UDP, IrDA)
• Waveform manipulation (FFT, Filters, Analysis)
• Math
• Sound and Graphics
• Program Control
• Advanced: Semaphores, Queues,
Occurrences.
31
32
Demonstration:
Creating a new VI
Front Panel Toolbar
33
It is best not to use the Abort button because you run the
risk of not closing references or cleaning up memory
correctly
Text Settings
Pause
Align Objects
Highlight Execution
Distribute Objects
Retain Wire Values
Block Diagram
Terminals
• Block Diagram appearance of front
panel objects
• Entry & exit ports that exchange
information between the front panel
and block diagram
• Analogous to parameters and
constants in text- based programming
languages
Wires
• Transfer data between block diagram objects
DBL Integer
• Wires are different colors, styles, and Numeric Numeric
thicknesses, depending on data type String
• A broken wire appears as a dashed Scalar
black line with a red X in the middle 1D Array
2D Array
Types of Wire:
As terminals accept only defined data
types, so wires have defined types.
This is indicated by colour and style.
Usual data types:
• 8,16,32 bit Integers (Signed and
Unsigned)
• Single, Double and Extended floating
point
• Complex
• Boolean
• String
• Arrays
• Clusters (Combination of any above)
Block Diagram: Wiring Tips
• Press <Ctrl>-B to delete all broken wires
• Right-click and select Clean Up Wire to reroute the wire
• Use the Clean Up Diagram tool to reroute multiple wires and objects to
improve readability
Select a section of your block diagram
Click the Clean Up Diagram button on the block diagram toolbar (or <Ctrl>-U)
39
Block Diagram
Nodes
Objects on the block diagram that have inputs and/or outputs and perform
operations when a VI runs
Analogous to statements, operators, functions, and subroutines in text-based
programming languages
• Do not have front panels or block • Any VI has potential to become a • More discussion later
diagrams, but do have connector subVI
panes
• Double-clicking a subVI will open it
• Double-clicking a function only (exception: Express Vis- config.
selects the function – does not window opens)
open it like a VI
• Icon represents subVI in main VI
• Has a pale yellow background on
its icon
Common Data Types Found in LabVIEW
Numeric Controls and Functions
Control Indicator
Terminals Terminals
Creating a VI - 2
To find Square Root
Front Panel Window
Control
Terminals
Indicator
Terminals
Creating a VI - 3
To Convert temp degree to F
Front Panel Window
Control
Terminals
Indicator
Terminals
Creating a VI - 4
Convert Second into (Second ,Minute and hour)
Front Panel Window
Indicator
Terminals
Block Diagram Window
Control
Terminals
Creating a VI - 5
Random Number Generator
Front Panel Window
Indicator
Terminals
Control
Terminals
Creating a VI - 6
String Selection & Display
Front Panel Window
Indicator
Terminals
Control
Terminals
Creating a VI - 7
Compares of TEMP (MIN & MAX)
Front Panel Window
57
Creating a VI – G1
Interaction With Analog / Digital VI Object
Front Panel Window Block Diagram Window
Creating a VI – G2
OVER TEMP INDICATION
Front Panel Window Block Diagram Window
Creating a VI – G3
(frequency Generation) Interaction With Analog / Digital VI Object
Front Panel Window Block Diagram Window
Case Study-1
Study of frequency aliasing Effect
Front Panel Window
Programming
62
Example 1: Craps
LED DEFINATION
Ready LED
LED DEFINATION
LED DEFINATION
Power is applied, but USB connection is not
AMBER established
3] The USB-STC3.
C- Series Module
4] PFI signal
The PFI signals provide access to advanced features such as triggering,
synchronization, and counter/timers. PFI signals are available through hardware-
timed digital input and output modules installed in up to two chassis slots and
through the two PFI terminals provided on the NI cDAQ-9174 chassis.
Onboard regeneration 16
Onboard regeneration
1.6 MS/s (multi-channel, aggregate)
• 1 – 18V excitation
• Smart-sensor (TEDS) compatible
• NIST-traceable calibration
Data Acquisition