810 likes | 1.35k Views
Radim ŠTEFAN , Roman VALA. Radim ŠTEFAN National Instruments Praha 110 00 765 356 876 410 02+ 456 radim.stefan@ni.com. .
E N D
Radim ŠTEFAN National Instruments Praha 110 00 765 356 876 410 02+ 456 radim.stefan@ni.com 6 16 52 24 V300 Hz kasjhf lasdkjhf lakjd flakjdfh lakjdhal Q kajsdhf laksdhfoaidfh kc alkjdhf alkjdf Y adjh alkdjhl akvdj lakskdjf hgslkdjfhslk fg jkdhf akjsdhf lkasdhlfhi erufhi suhfkdj Možnost výhry !!! LEGO Mindstorms NXT
LabVIEW – grafické vývojové prostředí • Kompilované grafické vývojové prostředí • Vývoj 4x-10x rychlejší oproti běžnému programování • Nástroje pro sběr, analýzu a zobrazení dat
LabVIEW – jednoduché programování C* LabVIEW * does not include code to generate UI
20 Years of Innovation LabVIEW 6i Internet Ready LabVIEW For Sun, Windows LabVIEW 4.0 Professional Development Anniversary Edition LabVIEW 1.0 For Macintosh LabVIEW Embedded and DSP 1990 2005 1993 1998 2003 1992 2006 1986 1997 2000 2005 LabVIEW 5.0 Undo! Real-Time LabVIEW 8 Distributed Intelligence LabVIEW 2.0 Compiled Language LabVIEW 3.0 Multiplatform LabVIEW 7 Express PDA and FPGA
Easy. Powerful. Open • Make common measurements EASY with any board, instrument, or bus • Help users build POWERFUL solutions with standard PC technology • Integrate external tools and technologies with an OPEN platform
Major Features in LabVIEW 8.20 • MathScript • Object-Oriented Programming • 3D Picture Control • DLL Import Wizard • TDM Streaming ni.com/labview/upgrade
LabVIEW MathScript • Combine textual math and graphical programming • Reuse many of your m-file scripts created with The MathWorks, Inc. MATLAB® software demo MATLAB® is a registered trademark of The MathWorks, Inc.
What Is LabVIEW MathScript? Powerful textual programming for signal processing, analysis, and math • More than 650 built-in functions • Reuse many of your m-file scripts created with The MathWorks, Inc. MATLAB® and others • Based on original math from NI MATRIXx A native LabVIEW solution • Interactive and programmatic interfaces • Does not require third-party software MATLAB® is a registered trademark of The MathWorks, Inc. All other trademarks are the property of their respective owners.
MathScript Details • Part of the Full, Professional, Student and Evaluation editions of LabVIEW, for Windows platforms only (no Linux, Mac, RT, etc.) • MathScript is NOT a standalone replacement for alternative technical computing software • Third party toolboxes are not supported • Some commands and variable types are not supported
MathScript Window Components 5-a Output Window Workspace Selected Variable Command Window Getting Started Window
The MathScript Window : Script Tab 5-c • Interactively develop and test scripts and functions with the Script Editor • Enter / Edit script text • Save & Compile / Save / Load / Run scripts • Launch separate Script Editor window for easy editing Right Click Pop-up Menu
The MathScript Window : History Tab 5-d Right Click to Clear History
MathScript Node 5-e • Embed MathScripts into LabVIEW code on the block diagram • Populate with m-file script text • Type m-file scripts directly into the node • Import from files • Create inputs/outputs on node edges • MathScript compiles script when run • Unlike MATLAB® script nodes, MathScript script nodes do not require third-party software MathScript Node MATLAB® is a registered trademark of The MathWorks, Inc
MathScript Node 5-f m-Script MathScript Node Right-Click Menu
Programmatic Math with the MathScript Node • Combine graphical system design with textual math • Deploy with LabVIEW graphical programming • Implement equations and algorithms with text
Goal: Multiple Programming Approaches Freedom to choose the best approach Reuse your existing code Add interactive user interfaces to your algorithms Integrate math with real-world I/O and instrument control
Working with Graphical and Textual Approaches in LabVIEW • Always consider both • Prototype and instrument your math algorithms • Use LabVIEW features through graphical programming • Take a mixed approach to combine graphical and textual benefits • Work within a single environment to simplify and reduce cost • Reuse your existing m-files
Major Features in LabVIEW 8.20 • MathScript • Object-Oriented Programming • 3D Picture Control • DLL Import Wizard • TDM Streaming • …. ni.com/labview/upgrade
LabVIEW Object-Oriented Programming Parent Class Classes and objects Encapsulation Child Class Inheritance For power programmers and large-scale application development
Major Features in LabVIEW 8.20 • MathScript • Object-Oriented Programming • 3D Picture Control • DLL Import Wizard • TDM Streaming • …. ni.com/labview/upgrade
History of 3D in LabVIEW • LabVIEW 5.1: • First 3D Graphs available • ComponentWorks controls based on ActiveX • LabVIEW 7.1: • First 3D Picture Control software • Separate download • No technical support offered
3D Picture Control • Create 3D scenes using picture control VIs • Control object motion, size, and color using OpenGL • Import objects from design tools (VRML, STL, ASE ) Demo
Introduction to API Geometries Box, Cone, Cylinder, Height Map, Mesh or Sphere Object Create or Find object Transformations Translate, Rotate or Scale objects Helpers Color, Light, Window, Texture, etc. File Loading Import ASE, STL or VRML files Further functionality available through Property and Invoke Nodes How Does it Work?
Benefits of New 3D Picture Control • Easy to use API • Powerful • Hardware acceleration supported for Scene Window • Leveraging scene graph technology* • Multi-OS support • Mac, Linux and Windows *OpenSceneGraph (www.openscenegraph.org)
Major Features in LabVIEW 8.20 • MathScript • Object-Oriented Programming • 3D Picture Control • DLL Import Wizard and External Code • TDM Streaming • …. ni.com/labview/upgrade
History of Calling External Code • Call Library Node • Call shared libraries in Windows, Macintosh and Linux • ActiveX • Support added in LabVIEW 4.1 • Containers and servers added in LabVIEW 5 • Event support added in LabVIEW 6i • .NET • Support for .NET added in LabVIEW 7 • .NET enabled the support for Web Services in LabVIEW • Support for .NET Events and Controls in LabVIEW 8
Call Library Node Advances • You can now dynamically load and unload shared libraries • Error cluster support • View parameter names on block diagram • Function callbacks
DLL Import Wizard Automatically generate LabVIEW interfaces to your DLLs and shared libraries • Support for: Windows (.dll), Linux (.so) , Macintosh (.framework) Demo
Shared Library Import Wizard • You can now quickly and easily generate LabVIEW VIs from shared libraries • Supports • Windows (.dll) • Linux (.so) • Macintosh (.framework) • Header file (.h) necessary • Saves configuration info to quickly recreate or modify LabVIEW VIs
.NET .NET Web Service Import Wizard Automatically generate LabVIEW interfaces to Web Services Remote Procedure Web Server
Web Service Import Wizard • You can now easily connect to online Web Services • Simple creation of LabVIEW VIs from WSDL • No low-level programming needed Internet Web Service Requesters Web Service Providers
Instrument Driver Export Wizard DLL, .h, and Help Files Instrument Driver Export Wizard Develop drivers in LabVIEW, reuse in C
C Interface Generator • You can now create drivers in LabVIEW, then use in C • Wraps LV DLLs for use in C • Converts parameters to C data types • Modifies documentation to be C specific
Major Features in LabVIEW 8.20 • MathScript • Object-Oriented Programming • 3D Picture Control • DLL Import Wizard • TDM Streaming ni.com/labview/upgrade
TDM Streaming API TDM Data Model • Easily save search-ready data files • Stream data in standard or real-time applications • Mine data files using NI DIAdem DataFinder Demo
NI Core TDM Components • TDM Data Model & File • TDM Streaming VIs • Data Storage VIs • DataPlugins • DIAdem DataFinder In this second half of the presentation we’ll investigate how you use TDM to address your data management challenges
TDM Files are Self Describing Header • Description • Title • Author • etc Bulk Measurement Data • UUT • Procedure • etc • Name • Comment • Unit • Max & Min • Sensor Info • etc
Interfacing with the TDM Data Model TDM Streaming API (new) TDM Data Model Storage API (existing) TDMS File (binary) TDM File (binary + XML)
The LabVIEW Data Storage API (existing) • Read and Write TDM & TDMS files • Advanced functions for selective data loading • Supports reading data using DataPlugins • Convert TDM to TDMS files and vice versa
The LabVIEW TDM Steaming API (new) • Read, Write, and set properties (TDMS files) • Optimized for High Speed Streaming • Covers the widest range of file i/o use cases
Excel can load and read TDMS Files • Excel can load TDM Files • Visit, www.ni.com/tdm and download Excel Add-in for TDM.
Major Features in LabVIEW 8.20 • MathScript • Object-Oriented Programming • 3D Picture Control • DLL Import Wizard • TDM Streaming • Other Features ni.com/labview/upgrade