Az előadás letöltése folymat van. Kérjük, várjon

Az előadás letöltése folymat van. Kérjük, várjon

LabView Academy Bevezetés.

Hasonló előadás


Az előadások a következő témára: "LabView Academy Bevezetés."— Előadás másolata:

1 LabView Academy Bevezetés

2 Adatok Dr. ing. Claudiu Pozna http://www.sze.hu/~pozna/ Horváth Ernő
Tanszéki honlap

3 LabVIEW oktatás Magyarországon
Budapest 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 Budapest Magyar Tudósok krt. 2. H-1117 Kecskemét College Faculty of Mechanical Engineering and Automation Kecskemét 6000 Isáki út 10 Széchenyi István University (SZE) Department of Computer Engineering Department of Automation Department of Automotive and Railway Engineering Győr H-9026, Egyetem tér 1. University of Debrecen Institute of Physics Debrecen 4010 Pf. 2, Bem tér 18/b University of Pécs Faculty of Sciences Pollack Mihály Faculty of Engineering Pécs H-7624 Ifjúság útja 6 University of Pannonia Faculty of Engineering Veszprém 8200 Egyetem Str. 10

4 Grafikus programnyelv
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

5 Mire használhatjuk? + általános célú programnyelv

6 Certified LabVIEW Architect Exam Certified LV Associate Developer Exam
Lesson # Lesson Title New User Experienced User Advanced User Managing Software Engineering in LabVIEW Advanced Architectures in LabVIEW LabVIEW Core 1 LabVIEW Core 2 LabVIEW Core 3 LabVIEW Connectivity Object-Oriented Design and Programming in LabVIEW LabVIEW Performance Certified LabVIEW Architect Exam Certified LV Associate Developer Exam Certified LabVIEW Developer Exam <Remove this slide if your class is not in the LabVIEW series.> Other Courses LabVIEW Real-Time 1 LabVIEW Real-Time 2 LabVIEW Instrument Control LabVIEW Modular Instruments LabVIEW FPGA DAQ & Signal Conditioning

7 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 ( ) 16-bit signed integer numeric Előjeles int ( ) 32-bit signed integer numeric Előjeles int ( ) 8-bit unsigned integernumeric Int (0 +255) 16-bit unsigned integer numeric Int ( ) 32-bit unsigned integer numeric Int ( ) 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

8 Vezetékek (wire) Scalar 1D Array 2D Array Numeric Boolean String
Dynamic

9 Virtual instrumentek (VI-ok)
Front Panel Control = Bevitel Indicators = Kimenet Block Diagram A program „kód” Működési logika

10 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

11 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/mutat Window»Show Tools Palette

12 Front Panel − Controls Palette
A szükséges controlok kiválasztásához

13 Block Diagram − Functions Palette

14 Parts of a VI – Front Panel
Front Panel – User interface for the VI You build the front panel with controls (inputs) and indicators (outputs). Discuss how a front panel is the user interface of the VI and contains controls and indicators. A section following this slide concentrates on the front panel in more depth.

15 Parts of a VI – Block Diagram
Block Diagram – Contains the graphical source code Front panel objects appear as terminals on the block diagram.

16 Parts of a VI – Icon/Connector Pane
Icon – Graphical representation of a VI Connector Pane – Map of the inputs and outputs of a VI 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.

17 Front Panel Briefly mention the functionality of the items on the toolbar: Run, Run Continuously, Abort Execution, Pause, Text Settings, Align Objects, Distribute Objects, Resize Objects, Reorder, Search, Help Click the Run button to run the VI. LabVIEW compiles the VI, if necessary. You can run a VI if the Run button appears as a solid white arrow. Note that the Run button appears broken when the VI contains edit-time errors. Students will learn about fixing edit-time errors in the next lesson.

18 Controls and Indicators
Input devices Knobs, buttons, slides Supply data to the block diagram Indicators Output devices Graphs, LEDs Display data the block diagram acquires or generates Engage the students in identifying controls and indicators on this front panel. In the next few slides, you discuss basic data types: numerics, strings and Booleans. Discuss only front panel information here, such as appearance and what type of data you put in the control or indicator. You discuss representation, mechanical action, and string display types in the next lesson.

19 Front Panel Object Styles
LabVIEW has different control palettes with objects for building user interface, including the Modern, Silver, Classic, and System palettes. The controls and indicators on the Silver palette are the newest to LabVIEW. They provide a rich user interface. Because of the added glyphs, the Silver objects tend to be a little larger than other styles. Use objects from the System palette when you want a dialog that matches your operating system. The System controls (also known as dialog controls) change appearance depending on which platform you run the VI. For example, when running on a Mac OS, the controls adapt a different color and appearance than they have on a Windows OS so that they match the appearance of the Mac OS system. Not all palettes have the same options. For example, the System palette does not have a LED. Similarly, if you use Quick Drop, you will notice multiple options. The new Silver controls will have “Silver” in the parentheses. Instructor Note: Demonstrate Quick Drop functionality. Press <CTRL>-Space and type “LED” in the Quick Drop window. Show how to select the Silver-style LED.

20 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 control Increment/Decrement buttons Numeric indicator

21 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. Just mention what Booleans are on this slide. You discuss the use of Booleans later. Boolean control Boolean indicator

22 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. Just mention the basic string concepts here. You discuss different display types later.

