2Grafikus 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 programnyelvUtasítások határozzák meg a program végrehajtását , adatfolyam-elv (dataflow)Natív többszálú párhuzamos programozás
4Virtual instrumentek (VI-ok) Front PanelControl = BevitelIndicators = KimenetBlock DiagramA program „kód”Működési logika
5Correcting Broken VIsOne of the most common debugging features used in LabVIEW is the compiler which is always on. While you are developing a program, the compiler continuously checks for errors and provides semantic and syntactic feedback on the application.When the Run button is not broken, the VI is compiled and can be executed. If an error exists, you cannot run the program. You see a broken Run button in the toolbar. The VI is not executable.You must resolve any errors noted in the Errors List window before you can run the VI.Instructors: This is a good opportunity to remind students that LabVIEW is a compiled language.Broken Run arrow VI cannot be compiled VI cannot be executed
6Common Causes of Broken VIs Broken wires exist on the block diagram.You wired a Boolean control to a String indicator.You wired a numeric control to a numeric control.A required block diagram terminal is unwired.A subVI is broken.
12Tools / Options / Block diagram / Place front panel terminals as icon Ikon nézetTools / Options / Block diagram / Place front panel terminals as icon
13Műveletek tömbökkel 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 index • Mik a tömbök? Azonos típusú változók rendezett gyűjteménye• Lehetnek 1 vagy több dimenziósak• Az elemek azonosítására az index szolgál. Az index 0-val kezdődikindex10 elemű tömb188.8.131.52.04.85.16.01.02.51.72 dimenziós tömb1234
14Tömb létrehozása kontrolokkal, indikátorokkal 1. Válasszuk ki a Control palettáról Az Array, Cluster, Matrix menüből az Array típust
15Tömb létrehozása kontrolokkal, indikátorokkal 2. Húzzuk bele az általunk választott kontrolt/indikátort
16Tömb létrehozása kontrolokkal, indikátorokkal 3. Amennyiben szükséges, adjunk hozzá dimenziót
17Tömb létrehozása konstansként Válaszuk ki Array Constant >> Array(Block diagram)2. Húzzuk a kívánt változót bele, majd módosítsuk
18Tömb létrehozása auto-indexeléssel Auto-Indexing EnabledCiklusokkal is létrehozhatunk tömböketA For ciklus alapértékként auto-indexel, de ez ki is lehet kapcsolniWhile ciklus alapértelmezésben csak az utolsó éréket adjaJobb gombbal a ciklus kimeneti pontján kapcsolhatjuk ki/be az auto-indexeléstWire becomes thicker1D ArrayAuto-Indexing DisabledWire remains the same size
192D tömb létrehozása A belső ciklus a sorokat, míg 1D Array2D ArrayA belső ciklus a sorokat, mígA külső ciklus az oszlopokat hozza létre
23DialogOne button (csak a kattintás ténye)Two button (választás)
24Új Funkciók áttekintése Today we’ll be taking a look at the new features in the latest version of LabVIEW.
25Accelerates Your Success System Design SoftwareProject ExplorerManage and organize all system resources, including I/O and deployment targetsHardware ConnectivityBring real-world signals into LabVIEW from any I/O on any instrumentDeployment TargetsDeploy LabVIEW code to the leading desktop, real-time, and FPGA hardware targetsParallel ProgrammingCreate independent loops that automatically execute in parallelInstant CompilationSee the state of your application at all times, instantlyBlock DiagramDefine and customize the behavior of your system using graphical programmingFront PanelCreate event-driven user interfaces to control systems and display measurementsAnalysis LibrariesUse high-performance analysis libraries designed for engineering and scienceMain Message: For over 26 years, LabVIEW has made engineers more productive by ensuring that they can take full advantage of hardware products like the ones we just saw, and that they are able to use them with all of the analysis and UI capabilities necessary for any measurement or control system.LabVIEW increases productivity by abstracting low-level complexity and integrating all of the technology engineers and scientists need into a single, unified development environment, unlike any other text-based alternative.Transition: Each new version of LabVIEW is designed with features to further enhance and accelerate productivity.Models of ComputationCombine and reuse .m files, C code, and HDL with graphical codeTimingDefine explicit execution order and timing with sequential data flowAccelerates Your SuccessBy abstracting low-level complexity and integrating all of the tools you need to build any measurement or control system
26LabVIEW 2012 kezdőképernyő Pin Common ProjectsStart from a TemplateFind Learning ResourcesFind LabVIEW Add-OnsMain Message: This is a summary of some of the major enhancements to the new getting started window.The welcome dialog, which displays the first time you launch the product can be brought back up by clicking ‘Welcome to LabVIEW’ in the lower right-hand corner.You can launch the LabVIEW Tools Network, powered by JKI’s VI Package Manager, by clicking ‘Find LabVIEW Add-Ons’ in the lower left corner.Instead of just displaying the last two opened projects (as previous versions did), 2012 displays a list and allows you to pin the most commonly used projects.There is an RSS feed at the bottom for new and product updates.Finally, clicking ‘Create Project’ launches the new dialog which features new templates and sample projects.RSS News and Announcements
27Templatek és példa projektek Ajánlott kezdőpont különböző LabVIEW alkalmazások fejlesztéséhezPontosan mutatja hol kell saját kódot hozzáadni„Best practices” kódoláshoz, dokumentáláshoz, kód szervezéshezSaját templatek is definiálhatóakPresenter Note: To avoid confusion, try to avoid the use of the term ‘examples,’ as they are not related to the content of the Example Finder.Main Message: LabVIEW 2012 introduces templates and sample projects, which provide recommended starting points designed to ensure the quality and scalability of a system. All of the templates and sample projects are open-source and include extensive documentation designed to clearly indicate how the code works and the best practices for adding or modifying functionality. In addition to demonstrating recommended architectures, these projects also illustrate best practices for documenting and organizing code.What is the Difference Between a Template and a Sample Project?Template Commonly used project, code, documentation, and folder structure.May demonstrate a design pattern.Sample Project A working application that is a starting point for customization.Typically based on templates.Examples (in Example Finder) Conceptual illustration demonstrating how to use a low-level API or technology within LabVIEWYou can create a new LabVIEW project from an existing template or sample project by selecting 'Create Project' from the Getting Started window. The list of available options depends on the software modules and drivers that you have installed. This document lists the templates and sample projects that are provided and supported by National Instruments.Transition: Lets take a look at a few of the sample projects.
28Példa: Finite Measurement Sample Project State Diagram ConfigureCopy GraphInitializeStopAcquireAnalyzeExport DataWait for EventWait for EventSave DataLoad DataAcquireConfigureAnalyzeClear DataMain Message: ‘Finite Measurement’ is the simplest sample project, but it still provides a complete, ready-to-run LabVIEW application for basic acquisition and analysis. This sample project illustrates the use of the state machine template for a basic measurement system that executes operations sequentially and in a single loop. The version of this sample project that’s installed with DAQmx (version or later) has functionality built-in to acquire data, perform some basic statistical analysis, display and export the data. This diagram illustrates the state logic of this single process application, which consists of multiple Vis and type definitions.As we see if we zoom in on the actual code, it’s complete with documentation and information that explains where and how to modify the code.Transition: Next, consider a slightly more complex example:Update UI
29Idea Exchange Features Labelek különböző vezérlőszerkezeteknekMain Message: Well-documented block diagrams generally include comments indicating what operations or processes the structure performs. Previously, these would be made using floating labels, which would not move or resize with the structure itself adds a new type of label known as integrated structure labels which are associated with their structure and will always move and resize as you add to your code, ensuring that you can always have clear, well-organized block diagrams.
30Idea Exchange Features Pop-up menü több kijelölt objektumnakMain Message: There are several operations that are often performed for a large collection of items on the block diagram, including the creation of constants, creating controls and indicators, creating references to front panel controls, toggling labels on and off, and changing icons to terminals (just to name a few). Previously, this would’ve required repeating the steps necessary to perform this operation for every individual item.Take for example the process of creating references for a large number of front panel controls: you would previously have to click on every single one and navigate to ‘create > reference,’ which quickly adds up for a complex user interface.In 2012, the right-click menu for a collection of selected items displays operations that are common to all the selected items, so you can select all of the front panel controls and select ‘create references’ for all these items at once, which can save a tremendous amount of time across the development of a system.
31Idea Exchange Features Feltételes Loop TunnelLeegyszerűsített verzióHagyományosMain Message: Loops often build an array of data as an output. Tunnels can be used to automatically build arrays after every iteration, but some processes require that this operation be conditional. Previously, this required using a case structure to conditionally append data to an array, which is a simple operation, but needlessly clutters and complicates a block diagram, as well as consuming additional development time.LabVIEW 2012 allows the tunnels to have an additional conditional input, which can be used to determine whether or not an item should be appended to the array, thereby making the code significantly simpler and easier to read, as well as saves the time required to develop the code.
32Idea Exchange Features Külön alapérdemezett hely a kontroloknak, indikátoroknakEgyszerűbb és átláthatóbb kódMain Message: Creating controls, indicators and terminals, as well as cleaning up a block diagram or creating a subVI, always places label in the same default location. LabVIEW 2012 makes it possible to specify the default location for these operations, and allows it to be unique to controls terminals and constants, indicators and all other items.
33Idea Exchange Features Context Help for Coercion DotsMain Message: Hovering over terminals and outputs of Vis to provide information about the data-type, which is especially helpful when trying to eliminate coercion dots.Részletesebb és gyorsabb átláthatóság típuskényszerítésnél
34Idea Exchange Features Hosszú fájlnevek megjelenítéseMain Message: The way paths are displayed in controls and indicators can now be specified, as requested by users
35LabVIEW GPU Analysis Toolkit Support for NVIDIA® CUDA™ GPUsCommunicate with NVIDIA® CUDA™ GPUs from LabVIEW applicationsQuickly prototype GPU algorithms using cuBLAS and cuFFT functions wrapped in LabVIEWAccess documentation on calling custom GPU code from LabVIEWMain Message: This toolkit enables customers to interact with NVIDIA CUDA graphics processing units (GPUs) from LabVIEW, which are optimized for processing large amounts of parallel floating point data.The first important thing to understand is that graphics processing units feature very different architectures than CPUs. Instead of one to several processing cores, GPUs commonly contain hundreds to thousands of specialized cores. While GPUs evolved to support graphics operations, they are now increasingly being used to augment general-purpose computing.With this in mind, note that the LabVIEW GPU Analysis Toolkit does not simply compile LabVIEW applications for GPUs. Instead, the toolkit enables calling compiled GPU code from LabVIEW – you can think of this as similar to the Call Library Function Node. A set of common linear algebra (CUBLAS) and signal processing (CUFFT) functions are pre-wrapped as LabVIEW VIs as part of the toolkit. In addition, advanced users can call their custom GPU code from LabVIEW using instructions provided with the toolkit.Use CaseCustomers will use a GPU for similar reasons as MASM, but the GPU will perform best when the problem is very data or task-parallel. Each core on the GPU is less flexible and lower performance than an equivalent CPU core, however the GPU features orders of magnitude more processing cores. Though customers can use GPUs in a variety of applications, real-time high performance computing applications (where customers require IO and closing the loop) are a sweet spot where we can combine our SW, IO, FPGAs, CPUs, and GPUs to offer a compelling solutionfor solving these challenges.Select GPU devices and manage resources using CUDA Runtime and Driver APIs
36FeladatPróbáljuk ki a LabView 2012 új funkcióit egy egyszerű feladattalGyakorlat