labview academy - széchenyi istván egyetemherno/labview/prezentaciok/lva.01.alap1.pdflabview fpga...

Post on 17-Mar-2018

228 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

LabView AcademyBevezetés

Adatok

Dr. ing. Claudiu Poznahttp://www.sze.hu/~pozna/

Horváth Ernőhttp://www.sze.hu/~herno/

Kajdocsi László

Tanszéki honlaphttp://it.sze.hu

2

LabVIEW oktatás MagyarországonBudapest University of Technology and Economics (BME)Faculty of Electrical Engineering and Informatics Department of Electron Devices Faculty of Mechanical Engineering Department of Mechatronics, Optics and Mechanical Engineering Informatics

BudapestMagyar Tudósok krt. 2.H-1117

Kecskemét College Faculty of Mechanical Engineering and Automation

Kecskemét6000 Isáki út 10

Széchenyi István University (SZE)Department of Computer Engineering Department of Automation Department of Automotive and Railway Engineering

GyőrH-9026, Egyetem tér 1.

University of Debrecen Institute of Physics

Debrecen4010 Pf. 2, Bem tér 18/b

University of PécsFaculty of SciencesPollack Mihály Faculty of Engineering

PécsH-7624 Ifjúság útja 6

University of Pannonia Faculty of Engineering

Veszprém 8200 Egyetem Str. 10

A LabVIEW grafikus fejlesztői környezet első verzióját több mint 20 éve, 1986-ban adta ki a National Instruments, és azóta vezető platform az ipari alkalmazások között, a tesztelés, vezérlés, mérés és adatgyűjtés területén.

• Grafikus programnyelv

• Utasítások határozzák meg a program végrehajtását , adatfolyam-elv (dataflow)

• Natív többszálú párhuzamos programozás

Mire használhatjuk?

+ általános célú programnyelv

Certified LV Associate

Developer ExamCertified LabVIEW

Developer ExamCertified LabVIEW

Architect Exam

LabVIEW Core 3LabVIEW Core 1

LabVIEW Core 2

Managing Software

Engineering in LabVIEW

Advanced Architectures in

LabVIEWLabVIEW Connectivity

Object-Oriented Design

and Programming in LabVIEW

LabVIEW Performance

LabVIEW Real-Time 1

LabVIEW Real-Time 2

LabVIEW Instrument Control

LabVIEW Modular Instruments

LabVIEW FPGADAQ & Signal Conditioning

Other Courses

New User Experienced User Advanced User

Gyakoribb adatformátumok

Single-precision,floating-pointnumeric Egyszeres pontosságú lebegőpontos (-∞ +∞)

Double-precision, floating-point numeric Dupla pontosságú lebegőpontos (-∞ +∞)

Extended-precision, floating-point numeric Kiterjesztett pontosságú lebegőpontos (-∞ +∞)

8-bit signed integernumeric Előjeles int (-128 +127)

16-bit signed integer numeric Előjeles int (-32768 +32767)

32-bit signed integer numeric Előjeles int (-2147483648 +2147483647)

8-bit unsigned integernumeric Int (0 +255)

16-bit unsigned integer numeric Int (0 +65535)

32-bit unsigned integer numeric Int (0 +4294967295)

Enumerated type Felsorolás típus

Boolean Igaz vagy hamis érék

String Szöveges változó, karakter tömbhöz hasonló

Array Tömb (a szín a tömb típusának függvénye)

Cluster Klaszter (lehet más színű is)

Path Elérési út (fájlhoz vagy mappához)

Waveform Analóg jel

Digital waveform Digitális jel

Vezetékek (wire)

Scalar

Numeric

Boolean

String

2D Array1D Array

Dynamic

Virtual instrumentek (VI-ok)

• Front Panel

• Control = Bevitel

• Indicators = Kimenet

• Block Diagram

• A program „kód”

• Működési logika

9

Futtatás (eszköztár)

• A program futtatása ezzel az ikonnal történik

• futás közben átvált feketére

• De ha a nyíl összetöredezett képet mutat, akkor a program nem futtatható, mert hibás.

• Folyamatos futtatás, amely ciklikusan ismételgeti program végrehajtását.

• Stop gombbal leállíthatjuk a VI futását

• Pillanatmegállítás a program futása

• Csak a diagram ablakban találjuk meg, ha futtatás közben a „lámpát” bekapcsoljuk, akkor vizuálisan követhetjük a program futását a grafikus programban

10

Tools palette

•LabVIEW kiválasztja azt az eszközt, ami épp kell (Felső gomb)

•Front panelen és a block diagramon is

•Specifikus működéshez

•Elrejt/mutatWindow»Show Tools Palette

11

Front Panel − Controls Palette

