labview and g graphical programming language by: ramtin raji kermani

Post on 31-Mar-2015

232 Views

Category:

Documents

8 Downloads

Preview:

Click to see full reader

TRANSCRIPT

LabVIEWand “G” Graphical Programming Language

By: Ramtin Raji Kermani

What is LabVIEW?

LabVIEW (Laboratory of Virtual Instrument Engineering Workbench) is a development environment based on graphical programming.

What is LabVIEW?

LabVIEW relies on graphical symbols rather than textual language to describe programming actions

The principle of dataflow, in which functions execute only after receiving the necessary data, governs execution in a straightforward manner.

LabVIEW features

• Product of National Instruments (NI)

• Software for Virtual Instrumentation

• Data Acquisition (DAQ)

• Graphical Programming

• Data Storage and Analysis for wide Range of applications

LabVIEW features

LabVIEW programs are called:Virtual Instruments (VIs) because their appearence and operation imitate actual instruments.

However, they are analogous to main programs, functions and subroutines from popular language like C, Fortran, Pascal, …

Virtual Instruments

1- The front panel:

an interactive user interface of a VI, so named because it can simulates the front panel of a physical instrument.

2- The block (or wiring) diagram:It is the VI’s source code, constructed in LabVIEW’s graphical programming language, G. It is the actualexecutable program.

Subroutine in the block diagram of VI.

3- Icon/connector

VIs

Front Panel User Interface (UI)

Controls = Inputs Indicators = Outputs

Block Diagram Graphical Code

Data travels on wires from

controls through functions to indicators Blocks execute by Dataflow

Front Panel

Front Panel

a

A combination of controls and indicators.

Controls = Inputs from the user = Source Terminals

Indicators = Outputs to the user = Destinations

Block Diagram

Terminals

When you place a control

(or indicator) on the

FRONT PANEL

LabVIEW automatically creates a correspondingcontrol (or indicator) terminal on the BLOCKDIAGRAM

Control or Indicator Terminal?

Control terminals have

thick borders

Indicator terminals have

thin borders

Nodes

Node is just a fancy word for a program execution element –

Nodes are analogous to statements, operators, functions and

subroutines in standard programming language:

•The add and subtract functions represent one type of node.

•A structure is an other type of node. Structures can execute code repeatedly or conditionally, similar to loops and case statements in traditional programming languages.

•LabVIEW also has special nodes, called formula nodes, which are useful for evaluating mathematical formulas or expressions.

Control or Indicator Terminal?

Data Types

Each wire has different style or color, depending on the data

type that flows through the wire:

Scalar1D array2D arrayColor

Floating-point number

orange

Integer number

blue

Booleangreen

Stringpink

Type Checking

If you connect more than

one source or no source

at all to a wire,

LabVIEW DISAGREES with what you’re doing, and thewire will appear broken

ACTION !

Let get into Action…

top related