23 LabVIEW Compiles Graphical Code
mov byte ptr [esi+29h],0 mov esi,dword ptr [ebp+48h] mov byte ptr [ebp+1Bh],0 mov eax,dword ptr [esi+18h] cmp byte ptr [esi+3Dh],1 jmp ABFFD90 mov ebp,dword ptr [esi+14h] mov eax,dword ptr [ebp+68h] mov dword ptr [esi+0Ch],eax je ABFFE09 cmp byte ptr [esi+2Ah],1 cmp dword ptr [eax+28h],0 je ABFFE0F jne ABFFE1F mov eax,dword ptr [esi+1Ch] mov dword ptr [ebp+48h],0 mov eax,dword ptr [eax+14h] mov dword ptr [eax+10h],esi test eax,eax mov byte ptr [ebp+1Eh],0 je ABFFCEF cmp byte ptr [eax+2Ah],1 mov dword ptr [ecx],0 jne ABFFCEF cmp dword ptr [eax+14h],esi jmp ABFFE0F jne ABFFE0F mov ecx,dword ptr [ebp+44h] mov dword ptr [eax+14h],0 xor eax,eax cmp byte ptr [esi+29h],5 mov edx,1 lock cmpxchg dword ptr [ecx],edx mov dword ptr [esi+29h],2 jmp ABFFD13 mov dword ptr [esi+1Ch],eax lea ecx,[ebp+4Ch] mov dword ptr [eax+10h],ecx mov edx,dword ptr [esi+8] mov dword ptr [ebp+68h],eax mov ecx,dword ptr [esi+0Ch] mov dword ptr [ebp+48h],esi mov eax,esi cmp dword ptr [eax+14h],0 add esp,8 jne ABFFD90 pop esi mov dword ptr [eax+14h],esi mov ebp,edx mov byte ptr [ebp+1Eh],1 jmp ecx cmp dword ptr [esi+30h],2 add ebp,3Ch je ABFFE39 mov dword ptr [esp],ebp mov byte ptr [ebp+1Bh],1 call SubrVIExit (24D6450h) mov esi,dword ptr [ebp+360h] mov esi,dword ptr [esi] je ABFFE02 mov dword ptr [ebp+37Ch],esi mov esi,eax inc dword ptr [ebp+37Ch] First off, LabVIEW has a Compiler? Yes, G is a compiled language, which can be surprising because during typical LabVIEW development, there is no explicit 'compile' step. Instead, you make a change to your VI and simply press the 'run' button to execute it. But here’s the reality: You wrote some G code, but the computer doesn’t understand G inherently, so LabVIEW has to send your code through the compiler, which interprets it, optimizes it, and generates the machine code that your computer’s CPU can understand. Here I’m showing some assembly code for the G diagram on the left. Look, there’s the increment! (Aren’t you glad we generate the machine code so you don’t have to?) Compiler

24 Alapvetések Block Diagram Front Panel Control Indicator Terminals
Wires Nodes

25 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

26 Teszt Összeadás Kivonás Nem tudjuk Szinusz Osztás
1. Melyik függvény hajtódik végre előbb: összeadás, vagy kivonás? Összeadás Kivonás Nem tudjuk 2. Melyik függvény hajtódik végre előbb: szinusz, vagy osztás? Szinusz Osztás

27 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? b) Kivonás

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 Breakpoints Conditional 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. Probe: Used to view values in arrays and clusters. Click on wires with the Probe tool or right-click on the wire to set probes. Create a probe when you want to have more control over how LabVIEW probes the data that flow through a wire. When you create a new probe, the data type of the probe matches the data type of the wire you right-click. Custom probes are also available - show if time permits. Breakpoint: Set pauses at different locations on the diagram. Click on wires or objects with the Breakpoint tool to set breakpoints. Conditional probe: a probe on which conditions can be set for when to break at the probe. It is VERY easy to place additional breakpoints on a VI. Teach students that if their program is not running correctly and they think they may have a breakpoint…somewhere…that they can use the Edit >> Find, Other – Breakpoints search tool to locate all breakpoints placed on their block diagrams!

31 Debugging Techniques Step Into, Over, and Out buttons for Single Stepping Click on Step Into button to enable single stepping Once 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 Single stepping: executes the diagram node by node. You can access single stepping from the diagram toolbar by using the step functions found on the diagram toolbar. Use Step Into/Step Over to begin single stepping. Step Into: Steps into a node. If there is a subVI, it will then bring up the subVI diagram and enable single stepping through it. Step Over: Executes nodes but visually does not single step through nodes. Step Out: Steps out of nodes, if the diagram has completed execution; click on Step Out to terminate single stepping mode.

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 Demonstrate these techniques so that students can practice them throughout the course. Highlight the following tips: Hot keys (ctrl -b, ctrl-e, etc.) Accessing functions and controls palettes by right-clicking Accessing tools palette temporarily by shift - right-click (Windows) or shift - command - click (Mac) Tab to toggle through toolbars Spacebar to toggle between positioning and operating tool (panel toolbar) Spacebar to toggle between positioning and wiring tools (diagram toolbar) Wiring: spacebar to change direction Wiring: click with right mouse click to terminate wiring once started Undo and Redo in the Edit menu 1st Day Lunch

33 Köszönöm a figyelmet!


Letölteni ppt "LabView Academy Bevezetés."

Hasonló előadás


Google Hirdetések