• A szükséges controlokkiválasztásához

12

Block Diagram − Functions Palette

• Functions Palette

13

Parts of a VI – Front Panel

You build the front panel with

controls (inputs) and

indicators (outputs).

Front Panel – User interface for the VI

Parts of a VI – Block Diagram

Front panel objects appear as terminals on the block diagram.

Block Diagram – Contains the graphical source code

Parts of a VI – Icon/Connector Pane

Icons and connector panes are necessary to use a VI as a subVI.• A subVI is a VI that appears on the block diagram of

another VI.• A subVI is similar to a subroutine or function in a text-

based programming language.

Icon – Graphical representation of a VI

Connector Pane – Map of the inputs and outputs of a VI

Front Panel

Controls and IndicatorsControls

• Input devices

• Knobs, buttons, slides

• Supply data to the block diagram

Indicators• Output devices

• Graphs, LEDs

• Display data the block diagram acquires or generates

Front Panel Object Styles

Numeric Controls and Indicators

The numeric data in a control or indicator can represent numbers of various types, such as integer or floating-point.

Numeric indicator

Numeric control

Increment/Decrement buttons

Boolean Controls and Indicators

– The Boolean data type represents data that has only two options, such as True/False or On/Off.

– Use Boolean controls and indicators to enter and display Boolean (TRUE/FALSE) values.

– Boolean objects simulate switches, push buttons, and LEDs.

Booleancontrol

Booleanindicator

Strings– The string data type is a sequence of ASCII characters .

– Use string controls to receive text from the user, such as a password or user name.

– Use string indicators to display text to the user.

Alapvetések

NodesWires

ControlTerminals

Block DiagramFront Panel

Indicator Terminals

Adatfolyam-elvű programozás

• A block diagram végrehajtási sorrendje a vezetékek által meghatározott függés, NEM pedig balról-jobbra végrehajtás

• Egy „csomópont” (node) akkor hajtódik vége, ah minden szükséges bemenet rendelkezésre áll

• Egy „csomópont” (node) akkor szolgáltat adatot, amilyen gyorsan módjában áll

25

Teszt

1. Melyik függvény hajtódik végre előbb: összeadás, vagy kivonás?

a) Összeadás

b) Kivonás

c) Nem tudjuk

2. Melyik függvény hajtódik végre előbb: szinusz, vagy osztás?

a) Szinusz

b) Osztás

c) Nem tudjuk

26

Teszt

3. Melyik függvény hajtódik végre előbb: véletlen szám generátor, osztás, vagy összeadás?a) Véletlen szám generátor

b) Osztás

c) Összeadás

d) Nem tudjuk

4. Melyik függvény hajtódik végre később: véletlen szám generátor, kivonás, vagy összeadás?a) Véletlen szám generátor

b) Kivonás

c) Összeadás

d) Nem tudjuk

27

28

Express VI, VI és Funkció

• Express VI: interaktív VI-ok dialógusablakban konfigurálhatóak

• "Klasszikus" VI: a belekötött adatok alapján működik

• Funkciók: alapvető műveletek (pl szorzás)nincs front panel vagy block diagram

29

Block Diagram Nodes

Icon Expandable Node Expanded Node

• Mindhárom ugyanaz, más nézetben

• Sárga: a "Klasszikus" VI

• Kék: Express VI

30

Debugging Techniques

Probe

Right-click on wire and select probe and it shows

data as it flows through the wire segment

Breakpoints

Right-click on wire and select Set Breakpoint; pause

execution at the breakpoint.

Conditional Probe

Combination of a breakpoint and a probe. Right-click on

wire and select custom probe.

31

Debugging Techniques

Step Into, Over, and Out buttons for Single Stepping

Click on Step Into button to enable single steppingOnce Single Stepping has begun, the button steps into nodes

Click on Step Over button to enable single stepping or to step over nodes

Click on Step Out button to step out of nodes

32

Gyorsbillentyűk, stb.• Common keyboard shortcuts

• Access Tools Palette with <shift>-right-click

• Increment/Decrement faster using <shift> key

• Tools»Options selection — set preferences in LabVIEW

• VI Properties (File menu)

Windows Sun Linux MacOS

<Ctrl-R> <-R> <M-R> <z-R> Run a VI

<Ctrl-F> <-F> <M-F> <z-F> Find object

<Ctrl-H> <-H> <M-H> <z-H> Activate Context Help window

<Ctrl-B> <-B> <M-B> <z-B> Remove all broken wires

<Ctrl-W> <-W> <M-W> <z-W> Close the active window

<Ctrl-E> <-E> <M-E> <z-E> Toggle btwn Diagram/Panel Window

Köszönöm a figyelmet!

top related