Home
Measurement Studio User Manual
Contents
1. Feature Standard Edition Professional Edition Enterprise Edition VISA Class Libraries v v v NI DAQmx Class v Y v Libraries NET Instrument Driver v v v Wizard Web Forms User v v Interface Controls ActiveX Controls for v v Visual Basic 6 0 MFC and ActiveX v v Controls for Visual C 6 0 Professional Analysis v v Libraries 3D Graph for v v Visual C 3D Graph ActiveX v v Control Network Variable Class v v Library Network Variable Data v v Source DataSocket Server v v DataSocket Library v v Parameter Assistant v v Instrument I O v Y Assistant DAQ Assistant v Y Enterprise Analysis v Libraries Measurement Studio User Manual 1 6 ni com Chapter 1 Introduction to Measurement Studio Table 1 1 Measurement Studio Package Comparison Chart for Visual C and Visual Basic NET Full Development System FDS Feature Standard Edition Professional Edition Enterprise Edition NI TestStand v Integration LabWindows CVI v Refer to the Standard Analysis section of Chapter 2 Measurement Studio NET Class Libraries for a list of the functionality included in the Standard Analysis class library ncluded with the Device Drivers DVD Refer to the Professional Analysis section of Chapter 2 Measurement Studio NET Class Libraries for a list of the functionality included in the Professional Analysis class library Refer to the
2. Hamming Window Hanning Window Kaiser Bessel Window Scaled Time Domain Windows Symmetric Time Domain Windows SIUS NUS OR ST OR RT RS SL ONIS CS N SNE NNN NEN SN NENA SEN Triangle Window v lt S Filters Bessel v Butterworth Cascade Chebyshev S CSS SS NLIS S US Measurement Studio User Manual ni com Chapter 2 Measurement Studio NET Class Libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis NET Library Professional Package Enterprise Package Elliptic v v Equiripple FIR FIR Windowed IIR Cascade IIR Inverse Chebyshev Kaiser AL SNE NI UN CUN SN ONES Signal Processing Autocorrelation bs Convolution Cross Power Cross Correlation Decimate Deconvolution Derivative x t Discrete Cosine Transform Discrete Sine Transform Fast Hilbert Transform Fast Hartley Transform Integral x t Inverse Real and Complex Fast Fourier Transform FFT ALN NEN SI NINII NEN SN SEN SON STONE SONY ONTO SEN Inverse Fast Hilbert Transform X SS Inverse Fast Hartley Transform S lt S Peak Detection National Instruments Corporation 2 7 Measurement Studio User Manual Chapter 2 Measurement Studi
3. A DigitalWaveform data type This data type represents a set of digital states that are grouped by samples or signals A ComplexWaveform data type This data type represents an analog signal that varies over time and is composed of complex data values An AnalogWaveform data type This data type represents an analog signal that varies over time A DataConverter class that converts data from one data type to another data type such as converting an array of integers to an array of doubles An EngineeringFormatInfo class that defines a custom formatter to format numeric values as strings with engineering notation and International System of Units SI prefixes and symbols A PrecisionDateTime structure that you can use to represent an instance in time typically expressed as a date and time of day that is accurate to the nearest 2 94 second 2 14 ni com Chapter 2 Measurement Studio NET Class Libraries e A PrecisionTimeSpan structure that you can use to represent a time interval or duration of time that is accurate to the nearest 2 94 second e A PrecisionWaveformTiming class that you can use to represent the timing of an analog or digital waveform that is accurate to the nearest 264 second e An AnalogWaveformCollection class that contains a strongly typed collection of AnalogWaveform lt TData gt objects one object for each channel and record combination You can access these objects through the 1D indexer or the 2D ind
4. Detais Voltage Input Setup Settings 4 Calibration Signal Input Range Scaled Units May in Measurement Studio User Manual 5 48 ni com Chapter 5 Getting Started with Measurement Studio 5 To complete the DAQ configuration select the N Samples Acquisition Mode in the Timing Settings section For more information on timing refer to Timing section in the NI DAQmx Help Timing Settings Acquisition Mode Samples to Read Rate Hz N Samples v 100 ik 6 Next click the Run button in the toolbar near the top of the Edit DAQ Task dialog box The test runs automatically You can run the test in the DAQ Assistant to test the task and make sure you connected the signal properly If necessary you can modify the settings before any code is generated ii Project Task Connection Diagram 10 o 5 g E 5 07 E lt 5 107 1 1 1 1 1 1 1 1 1 1 0 0 01 0 02 0 03 0 04 0 05 0 06 0 07 0 08 0 09 0 09 Graph V Display Type AutoScale Y Axis 7 Click the Finish button in the Edit DAQ Task dialog box to complete the configuration of your DAQ task and to launch the Configure DAQ Component UI wizard National Instruments Corporation 5 49 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio To create a custom user interface for the task 1 Inthe Configure DAQ Component UI wizard you can customize and preview a
5. National Instruments Corporation 5 45 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio To configure your task 1 Inthe Create New dialog box of the DAQ Assistant you can begin to interactively define your DAQ task Select Acquire Signals and then Analog Input as the measurement type for your task 2 Next select Voltage Create New CVI Measurement Studio Project Based Task NI DAQ DAQ Assistant Select the measurement type for the task E Analog Input Atask is a collection of one or more virtual channels with timing triggering and other er Voltage properties Temperature To have multiple measurement types within a single task you must first create Strain the task with one measurement type After you create the task click the Add Current Channels button to add a new measurement type to the task Resistance Frequency Position ES Acceleration S Custom Voltage with Excitation Sound Pressure Counter Input Digital Input Finish Measurement Studio User Manual 5 46 ni com Chapter 5 Getting Started with Measurement Studio 3 From the Supported Physical Channels tree in the Physical tab select the physical channel such as ail on the DAQ device to which you connected the voltage signal Click Finish 3 Note You can also use a simulated device in this walkthrough For more information refer to Creating NI DAQmx Simulated Devices topic in the Measureme
6. 4 Right click the graph and select Auto Format to display the Auto Format dialog box The Auto Format dialog box provides a set of pre configured control styles When you select a style and click OK the Auto Format feature configures the appropriate control properties to reflect the style you chose 5 Select Points Only Click OK Notice that the legend changed automatically to match the formatting of the graph x Auto Format Anti aliased plot Black and white Default Double Y axis Drop fill to 0 Drop lines to 0 Fill to 0 Hidden axes Histogram LabVIEW default Logarithmic X and Y axes Logarithmic X axis Strip chart XY step Description Configures the graph with settings that are ideal for plotting scatter data Cancel 6 Right click the gauge and select Auto Format to display the Auto Format dialog box 7 Select Dark and click OK On the gauge smart tag set the Range property for the gauge with the drop down Range type editor Type 0 2 for the minimum value and type 0 2 for the maximum value 9 On the numeric edit smart tag select Indicator for the InteractionMode property of the numeric edit control 10 On the numeric edit smart tag select Format Mode and in the Numeric Format Mode Editor dialog box change the Precision to 4 to show four decimal places of precision Click OK Measurement Studio User Manual 5 20 ni com Chapter 5 Getting Started with Measurement Studio 11 Select File Sav
7. El Appearance Source E Plot Text Signal Visible True El Data ApplicationSettin Tag El Design Name legendItem1 GenerateMember True Modifiers Private 2 Select Plot in the Source drop down list and enter Signal in the Text box Click OK Now that you have specified a legend item for the plot changes you make to the plot will be reflected on the legend 3 Right click the graph and select Auto Format to display the Auto Format dialog box The Auto Format dialog box provides a set of pre configured control styles When you select a style and click OK the Auto Format feature configures the appropriate control properties to reflect the style you chose National Instruments Corporation 5 9 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio 4 Select Points Only Click OK Notice that the legend changed automatically to match the formatting of the graph SY Auto Format Anti aliased plot Black and white Default Double Y axis Drop fill to 0 Drop lines to 0 Fill to 0 Hidden axes Histogram LabVIEW default Logarithmic X and Y axes ee X axis Strip chart XY step Description Configures the graph with settings that are ideal for plotting scatter data Click the gauge smart tag to display the Gauge Tasks Select Auto Format to display the Auto Format dialog box Select Dark and click OK 9o cn QV tA Right click the gauge and select Properties to displ
8. Inverse F Distribution Inverse Normal Distribution Inverse T Distribution Mean Median and Mode lt S Moment about Mean Normal Distribution Polynomial Interpolation RMS Spline Interpolant Spline Interpolation Standard Deviation T Distribution Variance SON ONENESS SENOS NSE S Special Functions Airy Bessel Ist Bessel 2nd Beta Complimentary Gamma Cosine Integral Dawson s Integral Dilogarithm 2 SER RN OR ES Measurement Studio User Manual ni com Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis Visual C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Libr ary Professional Package Enterprise Package Elliptic 1st v Elliptic 2nd Exponential Integral Factorial Fresnel Integrals Gamma Gauss HyperGeometric Hyperbolic Cosine Integral Hyperbolic Sine Integral Incomplete Beta Incomplete Elliptic 1st Incomplete Elliptic 2nd Incomplete Gamma Jacobian Elliptic Function Kelvin Ist Kelvin 2nd Kummer Logarithm of Factorial Modified Bessel 1st Modified Bessel 2nd Parabolic Cylinder Psi Sine Integral Spherical Bessel 1st Spherical Bessel 2nd Stirling ON
9. eesesseeseeeeseeeeeeeeneen rennen eene 2 50 AutoRefresh Control etie t bete n cer etude 2 50 AutoRefresh Callback iet etes 2 51 Chapter 3 Measurement Studio Visual C Class Libraries Measurement Studio User Manual vi ni com Measurement Studio Visual C Class Library Overview see 3 1 ActiveX Controls in Visual CE eee ett reete epe 3 2 3D Graph Gohttrol neo ER Hep E GRE e HU PRU TA 3 2 Plot Op rations eee e ge etr e iere Ris 3 3 Additional Operations ierse niaren nennen nemen 3 3 Analysis isceeintei onmino Pee oet REI ee 3 3 Standard Analysis nee ree e tere Hrs e E OR EH obs 3 4 Professional Analysts rtt tte tea dee tes 3 4 Enterprise Analysis iie dere Pe eite eee get e vela 3 4 Common i4 ume dediepuibeuteeqieiplmecalipediu eed des 3 14 D taSacket z atate ENT e PETER nO ead diane elas 3 15 Microsoft Excel Interface srece et t e t de tpe Hd c ite RT 3 15 Contents Microsoft Word Interface 5 d e er cess bosch e E e loa 85 e e pvo PED ede RINGS V es 3 16 INICA SS 2s Nott autetn tients ux MR esie 3 16 INTE DIA Omak baie ntium tutuwta dta et ee 3 16 NE R poOtts 2i teet td ttr p e e NO pe 3 17 INISVIS Aisne SERE Gt die tide e NUN d 3 17 User Interface ode ai mh pO GREGOR ten as 3 18 Button Control ne v E ER t Ve REFERS PER EC ESTEE ANUS 3 19 Graph Control epe D Hp D eie 3 20 Plot Operations iiti a aa 3 20 Axis Operations siisii kissan era rsa atn aaas Ae
10. AutoRefresh group For down level browsers the controls update when the page posts back to the server If the client browser supports client callbacks the client side script rendered by the AutoRefresh control uses a client callback to update the associated controls on the client without posting the page back to the server 3 Note The AutoRefresh control is designed to work with the ASP NET AJAX UpdatePanel and Timer controls in Visual Studio 2008 AutoRefresh Callback This feature provides a mechanism for updating the Enabled and Interval properties for AutoRefresh from within the Refresh callback allowing you to turn off the AutoRefresh or change the Interval during an asynchronous HTTP request without causing a postback National Instruments Corporation 2 51 Measurement Studio User Manual Measurement Studio Visual C Class Libraries This chapter provides overview information about the Visual C class libraries that are available with Measurement Studio Measurement Studio Visual C support for Visual Studio 2005and Visual Studio 2008 is the same except where noted Refer to the Using the Measurement Studio Visual C Class Libraries section of the NI Measurement Studio Help for detailed information about these libraries Measurement Studio Visual C Class Library Overview Measurement Studio provides libraries of MFC based classes that you can use to develop complete measurement and automation applications in Vi
11. Complex QZ Decomposition Complex Schur Decomposition Complex Solve Linear Equations Multiple Right Hand Complex Solve Linear Equations Single Right Hand lt S Complex SVD Factorization Complex Vector Norm Determinant Dot Product Forward Substitution General Eigen AB Hessenberg Decomposition Inverse Matrix Linear Equations LU Factorization Matrix Balance SON ONT SON ONY NON OAS National Instruments Corporation 3 9 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis Visual C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Matrix Condition Number v v Matrix Multiplication v v Matrix Norm v v Matrix Rank v v Outer Product v v Pseudo Inverse Matrix v v QR Factorization v QR Factorization with v Pivot Matrix QR Factorization with Y Pivot Vector QZ Decomposition v Schur Decomposition v Solve Linear Equations v Multiple Right Hand Solve Linear Equations Single v Right Hand Special Matrix v v SVD Factorization Y Test Positive Definite Matrix v v Trace v v Transpose Y Y Array and Numeric Operations 1D and 2D Array Arithmetic v v 1D and 2D Linear Evaluation v v 1D and 2D P
12. National Instruments Corporation 1 1 Measurement Studio User Manual Chapter 1 Introduction to Measurement Studio Measurement Studio 2009 Support for Visual Studio NET 2003 Measurement Studio support for Visual Studio NET 2003 is considered a legacy product As a result support for Visual Studio NET 2003 has not been updated in Measurement Studio 2009 The version number for Measurement Studio support for Visual Studio NET 2003 is 8 1 2 with the exception of the ActiveX controls The ActiveX controls are shared between Visual Studio NET 2003 Visual Studio 2005 and Visual Studio 2008 support Measurement Studio 2009 Support for Visual Studio 6 0 Installation Re Measurement Studio support for Visual Studio 6 0 is considered a legacy product however Measurement Studio Visual Studio 6 0 support still supports the most recent versions of the ActiveX user interface and 3D graph controls Updates to the Measurement Studio Support for Visual Studio 6 0 software are available on ni com by selecting Support Drivers and Updates Software Measurement Studio quirements To use Measurement Studio your computer must have the following e Microsoft Windows 7 Vista XP 2000 SP3 or later for Visual Studio 2005 or Microsoft Windows 7 Vista XP for Visual Studio 2008 iyi Note This version of Measurement Studio supports and was tested with the latest operating system service packs that were available at the time this versio
13. Right click the waveform graph and select Properties to display the Properties window for the graph You can configure the properties of the control in the Properties window Expand the Data Bindings group in the Properties window Select Other Data Sources Form 1 List Instances network VariableDataSource1 Binding1 from the Binding Data drop down list This will bind the waveform graph to the network variable that you are writing to in the console application The waveform graph will then read and display the data being written to the network variable Select File Save Form1 to save your application Select Debug Start Without Debugging to run the application The waveform graph displays the array of data H Form1 5 30 ni com Chapter 5 Getting Started with Measurement Studio Walkthrough Creating a Measurement Studio Application with Web Forms Controls and Network Variable Note To complete this walkthrough you must have either the Measurement Studio Professional or Measurement Studio Enterprise package installed for Visual Studio 2005 or later This walkthrough will not work with the Measurement Studio Standard package Measurement Studio includes user interface controls such as a waveform graph control and network variable functionality to transfer live measurement data between applications over the network This walkthrough is designed to help you learn how to add network variable functionality to a Web Forms ap
14. Solution Name ReaderWriter Create directory For solution Cancel Figure 4 1 New Project Dialog Box in Visual Studio 2005 0 Tip For more information about using project templates to create a new Measurement Studio project refer to the Creating a New Measurement Studio Project section in the NI Measurement Studio Help 3 Note For information about converting Measurement Studio projects refer to the Converting Measurement Studio Projects section in the NI Measurement Studio Help Adding or Removing Measurement Studio NET Class Libraries To add or remove Measurement Studio NET class libraries from a project use the Measurement Studio Add Remove NET Class Libraries wizard on the Measurement Studio menu This wizard provides an interface as shown in Figure 4 2 that you can use to select the Measurement Studio NET class libraries you want to add to or remove from a project National Instruments Corporation 4 5 Measurement Studio User Manual Chapter 4 Measurement Studio Integrated Tools and Features When you exit the wizard the wizard adds or removes the appropriate references to or from the project thus adding or removing the functionality associated with the class library Measurement Studio Visual CZ Windows Application Wizard Measurement Studio Class Libraries NATIONAL Select the class libraries you want to include in the project INSTRUMENTS Enterprise Analysis V Measurement Studio Hardwar
15. Walkthrough Creating a Measurement Studio Application with Windows Forms Controls and Network Variable esee 5 22 Walkthrough Creating a Measurement Studio Application with Web Forms Controls and Network Variable sese 5 31 Walkthrough Creating a Measurement Studio NI DAQmx Application 5 42 Walkthrough Creating a Measurement Studio Instrument I O Application 5 52 National Instruments Corporation Vii Measurement Studio User Manual Contents Appendix A Technical Support and Professional Services Glossary Index Measurement Studio User Manual viii ni com About This Manual The Measurement Studio User Manual introduces the concepts associated with the Measurement Studio class libraries and development tools This manual assumes that you have a general working knowledge of Microsoft Visual Studio and the NET Framework for NET application development or MFC for unmanaged C application development How to Use This Manual Measurement Studio 2009 Professional and Enterprise packages include two Visual Studio support installation discs one DVD with support for Visual Studio NET 2003 Visual Studio 2005 and Visual Studio 2008 and one CD with support for Visual Studio 6 0 The Measurement Studio 2009 Standard package includes one CD with support for Visual Studio NET 2003 Visual Studio 2005 and Visual Studio 2008 This manual
16. cards and DAQPad devices which connect to a computer USB or 1394 port SCXI modules are considered DAQ devices Measurement Studio User Manual Glossary DataSocket device digital I O digital waveform graph distribution DLL DMM downlevel browser driver DSTP Measurement Studio User Manual Technology that simplifies live data exchange between applications and HTTP FTP OPC logos Lookout objects and file servers over the Internet It provides one common API to a number of different communication protocols An instrument or controller you can access as a single entity that controls or monitors real world I O points A device is often connected to a host computer through some type of communication network See also DAQ device and measurement device Reading or writing digital representations of data in discrete units the binary digits 1 and 0 Digital information is either on or off A control that displays Digitalwaveform data on a Windows Forms or Web Forms user interface the DigitalWaveform data type represents a set of digital states that are grouped by samples or signals Ability to install programs you develop with Measurement Studio to others working on different computers Dynamic Link Library A library of functions that link to a program and load at run time rather than being compiled into the program Loading libraries only when they are needed saves memory in software applications
17. property editor 2 34 scatter graph 2 23 2 39 slide 2 32 2 48 switch 2 33 2 50 tank 2 32 2 48 thermometer 2 32 2 48 waveform graph 2 23 2 39 Visual C class library 3 18 button 3 18 graph 3 20 knob 3 21 numeric edit 3 22 slide 3 23 Utility Visual C class library CNiFile table 3 24 CNiSound table 3 24 CNiSystem table 3 24 CNiSystemTraylIcon table 3 24 CNiTempFile table 3 24 CNiTimer table 3 24 V Variable Manager 4 3 Visual C class libraries 3D graph 3 2 Analysis 3 3 Common 3 14 deployment requirements 1 4 Microsoft Excel Interface 3 15 Microsoft Word Interface 3 16 NI 488 2 3 16 NI DAQmx 3 16 NI Reports 3 17 Measurement Studio User Manual l 4 NI VISA 3 17 overview 3 1 User Interface 3 18 Utility 3 23 W walkthrough Creating a Measurement Studio Application with Webs Forms Controls and Analysis in Visual Studio 2005 5 11 Creating a Measurement Studio Application with Webs Forms Controls and Network Variable in Visual Studio 2005 5 31 Creating a Measurement Studio Application with Windows Forms Controls and Analysis 5 2 Creating a Measurement Studio Application with Windows Forms Controls and Network Variable 5 22 Creating a Measurement Studio Instrument I O Application 5 52 Creating a Measurement Studio NI DAQmx Application 5 42 waveform graph control 2 23 2 39 Web Forms user interface controls 2 39 Web resources A 1 Windows For
18. support phone numbers email addresses and current events Measurement Studio User Manual A 2 ni com Glossary A ActiveX ActiveX control ActiveX control container analog I O annotate ANSI C API array control assembly asynchronous National Instruments Corporation G 1 Set of Microsoft technologies for reusable software components Formerly called OLE Reusable software component that adds functionality to any ActiveX control container through exposed properties methods and events The Measurement Studio data acquisition user interface and analysis controls are examples of ActiveX controls Development environment that fully supports ActiveX controls and integrates them into its own environment using COM An ActiveX control container enables you to specify how ActiveX controls interact with the environment through environment properties Visual Basic is an example of an ActiveX control container Reading or writing data in continuously variable physical quantities such as voltage or current Adding text arrows or shapes to describe or highlight a point or region on a graph C programming language defined by the American National Standards Institute Application Programming Interface A specification of software functions and their input and return parameters An array of Measurement Studio user interface controls that behave as a single unit A collection of one or more files tha
19. v Transpose v SISSIN IS Array and Numeric Operations 1D and 2D Array Arithmetic v S 1D and 2D Linear Evaluation v S 1D and 2D Polynomial Evaluation v 1D Polar to Rectangular Measurement Studio User Manual ni com Chapter 2 Measurement Studio NET Class Libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis NET Library Professional Package Enterprise Package 1D Rectangular to Polar v v Complex Number Arithmetic v Find Polynomial Roots v Scale 1D and 2D v E Curve Fitting Cubic Spline Fit Exponential Fit v Exponential Fit Interval Gauss Fit Gauss Fit Interval General Least Squares Linear Fit SN NONE NINN General Polynomial Fit Goodness of Fit Linear Fit Linear Fit Interval Logarithm Fit Logarithm Fit Interval Nonlinear Fit Power Fit Power Fit Interval Remove Outliers SPAIN SENN RORY SN Statistics 1D 2D and 3D ANOVA bs Chi Square Distribution lt S erf x and erfc x National Instruments Corporation 2 11 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise
20. DAQ devices Ss Note Some DAQ devices are not currently supported by the NI DAQmx driver Refer to the NI DAQ Readme for a complete listing of supported hardware National Instruments Corporation 2 17 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Use the NI DAQmx class library to perform the following types of tasks e Analog signal measurement Analog signal generation e Digital I O e Counting and timing e Pulse generation e Signal switching Q Tip For more information about the NI DAQmx class library refer to the Using the Measurement Studio NI DAQmx NET Library topic in the NI Measurement Studio Help For more information about DAQ visit ni com dataacquisition NI IMAQ You can use the NI IMAQ NET class libraries to acquire images from NI frame grabbers display images and save images These class libraries provide a NET interface to the underlying driver API NI IMAQ 4 3 and later include support for NET class libraries Q Tip You can download NI IMAQ from the NI Device Drivers DVD You can find NI IMAQ under Vision Acquisition Software NI IMAQdx You can use the NI IMAQdx NET class libraries to acquire images from GigE IEEE 1394 or USB cameras display images and save images These class libraries provide a NET interface to the underlying driver API NI IMAQdXx 3 4 and later include support for NET class libraries 0 Tip You can download NI IMAQdx from the NI
21. Digital Multimeter A common measurement instrument that measures resistance current and voltage in a wide variety of applications Previous generation Web browser with limited client interaction See also uplevel browser Software that controls a specific hardware device such as a data acquisition board or GPIB interface board See also instrument driver DataSocket Transfer Protocol Protocol based on TCP IP to exchange data directly between two applications using DataSocket clients Data is passed through a DataSocket Server between the applications G 4 ni com E Ethernet event executable form front panel FTP gauge GPIB graph HTTP Glossary Standard connection type for networks where computers are connected by coaxial or twisted pair cable Object generated response to some action or change in state such as a mouse click or a completed acquisition The event calls an event procedure that processes the event Program file with a exe extension that you can run independently of the development environment in which it was created Window or area on the screen on which you place controls and indicators to create the user interface for your program Interactive user interface of a virtual instrument Modeled after the front panel of physical instruments it is composed of switches slides meters graphs charts gauges LEDs and other controls and indicators File Transfer Protocol Protocol bas
22. END USER SYSTEM IS CUSTOMIZED AND DIFFERS FROM NATIONAL INSTRUMENTS TESTING PLATFORMS AND BECAUSE A USER OR APPLICATION DESIGNER MAY USE NATIONAL INSTRUMENTS PRODUCTS IN COMBINATION WITH OTHER PRODUCTS IN A MANNER NOT EVALUATED OR CONTEMPLATED BY NATIONAL INSTRUMENTS THE USER OR APPLICATION DESIGNER IS ULTIMATELY RESPONSIBLE FOR VERIFYING AND VALIDATING THE SUITABILITY OF NATIONAL INSTRUMENTS PRODUCTS WHENEVER NATIONAL INSTRUMENTS PRODUCTS ARE INCORPORATED IN A SYSTEM OR APPLICATION INCLUDING WITHOUT LIMITATION THE APPROPRIATE DESIGN PROCESS AND SAFETY LEVEL OF SUCH SYSTEM OR APPLICATION Contents About This Manual How to Use This Manual ccccccccsessscscscsscccscccsecccceeseceesesesssssssescsssssseseseseeesesesseees 1X CONVENUONS 4258 5 seats etae tee teeeomtus Meteo uere ena eda eoi oM Cc eol tu cte M KATAR cte de e oats X Chapter 1 Introduction to Measurement Studio Measurement Studio 2009 Support for Visual Studio NET 2003 1 2 Measurement Studio 2009 Support for Visual Studio 6 0 sess 1 2 Installation Requirements seen eene enne nnne enne enne nentes ennt nnne 1 2 Driver Support tente d ee ee e ets 1 3 Deployment Requirements snaa ri aN SE a O E a e E A iE 1 4 Deploying 64 bit Applications esee 1 4 Installation Instructions eese eene ene 1 4 Installing the Current Version of Measurement Studio over Previous V
23. Enterprise Analysis section of Chapter 2 Measurement Studio NET Class Libraries for a list of the functionality included in the Enterprise Analysis class library Learning Measurement Studio As you work with Measurement Studio you might need to consult additional resources For detailed Measurement Studio help including function reference and in depth documentation on developing with Measurement Studio refer to the NJ Measurement Studio Help within the Visual Studio environment The NJ Measurement Studio Help is fully integrated with the Visual Studio help You must have Visual Studio installed to view the online help and you must have the Microsoft NET Framework SDK 2 0 for Visual Studio 2005 or the Microsoft NET Framework SDK 3 5 for Visual Studio 2008 installed in order for links from Measurement Studio help topics to NET Framework help topics to work You can launch the NI Measurement Studio Help in the following ways e From the Windows Start menu select Start AIl Programs National Instruments Measurement Studio gt Measurement Studio Documentation e From Visual Studio select Help Contents to view the Visual Studio table of contents The NI Measurement Studio Help is listed in the table of contents e From Visual Studio select Measurement Studio NI Measurement Studio Help National Instruments Corporation 1 7 Measurement Studio User Manual Chapter 1 Introduction to Measurement Studio Tip A
24. Microsoft specification for architecting and developing reusable software components A control that displays a ComplexDouble data type the ComplexDouble data type represents a complex number of type Double that is composed of a real part and an imaginary part Help for dialog boxes the controls in dialog boxes and keywords in source code that you can access with the key or a Help button or by clicking the link that appears in the Dynamic Help window in Visual Studio 1 ActiveX control See ActiveX control 2 Object for entering displaying or manipulating data on a user interface Reading or writing data based on high precision timing through a counter or timer By combining a counter with a highly accurate clock you can create a wide variety of timing and counting applications such as monitoring and analyzing digital waveforms and generating complex square waves Flashing rectangle that shows where you may enter text on the screen If you have a mouse installed there is a rectangular mouse cursor or pointer Text object used to display X and Y coordinates that a cursor crosshair points to on a graph Data acquisition Process of acquiring data typically from A D or digital input plug in boards A graphical interface for configuring measurement tasks channels and scales A device that acquires or generates data and can contain multiple channels and conversion devices DAQ devices include plug in devices PCMCIA
25. Project e Creating a Measurement Studio NI DAQmx Application e Creating an Instrument Control Application e Adding or Removing Measurement Studio NET Class Libraries e Selecting a Measurement Studio Parameter Value e Using the Instrument Driver Wizard Refer to the Developing with Measurement Studio section in the NI Measurement Studio Help for more information about the functionality of these tools and features Measurement Studio Menu The Measurement Studio Menu provides an easy way to access the following National Instruments resources and tools e Parameter Assistant Use the Measurement Studio Parameter Assistant to discover and insert valid parameter values for various Measurement Studio class libraries such as NI DAQmx NI 488 2 and NI VISA methods The Parameter Assistant is available only if you have Measurement Studio class libraries installed that use parameter values National Instruments Corporation 4 1 Measurement Studio User Manual Chapter 4 Measurement Studio Integrated Tools and Features Measurement Studio User Manual Add Remove NET Class Libraries Wizard Use the Measurement Studio Add Remove Class Libraries wizard to add or remove Measurement Studio class libraries or assemblies in existing Visual Basic NET Visual C or Visual C projects Refresh Project License File Use the Refresh Project License File to update the licenses 1icx file in a Measurement Studio project to the currently re
26. SOS ERT RS SON SP TOT NISUS RENT ORS SN OSS National Instruments Corporation Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis Visual C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Struve v Tricomi y Zeta v Q Tip For more information about analyzing or generating data with the Analysis class library refer to the Analysis Visual C Class Library Overview topic in the NI Measurement Studio Help For more information about the functionality included in the Analysis class library visit ni com analysis and select Analysis in Measurement Studio Common Measurement Studio User Manual The Measurement Studio Common Visual C class library provides data types and classes that other Measurement Studio Visual C class libraries use The classes that are implemented natively in Visual C include the CNiVector and CNiMatrix classes The Common class library includes the following data types CNiScalarVector lImplements a vector object that contains scalar numbers CNiScalarMatrix Implements a matrix object that contains scalar numbers CNiString Extends the MFC CString class with streaming operators for a variety of data types and with various other string manipulation functions CNiScalarVector lImp
27. This class library is not available in Visual Studio 2008 Tip For information about generating printed reports using the NI Reports class library refer to the NI Reports Visual C Class Library Overview topic in the NI Measurement Studio Help NI VISA The Measurement Studio NI VISA Visual C class library includes Visual C classes that provide an object oriented interface to the NI VISA driver This class library is included when you install the NI VISA driver Use the NI VISA class library to quickly create bus independent and or bus specific instrument control applications National Instruments Corporation 3 17 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries The NI VISA class library supports I O operations locking event handling and interface specific extensions With this class library you can access the functionality available in NI VISA for communicating with message based and register based instruments using the following interfaces GPIB e PXI e Serial RS 232 and RS 485 e TCP IP e USB e VXI Q Tip For information about easily creating a Measurement Studio NI VISA application using the Instrument I O Assistant refer to the Creating an Instrument Control Application section of Chapter 4 Measurement Studio Integrated Tools and Features or the Walkthrough Creating a Measurement Studio Instrument I O Application section of Chapter 5 Getting Started with Measurement Stu
28. WebForms data sources to expose Network Variable data items that you can bind to properties of a Windows Forms or a Web Forms control National Instruments Corporation 2 15 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Use the features in the Network Variable class library to perform the following operations e Exchange different types of data between Measurement Studio LabVIEW LabWindows CVI and other applications that support NI Publish Subscribe Protocol psp and OLE for Process Control opc servers Exchanging data between Measurement Studio applications and OPC servers requires LabVIEW DSC My Note Measurement Studio and LabWindows CVI refer to variables as network variables and LabVIEW refers to variables as shared variables However you can read to and write from Measurement Studio and LabWindows CVI network variables with LabVIEW shared variables e Use Windows Forms and Web Forms data sources to expose Network Variable data items that you can bind to properties of a Windows Forms or a Web Forms control e Use the NationalInstruments NetworkVariable ServerProcess NationalInstruments NetworkVariable ServerProcessInfo NationalInstruments NetworkVariable ServerVariable and NationallInstruments NetworkVariable ServerVariableInfo classes to explicitly create network variables You can configure the description and type for explicitly created network variables e Use the Networ
29. a standard for VXI by the VXIplug amp play Systems Alliance VME eXtension for Instrumentation Instrumentation architecture and bus based on the VME standard Used in high end test applications A control that displays two dimensional data on a Windows Forms or Web Forms user interface displays data that is uniformly spaced in one dimension Measurement Studio User Manual Index A ActiveX controls in Visual C 3 2 Add Remove Class Libraries wizard 4 5 adding or removing Measurement Studio class libraries 4 5 Analysis NET class library 2 3 Array and Numeric Operations table 2 10 Curve Fitting table 2 11 Enterprise Analysis 2 4 Filters table 2 6 Linear Algebra table 2 8 Measurements table 2 4 Professional Analysis 2 3 Signal Generation table 2 5 Signal Processing table 2 7 Standard Analysis 2 3 Statistics table 2 11 Windowing table 2 6 Visual C class library 3 3 Array and Numeric Operations table 3 10 Curve Fitting table 3 11 Enterprise Analysis 3 4 Filters table 3 6 Linear Algebra table 3 8 Measurements table 3 5 Professional Analysis 3 4 Signal Generation table 3 5 Signal Processing table 3 7 Standard Analysis 3 4 Statistics table 3 11 Windowing table 3 6 AutoRefresh control 2 50 button control 3 19 National Instruments Corporation l 1 C calibration certificate NI resources A 2 Common NET class library 2 14 Visual C clas
30. amp play and legacy instrument drivers based on the instrument driver function panel header file and an optional sub file for IVI drivers The wizard can generate both Visual C and Visual Basic NET source code After completing the wizard a new instrument driver wrapper class is added to your project and opened in the source code editor Add New Item ScopeProject Categories Templates E Visual C Project Items Visual Studio installed templates Measurement Studio ss DAQmx Component w Instrument Driver ai Visa Task My Templates Search Online Templates 4 wrapper class for an instrument driver Mame NiScope cs Figure 4 7 Launching the Measurement Studio NET Instrument Driver Wizard from the Add New Item Wizard 0 Tip For information about the NET instrument driver wizard refer to the Calling Instrument Drivers from NET Languages topic in the NI Measurement Studio Help Measurement Studio User Manual 4 12 ni com Getting Started with Measurement Studio The following sections include overview information and step by step instructions on developing applications with Measurement Studio tools and features Refer to the Developing with Measurement Studio section and the Getting Started with the Measurement Studio Class Libraries section of the NI Measurement Studio Help for more information about the functionality of these tools and features Measurement Studio Walkthroug
31. and meter controls as shown in Figure 2 4 to input and display numeric data on your user interface D Knob Gauge and Meter Controls Figure 2 4 Knob Gauge and Meter Windows Forms Controls With the knob gauge and meter controls and the classes that interface with the controls you can perform the following operations e Specify the start and sweep angle of the arc programmatically or from the Properties window e Use automatic division spacing custom divisions and invert the scale National Instruments Corporation 2 31 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Use the Measurement Studio slide tank and thermometer controls as shown in Figure 2 5 to input and display numeric data on your interface Slide Tank and Thermometer Controls DEAR Figure 2 5 NET Slide Tank and Thermometer Controls With the slide tank and thermometer controls and the classes that interface with them you can perform the following operations e Fill to the minimum or maximum value of the scale Position the scale horizontally with left right or both and position the scale vertically with top bottom or both Tip For more information about using the Windows Forms knob gauge meter slide tank or thermometer controls refer to the Knob Gauge Meter Slide Tank or Thermometer Class sections in the NI Measurement Studio Help Numeric Edit Control Use the Measurement St
32. as shown in Figure 4 6 based on your current system configuration Click the Insert Selected Item button on the Parameter Assistant to insert the value into the current location in the active source file Parameter Assistant ER 9 El Physical Channel Al Channels Dev ai0 Dev1 aoll CI Channels Devi ctrO CO Channels Devi ctr DiLine Channels Devi port lineQ DIPort Channels Dev1 port0 DOLine Channels Devi port lineQ DOPort Channels Dev port E bens SE Ch mls Daut tsin AO Channels Select an analog output physical channel Figure 4 6 Measurement Studio Parameter Assistant Q Tip For information about using the Measurement Studio Parameter Assistant to select a parameter value refer to the Selecting a Measurement Studio Parameter Value section in the NI Measurement Studio Help Using the Instrument Driver Wizard To use an IVI or VXI plug amp play instrument driver with a C DLL in a Measurement Studio NET application use the Measurement Studio NET Instrument Driver wizard to create NET entry points to the C DLL functions you need to call from your application Use the Add New Item wizard to select the NET Instrument Driver Wizard National Instruments Corporation 4 11 Measurement Studio User Manual Chapter 4 Measurement Studio Integrated Tools and Features The Measurement Studio NET Instrument Driver wizard as shown in Figure 4 7 generates a NET wrapper class for calling into IVI VXI plug
33. but you cannot have Measurement Studio 2009 for Visual Studio 2005 installed on the same system as Measurement Studio 8 6 1 for Visual Studio 2005 If you install a newer version of Measurement Studio on a machine that has a prior version of Measurement Studio installed the newer version installer replaces the prior version functionality including class libraries However the prior version assemblies remain in the global assembly cache GAC therefore applications that reference the prior version continue to use the prior version NET assemblies Measurement Studio Package Comparison Chart The following table lists the features included in the Standard Professional and Enterprise packages of Measurement Studio Refer to ni com mstudio for more information about the functionality and features included with each Measurement Studio package including Visual C functionality Table 1 1 Measurement Studio Package Comparison Chart for Visual C and Visual Basic NET Feature Standard Edition Professional Edition Enterprise Edition Project Wizards v v v Windows Forms User v v v Interface Controls Standard Analysis v v v Libraries GPIB Class Libraries v v Y National Instruments Corporation 1 5 Measurement Studio User Manual Chapter 1 Introduction to Measurement Studio Table 1 1 Measurement Studio Package Comparison Chart for Visual C and Visual Basic NET
34. class library to describe store and read measurement data that is optimized for high speed data streaming and post processing Additionally you can use the TDMS NET class library to create files that you can use in LabVIEW CVI and DIAdem and files created by these applications can be used by the TDMS NET class library You can use the Measurement Studio TDMS NET class library to perform the following operations e Read and write array data in a structured format from and to a tdms file e Read and write analog waveform data or digital waveform data including timing information from and to a tdms file e Using the TdmsProperty class you can create custom properties for each level of the hierarchy by defining a name data type and value e Read data that was streamed directly to file using the NI DAQmx high speed data logging API This feature is available only with NI DAQmx 9 0 and later Tip For more detailed information about the TDMS class library refer to the Using the Measurement Studio TDMS NET Library section in the NI Measurement Studio Help TDM Excel Add In You can use the TDM Excel Add In to load NI tdm and tdms files into Microsoft Excel Use the toolbar from within Excel to choose which properties are loaded into Excel at the file group and channel levels including custom properties To uninstall the TDM Excel Add In select Start Control Panel Add or Remove Programs select National Instruments S
35. cursor snap modes to be floating nearest point or to plot Use cursor labels to display real imaginary magnitude or phase data that the cursor crosshair points to and customize the text font and colors of the label Create custom point and line styles for cursors Interactively move the cursor by clicking and dragging the vertical or horizontal crosshair or the center of the cursor Programmatically move the cursor to previous or next position or to a specified coordinate Create custom mouse cursors programmatically or at design time using the mouse cursor style editor 2 45 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Annotation Operations e Configure text labels arrows and drawing shapes to annotate a point anywhere in the plot area of the graph e Configure range area text labels and arrows to annotate a range in the plot area of the graph e Annotate and label a magnitude value e Annotate and label a range of magnitude values for a particular phase Additional Operations e Zoom interactively as well as programmatically e Specify the image format of the control as BMP GIF JPEG or PNG Tip For more information about using the complex graph control refer to the Using the Measurement Studio Web Forms Complex Graph NET Control section in the NI Measurement Studio Help Legend Control Use the Measurement Studio legend control as shown in Figure 2 13 to display
36. documents support for Visual Studio 2005 and Visual Studio 2008 The Measurement Studio User Manual is organized into five chapters Chapter 1 Introduction to Measurement Studio is an overview of Measurement Studio This chapter includes installation and deployment requirements installation instructions and a list of Measurement Studio resources Chapter 2 Measurement Studio NET Class Libraries and Chapter 3 Measurement Studio Visual C Class Libraries include information about the NET class libraries and the Visual C class libraries respectively Chapter 4 Measurement Studio Integrated Tools and Features includes information on using the Measurement Studio tools and features integrated into the Visual Studio environment Chapter 5 Getting Started with Measurement Studio includes walkthroughs that guide you through step by step instructions on how to develop with Measurement Studio features Use this manual as a starting point to learn about Measurement Studio Refer to the NI Measurement Studio Help within the Visual Studio environment for function reference and detailed information about the Measurement Studio class libraries wizards assistants and other features National Instruments Corporation ix Measurement Studio User Manual About This Manual Conventions lt gt q 5 bold italic monospace Measurement Studio User Manual The following conventions appear in this manual Text enclosed
37. following components are required to complete this walkthrough Microsoft Visual Studio 2005 or Visual Studio 2008 Measurement Studio 8 0 1 or later Professional or Enterprise package for Visual Studio 2005 or Measurement Studio 8 5 or later Professional or Enterprise package for Visual Studio 2008 Setting up the project 1 2 Select Start All Programs Microsoft Visual Studio 2005 Microsoft Visual Studio 2005 or Start All Programs Microsoft Visual Studio 2008 Microsoft Visual Studio 2008 Select File New Web Site The New Web Site dialog box launches 5 12 ni com Chapter 5 Getting Started with Measurement Studio New Web Site Templates Visual Studio installed templates ER ASP NET Web Site WMI ASP NET Web Site 2 ASP NET Web Service Personal Web Site Starter Kit e Empty Web Site SRASP NET Crystal Reports Web Site My Templates search Online Templates A Measurement Studio ASP NET web site Location File System C Documents and Settings MyMeasurementStudioWebsite II nous Language 3 Inthe Templates pane select NI ASP NET Web Site Select File System and specify a file path of your choice 4 Use the drop down box to select Visual Cft or Visual Basic depending on which language you want to create the project in 5 Click OK The Measurement Studio ASP NET Web Site Wizard launches 6 Select Analysis Library and Web Forms User Interface Control L
38. libraries you want to include in the project INSTRUMENTS C Enterprise Analysis Library NetworkVariable Communication Library Web Forms User Interface Control Library Tip If you are working with an existing project you can access the Add Remove Class Libraries dialog box by selecting Measurement Studio Add Remove Class Libraries Wizard 7 Click Finish to display Default aspx in the Web Forms Designer You can rename the title of your Web page Click inside the lt title gt tag and rename the title to Measurement Studio Network Variable and Web Forms Controls Walkthrough National Instruments Corporation 5 87 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio Configuring the network variable data source control 1 Click Design in the lower left corner to switch from Source View to Design View Select View Toolbox to display the Toolbox The toolbox contains components and controls that you can add to your project Expand the Measurement Studio group on the Toolbox Select the Network VariableDataSource control in the toolbox and drag and drop it on the form The Network VariableDataSource control is a data source control with functionality similar to System Web UI WebControls ObjectDataSource and System Web UI WebControls SqlDataSource in the NET Framework The Network VariableDataSource control encapsulates Network Variable functionality In the Network VariableDat
39. local office at ni com contact Training and Certification Visit ni com training for self paced training eLearning virtual classrooms interactive CDs and Certification program information You also can register for instructor led hands on courses at locations around the world System Integration If you have time constraints limited in house technical resources or other project challenges National Instruments Alliance Partner members can help To learn more call your local NI office or visit ni com alliance A 1 Measurement Studio User Manual Appendix A Technical Support and Professional Services Declaration of Conformity DoC A DoC is our claim of compliance with the Council of the European Communities using the manufacturer s declaration of conformity This system affords the user protection for electromagnetic compatibility EMC and product safety You can obtain the DoC for your product by visiting ni com certification e Calibration Certificate If your product supports calibration you can obtain the calibration certificate for your product at ni com calibration If you searched ni com and could not find the answers you need contact your local office or NI corporate headquarters Phone numbers for our worldwide offices are listed at the front of this manual You also can visit the Worldwide Offices section of ni com niglobal to access the branch office Web sites which provide up to date contact information
40. modes to be floating nearest point or to plot Use cursor labels to display X and Y data coordinates in a customized format that the cursor crosshair points to and customize the text font and colors of the label Create custom point and line styles for cursors Interactively move the cursor by clicking and dragging the vertical or horizontal crosshair or the center of the cursor Programmatically move the cursor to previous or next position or to a specified coordinate Create custom mouse cursors programmatically or at design time using the mouse cursor style editor Annotation Operations National Instruments Corporation Configure text labels arrows and drawing shapes to annotate a point anywhere in the plot area of the graph Configure range area text labels and arrows to annotate a range in the plot area of the graph 2 41 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Additional Operations Zoom interactively as well as programatically e Specify the image format of the control as BMP GIF JPEG or PNG Q Tip For more information about using the waveform and scatter graph controls refer to the Using the Measurement Studio Web Forms Scatter and Waveform Graph NET Controls section in the NJ Measurement Studio Help Digital Waveform Graph Control Use the Measurement Studio digital waveform graph control as shown in Figure 2 14 to display DigitalWaveform data in an ASP NET
41. one version of Visual Studio you can reduce installation time by running the Device Drivers DVD installer only once To do this ensure that the Device Drivers DVD feature is enabled only for the last Measurement Studio Visual Studio support installer that you run Complete the following steps to install Measurement Studio 1 Logon as an administrator or as a user with administrator privileges 2 Launch Autorun exe either from the installation media or from the location to which you extracted the downloaded disc image 3 Select the version of Visual Studio you want to install support for Measurement Studio User Manual 1 4 ni com Chapter 1 Introduction to Measurement Studio 4 Follow the instructions that appear on the screen Tip You can use a spec file to programmatically control the Measurement Studio installer An example spec file is located on your installation media at lt drive gt VS200x template_spec txt For more information refer to KnowledgeBase Article 4CJDP38M Automating the Installation of a Single Installer Installing the Current Version of Measurement Studio over Previous Versions of Measurement Studio You can have only one version of Measurement Studio installed on a system for each version of Visual Studio or the NET Framework installed on the system For example you can have Measurement Studio 2009 for Visual Studio 2005 installed on the same system as Measurement Studio 2009 for Visual Studio 2008
42. range in the plot area of the graph Annotate points and ranges of real imaginary and magnitude values Annotate and label a range of magnitude values for a particular phase 2 29 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Additional Operations e Pan and zoom interactively e Copy the graph as a BMP GIF JPEG or PNG image to the clipboard or a file Q Tip For more information about using the complex graph control refer to the Using the Measurement Studio Windows Forms Complex Graph NET Control section in the NI Measurement Studio Help Legend Control Use the Measurement Studio legend control as shown in Figure 2 1 to display symbols and descriptions for a specific set of elements of another object such as the plots or cursors of a graph When you associate the legend control with another object any changes you make to that object are automatically reflected in the legend For example if you associate the legend control with the plots of a graph any changes you make in the plots collection editor are automatically reflected in the legend Q Tip For more information about using the legend control refer to the Using the Measurement Studio Windows Forms Legend NET Control section in the NI Measurement Studio Help Numeric Controls Use the Measurement Studio numeric controls to display numerical information on a Windows Forms user interface with the look of scientific instrume
43. rights reserved Important Information Warranty The media on which you receive National Instruments software are warranted not to fail to execute programming instructions due to defects in materials and workmanship for a period of 90 days from date of shipment as evidenced by receipts or other documentation National Instruments will at its option repair or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty period National Instruments does not warrant that the operation of the software shall be uninterrupted or error free A Return Material Authorization RMA number must be obtained from the factory and clearly marked on the outside of the package before any equipment will be accepted for warranty work National Instruments will pay the shipping costs of returning to the owner parts which are covered by warranty National Instruments believes that the information in this document is accurate The document has been carefully reviewed for technical accuracy In the event that technical or typographical errors exist National Instruments reserves the right to make changes to subsequent editions of this document without prior notice to holders of this edition The reader should consult National Instruments if errors are suspected In no event shall National Instruments be liable for any damages arising out of or related to this document or the information
44. support you can refer to the Measurement Studio User Manual by selecting Start All Programs National Instruments Measurement Studio for NET 2003 User Manual Measurement Studio Support for Visual Studio NET Class Library Overview Measurement Studio provides NET class libraries that you can use to develop complete measurement and automation applications in Visual Basic NET and Visual C Measurement Studio includes the following NET class libraries National Instruments Corporation Analysis Common DataSocket Network Variable NI 488 2 NI DAQmx NI IMAQ NI IMAQdx 2 1 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries NI SCOPE NI VISA NI Vision Development Module Technical Data Management Streaming TDMS User Interface Refer to the following sections for information about each Measurement Studio NET class library 64 bit Support in Measurement Studio NET Assemblies Measurement Studio 2009 support for Visual Studio 2008 includes 64 bit support for Measurement Studio NET assemblies You can use Measurement Studio NET assemblies in 64 bit applications to take advantage of the increased processing power and memory capabilities that are available to 64 bit applications Sy Note Projects created from project templates included with Measurement Studio 8 6 1 or earlier will run as 32 bit unless you manually change the project settings to AnyCPU or x64 in which case t
45. sv 1 Pointer Color lo es v Spindle Color Gainsboro v Scale Arc 240 300 v Value 0 Behavior Coercion Mode None v Coercion Interval 1 Interaction Mode Indicator v Range 0 10 v Edit Range Fills Edit Custom Divisions Auto Format National Instruments Corporation 5 17 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio The following screenshot shows Default aspx with the user controls Default aspx x Leno toi lt L Design Source Generating plotting and analyzing the data 1 Double click the button control to display the Default aspx cs code with the cursor inside the click event handler of the button control 2 Add the following code to generate random data plot the data calculate the mean of the data and display the mean on the gauge VB NET Declare and initialize an instance of WhiteNoiseSignal Dim whiteNoise As New WhiteNoiseSignal Store the generated data in a double array named data Dim data As Double whiteNoise Generate 1000 0 256 Use the PlotY method to plot the data graph PlotY data Use the Mean method to calculate the mean of the data Dim mean As Double Statistics Mean data Display the mean on the numeric edit numericedit Value mean Display the mean on the gauge gauge Value mean Measurement Studio User Manual 5 18 ni com Chapter 5 C Declare and i
46. the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Peak Detection v v Power Spectrum Pulse Parameters Real and Complex FFT SIS ONS Threshold Peak Detector A NEN NN Unwrap Phase v Linear Algebra Back Transform Eigenvectors Backward Substitution Cholesky Factorization SISIN IS Complex Back Transform Eigenvectors S Complex Cholesky Factorization Complex Determinant v v Complex Dot Product v v Complex Eigenvectors and v Eigenvalues lt S Complex General Eigen AB lt S Complex Hessenberg Decomposition Complex Inverse Matrix Complex Linear Equations Complex LU Factorization Complex Matrix Balance SS SS SSN Complex Matrix Condition v Number Complex Matrix Norm v v Measurement Studio User Manual 3 8 ni com Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis Visual C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Complex Matrix Rank v v Complex Outer Product v v Complex Pseudo Inverse Matrix v v Complex QR Factorization Complex QR Factorization with Pivot Matrix Complex QR Factorization with Pivot Vector
47. waveforms and complex waveforms e Configure a graph to contain multiple plots to show separate but related data on the same graph You can configure a graph to automatically generate different colors for different plots e Draw lines or fills from a plot to an X value Y value or another plot e Specify plots in the scatter graph control as X and Y data Specify plots in the waveform graph control as X or Y data and optionally with date and time scaling Measurement Studio User Manual 2 40 ni com Chapter 2 Measurement Studio NET Class Libraries Use the extensible plot and plot area drawing capabilities and events to customize the graph appearance Create custom point and line styles for plots Specify anti aliased plots for plot lines Calculate and display error bands Configure plot to specify how data is saved and restored across HTTP requests Axis Operations Configure a graph to include multiple axes or independent ranges so that plot data fits the graph plot area Configure the axis modes to fixed autoscaling including autoscaling based on the visible data only strip chart or scope chart Use logarithmic axes with configurable bases Interactively change the range of an axis and invert the axis at run time by clicking on the axis end labels Configure major minor and custom divisions and origin lines Cursor Operations Use cursors to identify key points in plots and the plot area Configure cursor snap
48. work with the Measurement Studio Standard package Measurement Studio includes user interface controls such as a waveform graph control and a gauge control and Analysis functionality such as signal generation and mathematical functions This walkthrough is designed to help you learn how to add analysis and presentation functionality to a Web Forms application by taking you through the following steps Setting up the project Using the Measurement Studio Application Wizard you will create a new project that references the Measurement Studio Analysis class library and Web Forms controls Adding user interface controls to the project Using the Toolbox and the Properties window you will add and configure a button waveform graph legend gauge and numeric edit user interface control National Instruments Corporation 5 11 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio Measurement Studio User Manual Generating plotting and analyzing the data Using NationalInstruments Analysis SignalGeneration White NoiseSignal and NationalInstruments Analysis Math Statistics Mean you will generate data plot the generated data on a waveform graph and calculate the mean of the data Customizing the user interface Using the Collection Editor and Auto Format dialog boxes you will display the mean value on the gauge and the numeric edit as well as customize your user interface Before you begin The
49. 1 End While End Sub End Module C using System using System Collections Generic using System Text using System Threading using NationalInstruments NetworkVariable namespace NetworkVariableWriter class Program private static double GenerateDoubleArray double phase 1 double values new double 1000 for int x 0 x 1000 x values x Math Sin 2 Math PI x 1000 phase 2 return values j static void Main string args const string Location localhost system double NetworkVariableBufferedWriter lt double gt bufferedWrite new NetworkVariableBufferedWriter double Location bufferedWrite Connect int phase 0 while true double value GenerateDoubleArray phase Console WriteLine Writing array National Instruments Corporation 5 25 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio bufferedWrite WriteValue value Thread Sleep 500 phase 9 Select Debug Start Without Debugging to run the application ex C WINDOWS system32 cmd exe lof x Writing array Writing array Writing array Writing array Writing array Writing array Writing array Writing array Writing array Writing array Writing array Writing array Writing array Writing array Writing array Writing array Mriting array Writing array Writing array Writing array Writing array Writing array 10 Minimize the c
50. 2 applications with the Instrument I O Assistant in Visual Studio NET 2003 only For more information about GPIB visit ni com gpib NI DAQmx Use the Measurement Studio NI DAQmx Visual C class library to communicate with and control an NI data acquisition DAQ device This class library is included when you install the NI DAQmx driver iyi Note Some DAQ devices are not currently supported by the NI DAQmx driver Refer to the NI DAQ Readme for a complete listing of supported hardware Measurement Studio User Manual 3 16 ni com Chapter 3 Measurement Studio Visual C Class Libraries Use the NI DAQmx class library to perform the following types of tasks Analog signal measurement e Analog signal generation e Digital I O e Counting and timing e Pulse generation e Signal switching a Tip For information about easily creating an NI DAQmx application using the DAQ Assistant refer to the Creating a Measurement Studio NI DAQmx Application section of Chapter 4 Measurement Studio Integrated Tools and Features or the Walkthrough Creating a Measurement Studio NI DAQmx Application section of Chapter 5 Getting Started with Measurement Studio For more information about DAQ visit ni com dag NI Reports Use the Measurement Studio NI Reports Visual C class library to generate printed reports from Measurement Studio Visual C applications This class library is included only in the Measurement Studio Enterprise package
51. 250 numBytes 1000 byte s al r I M To end of data 200 250 Figure 4 5 Instrument I O Assistant The Instrument I O Assistant aids you in performing the following operations e Creating an instrumentation task class Configuring an instrumentation task class to communicate with an instrument and parse data you receive from the instrument G Tip For more information about using the Instrument I O Assistant to create a Measurement Studio instrument control application refer to the Creating a Measurement Studio Instrument Control Application section of the NI Measurement Studio Help Selecting a Measurement Studio Parameter Value To access I O devices or resources you must specify string constants or scalar values for many method parameters and property values Use the Measurement Studio Parameter Assistant on the Measurement Studio Measurement Studio User Manual 4 10 ni com Chapter 4 Measurement Studio Integrated Tools and Features menu to discover and insert into your code valid parameter values for methods and various Measurement Studio class libraries such as NI DAQmx NI 488 2 and NI VISA 3 Note The Parameter Assistant is available in prior versions of Visual Studio only if you have at least one Measurement Studio class library installed that supports the Parameter Assistant With the Parameter Assistant you can select the correct parameter value for a device or resource
52. A e ne des 3 20 Additional Operations sisses irises iaeiaiai 3 21 Knob Gohntrol ibt ads Sia cates acts thes eiie ite ein 3 21 Numenic Edit Controls 2 s nu RE oS eased eae Re Sees 3 22 Slide Control j5 22222 23 5 5 o te anon te e CR OR RERO TRO Pe Rien 3 23 Disia bbauts 3 23 Chapter 4 Measurement Studio Integrated Tools and Features Measurement Studio Menu es eecssssessecensessssnccseeseesceeeessersevensesscessesssessesecosnseneraes 4 1 Creating a Measurement Studio Project esssesssseeeeeerennenre nene 4 4 Adding or Removing Measurement Studio NET Class Libraries sss 4 5 Creating a Measurement Studio NI DAQmx Application eee 4 6 Creating an NI DAQmx User Interface sese 4 8 Creating NI DAQmx User Code in Visual C sess 4 9 Creating an Instrument Control Application sese 4 9 Selecting a Measurement Studio Parameter Value ee 4 10 Using the Instrument Driver Wizard esee enne reeenn 4 11 Chapter 5 Getting Started with Measurement Studio Measurement Studio Walkthroughs eese 5 1 Walkthrough Creating a Measurement Studio Application with Windows Forms Controls and Analysis esee 5 2 Walkthrough Creating a Measurement Studio Application with Web Forms Controls and Analysis seen 5 11
53. AQ Error MessageBoxButtons daqTaskComponenti StopTask F L Y v lt gt National Instruments Corporation 5 51 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio 3 Press F5 to run the application 4 After you have started the application click the Read button to begin acquiring data from your DAQ device What s next To learn more about tasks channels and other NI DAQmx concepts refer to the NI DAQmx Help located at Start AIl Programs National Instruments NI DAQ NI DAQmx Help For more information about creating and using tasks in Measurement Studio refer to Using the Measurement Studio NI DAQmx NET Library You can also look at examples that ship with NI DAQmx Refer to Measurement Studio NI DAQmx NET Examples for the locations of these examples Walkthrough Creating a Measurement Studio Instrument 1 0 Application hy Note To complete this walkthrough you must have either the Measurement Studio Professional or Measurement Studio Enterprise package installed This walkthrough requires the Instrument I O Assistant which is not included in the Measurement Studio Standard package Measurement Studio User Manual 5 52 ni com Chapter 5 Getting Started with Measurement Studio The National Instruments Instrument I O Assistant organizes instrument communication for a serial Ethernet or GPIB instrument into ordered steps This walkthrough is designed to help you
54. AQmx In Traditional NI DAQ you configure virtual channels in MAX In NI DAQmx you can configure virtual channels in either MAX or in a program and you can configure channels as part of a task or separately 3 Switch a switch channel represents any connection point on a switch It may be made up of one or more signal wires commonly one two or four depending on the switch topology A virtual channel cannot be created with a switch channel Switch channels may be used only in the NI DAQmx Switch functions and VIs To append new data points to the end of an existing plot over time In Web Forms page calls back to the server without fully posting back Callbacks are asynchronous and are accomplished with XML HTTP Client callbacks do not include postback data and they do not force the page to refresh Client callbacks do require a browser that supports the XML HTTP protocol LabWindows CVI feature that creates code based on a uir file to connect your GUI to the rest of your program This code can be compiled and run as soon as it is created Measurement Studio User Manual G 2 ni com coercion COM complex graph context sensitive help control counter timer I O cursor cursor label DAQ DAQ Assistant DAQ device National Instruments Corporation G 3 Glossary Automatic conversion that Measurement Studio controls perform to change the numeric representation of a data element Component Object Model
55. C Documents and Settings Administrator My Documents Visual Studio 2005 Projects v Browse Solution Name MyDAOmxProject Create directory For solution Cancel Measurement Studio User Manual 5 44 ni com Chapter 5 Getting Started with Measurement Studio 5 Inthe Add DAQ Component dialog box you can choose to create a new project task create a new MAX task create a reference toa MAX task copy a MAX task to a project task or copy an existing mxb For this walkthrough select Create a new project task and click Finish Add DAQ Component Add DAQ Component NATIONAL Add a DAQ component to your project INSTRUMENTS Create a new project task Create a new task that will be added to your project Create a new MAX task Create a new global task that will be stored by Measurement and Automation Explorer MAS Create a reference to a MAX task Es Read1DBool E m l v Select the name of a global task that is stored in Measurement and Automation Explorer MA2 to reference from your project Copy a MAX task to a project task fax Read DBool bc Select the name of a global task that is stored in Measurement and Automation Explorer MAX to copy to your project Copy an existing mxb m Specify the path to an existing mb file to copy into your project The Measurement Studio DAQ Application Wizard automatically sets up your data acquisition project and launches the DAQ Assistant
56. Device Drivers DVD You can find NI IMAQdXx under Vision Acquisition Software NI SCOPE The NET class libraries for NI SCOPE include NET APIs for NI SCOPE NI TCIK and NI ModInst instrument drivers These class libraries provide a NET interface to the underlying driver API You can use the NET class libraries to create and configure NI SCOPE components programmatically and at design time Measurement Studio User Manual 2 18 ni com Chapter 2 Measurement Studio NET Class Libraries Tip For further information on NI SCOPE NET driver support and to download the NI SCOPE NET class libraries refer to NI SCOPE NET Driver Support on NI Developer Zone zone ni com devzone cda tut p id 5652 NI VISA The Measurement Studio NI VISA NET class library is in the NationalInstruments VisaNS namespace This class library is included when you install the NI VISA driver The NI VISA driver is available at ni com downloads The NI VISA class library includes a set of classes that provides a rich object oriented interface to the NI VISA driver Use this library to quickly create bus independent or bus specific instrument control applications The NI VISA class library supports formatted I O operations locking event handling and interface specific extensions With this class library you can access the functionality available in NI VISA for communicating with message based and register based instruments using the following interf
57. MENTS PRODUCTS ARE NOT DESIGNED WITH COMPONENTS AND TESTING FOR A LEVEL OF RELIABILITY SUITABLE FOR USE IN OR IN CONNECTION WITH SURGICAL IMPLANTS OR AS CRITICAL COMPONENTS IN ANY LIFE SUPPORT SYSTEMS WHOSE FAILURE TO PERFORM CAN REASONABLY BE EXPECTED TO CAUSE SIGNIFICANT INJURY TO A HUMAN 2 IN ANY APPLICATION INCLUDING THE ABOVE RELIABILITY OF OPERATION OF THE SOFTWARE PRODUCTS CAN BE IMPAIRED BY ADVERSE FACTORS INCLUDING BUT NOT LIMITED TO FLUCTUATIONS IN ELECTRICAL POWER SUPPLY COMPUTER HARDWARE MALFUNCTIONS COMPUTER OPERATING SYSTEM SOFTWARE FITNESS FITNESS OF COMPILERS AND DEVELOPMENT SOFTWARE USED TO DEVELOP AN APPLICATION INSTALLATION ERRORS SOFTWARE AND HARDWARE COMPATIBILITY PROBLEMS MALFUNCTIONS OR FAILURES OF ELECTRONIC MONITORING OR CONTROL DEVICES TRANSIENT FAILURES OF ELECTRONIC SYSTEMS HARDWARE AND OR SOFTWARE UNANTICIPATED USES OR MISUSES OR ERRORS ON THE PART OF THE USER OR APPLICATIONS DESIGNER ADVERSE FACTORS SUCH AS THESE ARE HEREAFTER COLLECTIVELY TERMED SYSTEM FAILURES ANY APPLICATION WHERE A SYSTEM FAILURE WOULD CREATE A RISK OF HARM TO PROPERTY OR PERSONS INCLUDING THE RISK OF BODILY INJURY AND DEATH SHOULD NOT BE RELIANT SOLELY UPON ONE FORM OF ELECTRONIC SYSTEM DUE TO THE RISK OF SYSTEM FAILURE TO AVOID DAMAGE INJURY OR DEATH THE USER OR APPLICATION DESIGNER MUST TAKE REASONABLY PRUDENT STEPS TO PROTECT AGAINST SYSTEM FAILURES INCLUDING BUT NOT LIMITED TO BACK UP OR SHUT DOWN MECHANISMS BECAUSE EACH
58. Measurement Studio User Manual November 2009 7 NATIONAL 373392D 01 INSTRUMENTS Worldwide Technical Support and Product Information ni com National Instruments Corporate Headquarters 11500 North Mopac Expressway Austin Texas 78759 3504 USA Tel 512 683 0100 Worldwide Offices Australia 1800 300 800 Austria 43 662 457990 0 Belgium 32 0 2 757 0020 Brazil 55 11 3262 3599 Canada 800 433 3488 China 86 21 5050 9800 Czech Republic 420 224 235 774 Denmark 45 45 76 26 00 Finland 358 0 9 725 72511 France 01 57 66 24 24 Germany 49 89 7413130 India 91 80 41190000 Israel 972 3 6393737 Italy 39 02 41309277 Japan 0120 527196 Korea 82 02 3451 3400 Lebanon 961 0 1 33 28 28 Malaysia 1800 887710 Mexico 01 800 010 0793 Netherlands 31 0 348 433 466 New Zealand 0800 553 322 Norway 47 0 66 90 76 60 Poland 48 22 328 90 10 Portugal 351 210 311 210 Russia 7 495 783 6851 Singapore 1800 226 5886 Slovenia 386 3 425 42 00 South Africa 27 0 11 805 8197 Spain 34 91 640 0085 Sweden 46 0 8 587 895 00 Switzerland 41 56 2005151 Taiwan 886 02 2377 2222 Thailand 662 278 6777 Turkey 90 212 279 3031 United Kingdom 44 0 1635 523545 For further support information refer to the Technical Support and Professional Services appendix To comment on National Instruments documentation refer to the National Instruments Web site at ni com info and enter the info code feedback 2004 2009 National Instruments Corporation All
59. NET class library 2 18 NI IMAQdx NET class library 2 18 NI Reports Visual C class library 3 17 NI SCOPE NET class library 2 18 NI VISA NET class library 2 19 Visual C class library 3 17 numeric controls 2 30 2 46 numeric edit NET control 2 32 2 49 Visual C control 3 22 0 overview Measurement Studio 1 1 NET class libraries 2 1 Visual C class libraries 3 1 National Instruments Corporation l 3 Index P Parameter Assistant 4 10 programming examples NI resources A 1 project conversion wizard 4 2 project templates 4 4 property editor control 2 34 R requirements distribution 1 4 installation 1 2 S scatter graph control 2 23 2 39 selecting a Measurement Studio parameter value 4 10 slide control NET 2 32 2 48 Visual C 3 23 software NI resources A 1 support technical A 1 switch array control 2 36 switch control 2 33 2 50 T tank control 2 32 2 48 Technical Data Management Streaming NET class library 2 20 technical support A 1 thermometer control 2 32 2 48 training and certification NI resources A 1 troubleshooting NI resources A 1 U User Interface NET class library 2 21 2 39 AutoRefresh 2 50 complex graph 2 28 2 44 Measurement Studio User Manual Index digital waveform graph 2 26 2 42 gauge 2 30 2 46 knob 2 30 2 46 LED 2 33 2 50 legend 2 30 2 46 meter 2 30 2 46 numeric edit 2 32 2 49
60. Network Variable Communication Library Click Finish Measurement Studio Add Remove Class Libraries Wizard Measurement Studio Class Libraries NATIONAL Select the class libraries you want to include in the project INSTRUMENTS C Enterprise Analysis Library C DataSocket Communication Library NetworkV ariable Communication Library C Windows Forms User Interface Control Library 8 InProgram cs addthe following code to write an array of data to the server Note You should choose the appropriate code depending on whether you created a VB or C project System System Collections Generic System Text System Threading NationalInstruments NetworkVariable Modulel Private Function GenerateDoubleArray ByVal phase As Double As Double Measurement Studio User Manual Dim values 999 As Double Dim x As Integer For x 0 To 999 values x Math Sin 2 Math PI x 1000 phase 2 Next x 5 24 ni com Chapter 5 Getting Started with Measurement Studio Return values End Function Sub Main Const location As String localhost system double Dim bufferedWriter As NetworkVariableBufferedWriter Of Double New NetworkVariableBufferedWriter Of Double location bufferedWriter Connect Dim phase As Integer 0 While True Dim values As Double GenerateDoubleArray phase Console WriteLine Writing Array bufferedWriter WriteValue values Thread Sleep 500 phase phase
61. Packages Continued Analysis NET Library Professional Package Enterprise Package F Distribution v Histogram v v Inverse Chi Square Distribution v Inverse F Distribution Inverse Normal Distribution Inverse T Distribution Mean Median and Mode lt S Moment about Mean Normal Distribution Polynomial Interpolation Root Mean_Square RMS Spline Interpolant Spline Interpolation Standard Deviation T Distribution Variance SINISIN SIISII SINISI SINISI Special Functions Airy Bessel 1st Bessel 2nd Beta Complimentary Gamma Cosine Integral Dawson s Integral Bae SG See RI SEISIS Measurement Studio User Manual ni com Chapter 2 Measurement Studio NET Class Libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis NET Library Professional Package Enterprise Package Dilogarithm v Elliptic 1st Elliptic 2nd Exponential Integral Factorial Fresnel Integrals Gamma Gauss Hypergeometric Hyperbolic Cosine Integral Hyperbolic Sine Integral Incomplete Beta Incomplete Elliptic 1st Incomplete Elliptic 2nd Incomplete Gamma Jacobian Elliptic Function Kelvin Ist Kelvin 2nd Kummer Logarithm of Facto
62. Qmx NI VISA NI 488 2 NI SCOPE NI IMAQ NI IMAQdx and the MAX Measurement amp Automation Explorer configuration utility you must install the underlying device drivers in addition to the NET or Visual C class libraries You can run the underlying device driver installers from the NI Device Drivers DVD included with Measurement Studio Alternatively refer to NI Drivers and Updates on ni com and enter Device Drivers into the search field to download the latest version of the NI Device Drivers Note The DAQ Assistant and the Instrument I O Assistant are installed from the NI Device Drivers DVD You must install the NI Device Drivers DVD to use the assistants Note NI SCOPE NI IMAQ MAX and NI IMAQdx do not include Visual C libraries Note To download NI SCOPE NET class libraries refer to NI SCOPE NET Driver Support on ni com eom g Note Currently 64 bit support for NI device drivers is available only in the NET class libraries for the following drivers NI DAQmx 8 9 5 and later NI VISA 4 5 1 and later NI 488 2 2 7 1 and later and MAX 4 6 and later 64 bit class libaries are included only with support for Visual Studio 2008 National Instruments Corporation 1 3 Measurement Studio User Manual Chapter 1 Introduction to Measurement Studio Deployment Requirements To deploy an application built with Measurement Studio NET class libraries the target computer must have a Windows 7 Vista XP 2000 operating system
63. Studio dramatically reduces application development time through object oriented measurement hardware interfaces advanced analysis libraries scientific user interface controls for Windows and Web applications measurement data networking libraries wizards interactive code designers and highly extensible NET and Visual C classes You can use Measurement Studio to develop a complete measurement and automation application that includes data acquisition analysis and presentation functionalities Measurement Studio 2009 Professional and Enterprise packages include two Visual Studio support installation discs one DVD with support for Visual Studio NET 2003 Visual Studio 2005 and Visual Studio 2008 and one CD with support for Visual Studio 6 0 The Measurement Studio 2009 Standard package includes one CD with support for Visual Studio NET 2003 Visual Studio 2005 and Visual Studio 2008 Visual Studio NET 2003 Visual Studio 2005 and Visual Studio 2008 support includes NET class libraries and controls for use with NET languages and MFC class libraries and ActiveX controls for use with Visual C Visual Studio 6 0 support includes ActiveX controls for use in Visual Basic 6 0 and MFC class libraries and ActiveX controls for use in Visual C 6 0 This manual documents Measurement Studio for Visual Studio 2005 and Visual Studio 2008 For help with Visual Studio NET 2003 and Visual Studio 6 0 support refer to the following sections
64. Studio group on the Toolbox Standard Data Validation Zz a s amp o z S 2 E El Eri EH Login WebParts HTML Crystal Reports Measurement Studio lk Pointer WE WaveformGraph m ScatterGraph DigitalWaveformGraph T complexGraph EJ Legend e Gauge i Knob SU Meter slide a Tank i Thermometer 00 NumericEdit AutoRefresh t amp NetworkVariableDataSource Select the WaveformGraph control and drag and drop it into the top table cell On the waveform graph smart tag type graph for the name of the waveform graph ID Tip To access the smart tag left click on a control to select it and then left click on the arrow button in the upper right corner of the control Measurement Studio User Manual 5 16 ni com Chapter 5 Getting Started with Measurement Studio 13 Select the Legend control and drag and drop it into the bottom left table cell 14 Select the NumericEdit control and drag and drop it into the bottom center table cell 15 On the numeric edit smart tag type numericedit for the name of the numeric edit ID 16 Select the Gauge control and drag and drop it into the top table cell to the right of the waveform graph Resize controls and table cells as necessary 17 On the gauge smart tag type gauge for the name of the gauge ID iij KI Gauge Tasks 4 6 r 3 Appearance L2 8 Dial Color White v Gauge Style SunkenWithThickNeedle
65. User Manual Chapter 5 Getting Started with Measurement Studio Measurement Studio Visual CZ Windows Application Wizard Measurement Studio Class Libraries NATIONAL Select the class libraries you want to include in the project INSTRUMENTS Enterprise Analysis Library C DataSocket Communication Library C NetworkVariable Communication Library Windows Forms User Interface Control Library Q Tip If you are working with an existing project you can access the Add Remove Class Libraries dialog box by selecting Measurement Studio View NET Class Library Wizard 7 Click Finish to display Form1 in the Windows Forms Designer Adding user interface controls to the project 1 Select View Toolbox to display the Toolbox The Toolbox contains components and controls that you can add to your project 2 Expand the All Windows Forms group The All Windows Forms group contains controls and components included in the System WindowsForms namespace Select the Button control and drag and drop it onto the form 4 Right click the button and select Properties to display the Properties window You configure the properties of the control in the Properties window 5 The Text property will be highlighted Type Start for the button text Measurement Studio User Manual 5 4 ni com Chapter 5 Getting Started with Measurement Studio 6 Expand the Measurement Studio group in the Toolbox Menus amp Toolbars i Data Component
66. Web application amp Measurement Studio Digital Waveform Graph Web Forms DER Fie Edit View Favorites Tools Help ay gt ix a A Search Sf Favorites L2 10 15 20 Figure 2 14 Digital Waveform Graph Web Forms Control With the digital waveform graph control and the classes that interface with the control you can perform the following operations Measurement Studio User Manual 2 42 ni com Chapter 2 Measurement Studio NET Class Libraries Plot Operations e Plot digital waveform data including digital signal state data and timing information e Configure plot labels on the y axis e Configure plot templates to customize plots that are implicitly created from plotted data e Specify anti aliased digital plots e Expand and collapse signal plots interactively as well as programmatically Waveform Sample and Signal State Operations e Simultaneously display waveforms and signals or display signals only e Create custom waveform sample and signal state styles e Configure the appearance of sample and state labels e Create custom waveform sample and signal state labels Axis Operations e Configure the axis modes to fixed exact autoscaling or loose autoscaling e nteractively change the range of an axis and invert the axis at run time by clicking on the axis end labels e Display captions on the axis and grid lines e Position t
67. Windows Forms Digital Waveform Graph NET Control section in the NI Measurement Studio Help National Instruments Corporation 2 27 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Complex Graph Control Measurement Studio User Manual Use the Measurement Studio complex graph control as shown in Figure 2 3 to display ComplexDoub1e data on a Windows Forms user interface A ComplexDouble consists of a real part and an imaginary part You can use a waveform graph to plot complex waveform data E Complex Graph control Figure 2 3 Complex Graph Windows Forms Control With the complex graph control and the classes that interface with the control you can perform the following operations Plot Operations e Plot and chart ComplexDouble data e Configure a graph to contain multiple plots to show separate but related data on the same graph You can configure a graph to automatically generate different colors for different plots e Draw lines or fills from a plot to an X value Y value or another plot e Use the extensible plot and plot area drawing capabilities and events to customize the graph appearance e Configure the plot to display arrows The arrows indicate the direction of the complex data e Create custom point and line styles for plots e Specify anti aliased plots for plot lines e Calculate and display error bands e Display tooltips 2 28 ni com Chapter 2 Measurement S
68. aSource smart tag select Edit Bindings to launch the Network VariableBinding Collection Editor dialog box Network ariableDataSource NetworkVariableDataSource1 Network ariableDataSource Tasks TF ID etworky ariableDataSource1 Connection cache expiration 00 20 00 v Connection timeout 00 00 10 v Edit Bindings Measurement Studio User Manual 5 38 ni com Chapter 5 Getting Started with Measurement Studio Select Add You add a binding to create a connection with the underlying network variable and you use the Network VariableBinding Collection Editor to configure the binding properties Select Object for the BindingType You select Object because this walkthrough binds to NationalInstruments UI WebForms WaveformGraph BindingData Enter 0 as the DefaultReadValue NetworkVariableBinding Collection Editor Members Bindingi properties Ci 3 El Behavior BindingMode Read BindingType Object ConnectionTimeout 00 00 10 DefaultReadValue 0 Location localhost System double Name Binding1 WriteTimeout 00 00 10 National Instruments Corporation Browse to the localhost System doubl1le location in the Select Network Item dialog box Select Network Item Location localhost S ystem double E d localhost a System PM Em 5 amp J Network Neighborhood 5 39 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio Select Network Item Loca
69. about using the Windows Forms numeric edit control refer to the NumericEdit Class section in the NI Measurement Studio Help Switch and LED Controls Use the Measurement Studio switch and LED controls as Boolean controls on a Windows Forms user interface You typically use a switch control as shown in Figure 2 7 to receive and control Boolean input on an application user interface Figure 2 7 Switch Windows Forms Control in Vertical Toggle 3D Style You typically use an LED control as shown in Figure 2 8 to indicate a Boolean value on an application user interface Figure 2 8 LED Windows Forms Control in Square 3D style National Instruments Corporation 2 33 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries With the switch and LED controls and the classes that interface with the controls you can perform the following operations Receive notification before or after the state of the control changes Configure how the control behaves when you click it with the mouse or press the spacebar when the control has focus Configure the appearance of the control Make the control background transparent Configure the LED control to blink while it is on or off and configure the rate at which the LED control blinks 0 Tip For more information about using the switch and LED controls refer to the Using the Measurement Studio Windows Forms Switch and LED NET Controls section in the NI Measure
70. aces e GPIB EEE 1394 e PXI e Serial RS 232 and RS 485 e TCP IP e USB e VXI Tip For information about creating a Measurement Studio NI VISA application using the Instrument I O Assistant refer to the Creating an Instrument Control Application section in Chapter 4 the Measurement Studio Integrated Tools and Features and Walkthrough Creating a Measurement Studio Instrument I O Application of Chapter 5 Getting Started with Measurement Studio For more information about NI VISA visit ni com visa NET Support Included with Other Products The following National Instruments product includes support for NET class libraries however the NI Vision Development Module 2009 is not included with Measurement Studio 2009 You must purchase NI Vision Development Module 2009 or later to use the NET assemblies Refer to ni com vision for more information a National Instruments Corporation 2 19 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries NI Vision Development Module The NI Vision Development Module NET assemblies contain all of the classes necessary to analyze process and display images NI Vision Development Module 2009 and later includes support for NET class libraries Technical Data Management Streaming TDMS Technical Data Management Streaming TDMS is a file format based on the National Instruments TDM data model used to stream data to disk You can use the TDMS NET
71. acter 4 Click Auto parse to parse the instrument s response The Auto parse button automatically parses binary block data and ASCII text Refer to the Parsing an Instrument Response topic in the Instrument 1 0 Assistant Help for information about how the Assistant parses different data formats National Instruments Corporation 5 55 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio 5 Ifthere are more than two tokens in the token list remove them for this example To remove a token right click on it in the response window and select Remove The response window displays data in binary form ASCII form or binary form and ASCII form together If there is only one token in the token list split the token into two tokens for this example Refer to Parsing an Instrument Response in the Instrument I O Assistant Help for more information about how to manually parse the data into two tokens Byte index Binary representation 00000000000 00000000016 ASCII representation ents GPIB and 53 00000000032 72 65 63 6 2 8 41 4 65 1 6 65 amp 3 6 amp 5 2 8 53 60 65 15 ER Sater e Simu 00000000048 lator Rev B 18 6 Inthe Token name text box enter Vendor to rename the first token You use this name to reference the token in your application Ensure that the data type of the token is String You specify the data type of the token using the Type drop down list o
72. alue of the other control Customize the appearance of the control using 3D lab styles or classic 2D styles and change the color and length of ticks and labels Configure the format of value labels to engineering or date time Specify the image format of the control as BMP GIF JPEG or PNG Interactively change the range of an axis and invert the axis at run time by clicking on the axis end labels Display tooltips reflecting the current value of the pointer Interactively change the value of the control by clicking the pointer with the mouse Programmatically move the pointer to previous or next value Use the Measurement Studio knob gauge and meter controls as shown in Figure 2 16 to input and display numeric data on your user interface 2 Measurement Studio Knob Gauge and Meter Controls Microsoft Internet Explorer DAR Fie Edit View Favorites Tools Help Q sax amp x a A ra Search Sf Favorites e3 X National Instruments Corporation P 8 6 4 6 s z 8 0 10 10 M Figure 2 16 Knob Gauge and Meter Web Forms Controls 2 47 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries With the knob gauge and meter controls and the classes that interface with the controls you can perform the following operations e Specify the start and sweep angle of the arc programmatically or from the Properties window e Use automatic division spacing custo
73. and either the NET Framework version 2 0 for Visual Studio 2005 or the NET Framework version 3 5 for Visual Studio 2008 To deploy an application built with Measurement Studio Visual C class libraries the target computer must have a Windows 7 Vista XP 2000 operating system Deploying 64 hit Applications To facilitate use in Visual Studio Setup projects all Measurement Studio class libraries that support 64 bit include both 32 bit and 64 bit deployment merge modules This is true regardless of whether the class library includes platform specific i e x86 or x64 or platform agnostic i e Any CPU assemblies Refer to Deploying Windows Applications section in the NI Measurement Studio Help for more information on using 64 bit merge modules Installation Instructions Complete the following steps to install Measurement Studio These steps describe a typical installation Please carefully review all additional licensing and warning dialog boxes National Instruments recommends that you exit all programs before running the Measurement Studio installer Applications that run in the background such as virus scanning utilities might cause the installer to take longer than average to complete RE Note There are separate installers for Measurement Studio support for Visual Studio 2005 and Measurement Studio support for Visual Studio 2008 Repeat the installation instructions to install support for both When installing support for more than
74. at you can copy and paste into an application and use immediately The functionality included in the Analysis library varies based on the Measurement Studio edition you purchase Refer to the following sections for information about the Standard Professional and Enterprise Analysis class libraries The Standard Analysis class library which ships with Measurement Studio Standard Edition includes the sawtooth sine square triangle and basic function wave generators Professional Analysis The Professional Analysis class library which ships with Measurement Studio Professional Edition includes the Standard Analysis functionality as well as the following functionality e Bessel Chebyshev Inverse Chebyshev Windowed Kaiser and Elliptic Low High Bandpass and Bandstop filters e Signal processing functions such as convolution deconvolution correlation decimation integration and differentiation FFT Inverse FFT Real FFT Fast Hartley Inverse Fast Hartley Fast Hilbert Inverse Fast Hilbert DST Inverse DST DCT and Inverse DCT transformations National Instruments Corporation 2 3 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Enterprise Analysis Linear algebra functions such as determinant check positive definiteness calculate dot product and other various matrix functions Scaled and unscaled windowing classes Common statistical functions such as mean median mode an
75. ata items on other computers and servers 3 Note The Measurement Studio DataSocket NET class libraries do not include 64 bit support Tip For more detailed information about the DataSocket class library refer to the Using the Measurement Studio DataSocket NET Library section in the NI Measurement Studio Help NI 488 2 The Measurement Studio NI 488 2 NET class library is in the NationalInstruments NI4882 namespace This class library is included when you install the NI 488 2 driver The NI 488 2 driver is available at ni com downloads The NI 488 2 class library includes a set of classes for communicating with GPIB instruments controlling GPIB devices and acquiring GPIB status information Use this library to design code that communicates with and controls instruments on a GPIB interface Use the NI 488 2 class library to configure and communicate with GPIB devices using the Device and Board classes Tip For more information about the NI 488 2 class library refer to the Using the Measurement Studio NI 488 2 NET Library topic in the NI Measurement Studio Help For more information about GPIB visit ni com gpib NI DAQmx The Measurement Studio NI DAQmx NET class library is in the NationalInstruments DAQmx namespace This class library is included when you install the NI DAQmx driver The NI DAQmx driver is available at ni com downloads Use the NI DAQmx class library to communicate with and control NI data acquisition
76. ay the Properties window 9 Setthe Range property for the gauge with the drop down Range type editor Type 0 2 for the minimum value and type 0 2 for the maximum value 10 Click the numeric edit smart tag to display the Numeric Edit Tasks 11 Select Gauge in the Source drop down list Setting the Source property to the gauge allows two way binding between the controls 12 Deselect ArrowKeys Buttons and Text for the InteractionMode property of the numeric edit control Deselecting these interaction modes makes the numeric edit an indicator The numeric edit control only displays the calculated mean 13 Select the Format Mode property and in the Numeric Edit Format Mode Editor dialog box change the Precision to 4 to show four decimal places of precision 14 Select File Save Form1 cs to save your application Measurement Studio User Manual 5 10 ni com Chapter 5 Getting Started with Measurement Studio 15 Select Debug Start Without Debugging to run the application 16 After your program builds click Start Notice the graph shows the data plot and the gauge and the numeric edit display the mean of the data Form1 Walkthrough Creating a Measurement Studio Application with Web Forms Controls and Analysis 3 Note To complete this walkthrough you must have either the Measurement Studio Professional or Measurement Studio Enterprise package installed for Visual Studio 2005 or later This walkthrough will not
77. cale Arc Instrument Control Strip Control Seg Scale Arc 240 300 Drag the sweep or start angle lines to change the arc 270 Start angle 240 0 Sweep angle 300 0 a w w Invert Cancel Figure 2 12 InstrumentControlStrip Control Q Tip For more information about the InstrumentControlStrip control refer to Using the Measurement Studio Windows Forms Instrument Control Strip NET Control topic in the NI Measurement Studio Help Measurement Studio User Manual 2 38 ni com Chapter 2 Measurement Studio NET Class Libraries ASP NET Web Forms Controls The Measurement Studio ASP NET user interface controls are in the Web Forms NET class library The Web Forms NET class library is in the NationalInstruments UI WebForms namespace The Web Forms class library encapsulates the following Measurement Studio user interface controls e Waveform graph e Scatter graph e Digital waveform graph e Complex graph Legend e Knob e Gauge e Meter e Slide Thermometer e Tank e Numeric edit e Switch LED e AutoRefresh hy Note All Measurement Studio ASP NET Web Forms controls for Visual Studio 2008 are designed to work with ASP NET AJAX controls The Measurement Studio ASP NET Web Forms controls for Visual Studio 2005 are not designed to work with Microsoft ASP NET AJAX controls Use this class library to add measurement specific user interfa
78. ce controls to your Web application You can configure the controls programmatically at design time or through the Properties window in the Web Forms Designer The following sections describe each of the Measurement Studio Web Forms user interface controls Waveform Graph and Scatter Graph Controls Use the Measurement Studio waveform graph and scatter graph controls as shown in Figure 2 13 to display two dimensional data on a Web based user interface Use the waveform graph to display two dimensional linear National Instruments Corporation 2 39 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries data You explicitly specify each value in one dimension and provide an initial value and interval to implicitly specify the values in the other dimension Use the scatter graph to display two dimensional linear or nonlinear data you explicitly specify each value in both dimensions amp Measurement Studio Waveform Graph Scatter Graph and Legend Web Forms Controls DER File Edit view Favorites Tools Help ay ix a A Search Sf Favorites R X Ems Figure 2 13 Waveform Graph and Scatter Graph Web Forms Controls Both Graphs Have Corresponding Legends With the waveform graph and scatter graph controls and the classes that interface with the controls you can perform the following operations Plot Operations e Plot and chart arrays of double precision floating point values analog
79. cket source or target You use binding to read property values from a source and write property values to a target Tip For more information about easily using the button control refer to the Using the 7 Measurement Studio Button Visual C Control section in the NI Measurement Studio Help National Instruments Corporation 3 19 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Graph Control Measurement Studio User Manual Use the Measurement Studio ActiveX graph control as shown in Figure 3 3 to plot and chart two dimensional data The CNiGraph class provides the Visual C interface to the ActiveX graph control 10 8 Figure 3 3 ActiveX Graph Control With the graph control and the classes that interface with the control you can perform the following operations Plot Operations Plot and chart data Configure a graph to contain multiple plots to show separate but related data on the same graph Configure a graph to include multiple Y axes so that plot data fits the graph plot area Use cursors and annotations to identify key points in plots and the plot area Axis Operations Use the CNiAxis class to interface to a single axis of a graph control This feature allows you to modify the appearance and behavior of the axis Automatically label axes with log or inverted numeric scales Configure the axis modes for manual scaling or autoscaling 3 20 ni c
80. contained in it EXCEPT AS SPECIFIED HEREIN NATIONAL INSTRUMENTS MAKES NO WARRANTIES EXPRESS OR IMPLIED AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE CUSTOMER S RIGHT TO RECOVER DAMAGES CAUSED BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOMER NATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA PROFITS USE OF PRODUCTS OR INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF ADVISED OF THE POSSIBILITY THEREOF This limitation of the liability of National Instruments will apply regardless of the form of action whether in contract or tort including negligence Any action against National Instruments must be brought within one year after the cause of action accrues National Instruments shall not be liable for any delay in performance due to causes beyond its reasonable control The warranty provided herein does not cover damages defects malfunctions or service failures caused by owner s failure to follow the National Instruments installation operation or maintenance instructions owner s modification of the product owner s abuse misuse or negligent acts and power failure or surges fire flood accident actions of third parties or other events outside reasonable control Copyright Under the copyright laws this publication may not be reproduced or transmitted in any form electronic or mechanica
81. ct types E Visual C Windows E Smart Device Windows Application SENI Windows Application Database Class Library g Windows Control Library Starter Kits Console Application crystal Reports Application Measurement Studio ES Device Application ER ASP NET web Application Web 2 ASP NET Web Service Application Other Languages Other Project Types My Templates Templates Visual Studio installed templates amp Search Online Templates 4 project For creating a command line application Mame NetworkVariablewriter Location C Documents and Settings Administrator My Documents Visual Studio 2005 Projects iv Browse Solution Name NetworkVariable Writer Create directory For solution Cancel 3 Inthe Project Types pane select Visual C or Visual Basic depending on which language you want to create the project in 4 Inthe Templates pane select Console Application Specify NetworkVariableWriter for Name and specify a Location of your choice Click OK Select Measurement Studio Add Remove NET Class Libraries The Measurement Studio Add Remove Class Libraries Wizard launches You use this wizard to add Measurement Studio components to your project National Instruments Corporation 5 28 Measurement Studio User Manual Chapter 5 VB NET Imports Imports Imports Imports Imports Module Getting Started with Measurement Studio 7 Select
82. d variance Exponential linear and polynomial curve fitting functions Signal generation functions The Enterprise Analysis class library which ships with Measurement Studio Enterprise Edition includes the Standard and Professional Analysis functionality as well as the following advanced functionality EquiRipple filters Linear algebra functions such as forward and back substitution LU factorization Cholesky factorization Schur deomposition and Hessenberg decomposition Probability and analysis of variance Sinc impulse pulse ramp and chirp patterns General least square curve fit power fit log fit Gauss fit cubic spline fit and interpolation functions Measurement functions such as transition measurements pulse measurements and cycle RMS average functions Special functions Refer to Table 2 1 to determine the type of measurements available in the Professional and Enterprise Analysis NET libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise Packages Analysis NET Library Professional Package Enterprise Package Measurements AC and DC Estimator v Amplitude and Phase v Spectrum Auto Power Spectrum v Cross Power Spectrum v Measurement Studio User Manual 2 4 ni com Chapter 2 Measurement Studio NET Class Libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise Packag
83. d presentation functionality to a Windows Forms application by taking you through the following steps Setting up the project Using the Measurement Studio Application Wizard you will create a new project that references the Measurement Studio Analysis class library and Windows Forms controls Adding user interface controls to the project Using the Toolbox smart tags and the Properties window you will add and configure a button waveform graph legend gauge and numeric edit user interface control Generating plotting and analyzing the data Using NationalInstruments Analysis SignalGeneration White NoiseSignal and NationalInstruments Analysis Math Statistics Mean you will generate data plot the generated data on a waveform graph and calculate the mean of the data Customizing the user interface Using smart tags and the Collection Editor and Auto Format dialog boxes you will display the mean value on the gauge and the numeric edit as well as customize your user interface Before you begin The following components are required to complete this walkthrough e Microsoft Visual Studio 2005 or Visual Studio 2008 e Measurement Studio 8 0 1 or later Professional or Enterprise package for Visual Studio 2005 or Measurement Studio 8 5 or later Professional or Enterprise package for Visual Studio 2008 5 2 ni com Chapter 5 Getting Started with Measurement Studio Setting up the project 1 Select Start All Pr
84. d zoom interactively 0 Tip For information about easily creating graphs with the 3D graph control library refer to the 3D Graph Visual C Class Library Overview topic in the NI Measurement Studio Help Analysis National Instruments Corporation The Analysis class library includes a set of classes that provides various digital signal processing signal filtering signal generation peak detection and other general mathematical functionality Use this library to analyze acquired data or to generate data The functionality included in the Analysis library varies based on the Measurement Studio package you purchased Refer to the following sections for information about the Standard Professional and Enterprise Analysis class libraries 3 3 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Standard Analysis Professional Analysis The Standard Analysis class library which ships with Measurement Studio Standard Edition includes the sawtooth sine square triangle and basic function wave generators The Professional Analysis class library which ships with Measurement Studio Professional Edition includes the Standard Analysis functionality as well as the following functionality Enterprise Analysis The Enterprise Analysis class library which ships with Measurement Studio Enterprise Edition includes the Standard and Professional Analysis functionality as well as the followi
85. dio For more information about NI VISA visit ni com visa User Interface Use the Measurement Studio User Interface Visual C class library to add user interface controls to your application You can configure the user interface controls programmatically or through the property pages in the Visual C resource editor Measurement Studio includes the following Visual C user interface controls Button e Graph e Knob e Numeric edit e Slide The following sections describe each of the Measurement Studio Visual C user interface controls Measurement Studio User Manual 3 18 ni com Chapter 3 Measurement Studio Visual C Class Libraries Button Control Use the Measurement Studio ActiveX button control as shown in Figure 3 2 for different Boolean displays such as on off or true false Typically you use buttons to input or display Boolean information or initiate an action in a program The CNiButton class provides the Visual C interface to the ActiveX button control J Figure 3 2 ActiveX Button Control With the button control and the classes that interface with the control you can perform the following operations e Configure how the control behaves when you click it with the mouse or press the spacebar when the control has focus e Configure how the button control appears using button styles You can configure the button control to appear as a push button LED or switch Bind properties to a DataSo
86. e Class Libraries DAQms Library Max Portable Configuration NI 488 2 Instrumentation Control VisaNS Library C DataSocket Communication Deprecated NetworkVariable Communication Windows Forms User Interface Controls Figure 4 2 Measurement Studio Add Remove Class Libraries Wizard for Visual Studio 2005 Q Tip For more information about using the Add Remove NET Class Libraries wizard to add or remove Measurement Studio NET class libraries refer to the Adding or Removing Measurement Studio NET Class Libraries section in the NI Measurement Studio Help Creating a Measurement Studio NI DAQmx Application To create a Measurement Studio NI DAQmx application use the DAQ Assistant The DAQ Assistant integrates into Visual Studio as a code designer Use the Add New Item wizard to add an NI DAQmx task to your project and use the DAQ Assistant user interface as shown in Figure 4 3 to interactively create and configure the NI DAQmx task The DAQ Assistant automatically generates a Visual Basic NET Visual Cft or Visual C class that includes the functionality you configure in the user interface Measurement Studio User Manual 4 6 ni com Chapter 4 Measurement Studio Integrated Tools and Features B Note The DAQ Assistant is available only if you have installed NI DAQm x and either the Measurement Studio Professional or Measurement Studio Enterprise package Refer to Chapter 5 Getting Started with Measurement Studio the Walkt
87. e Default aspx to save your application 12 Select Debug Start Without Debugging to run the application 13 After your program builds click Start Notice the graph shows the data plot and the gauge and the numeric edit display the mean of the data The following screenshot shows Default aspx in its final form Z Measurement Studio Web Forms Controls and Analysis Walkthrough DEAR File Edit view Favorites Tools Help Q ax amp x a 5 r Search Sf Favorites l 200 260 National Instruments Corporation 5 21 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio Walkthrough Creating a Measurement Studio Application with Windows Forms Controls and Network Variable B Note To complete this walkthrough you must have either the Measurement Studio Professional or Measurement Studio Enterprise package installed for Visual Studio 2005 or later This walkthrough will not work with the Measurement Studio Standard package Measurement Studio User Manual Measurement Studio includes user interface controls such as a waveform graph control and network variable functionality to transfer live measurement data between applications over the network This walkthrough is designed to help you learn how to add network variable functionality to a Windows Forms application by taking you through the following steps Writing an array of data to the server Using NationalInstruments NetworkVariabl
88. e NetworkVariable BufferedWriter lt TValue gt you will create and run a console application that writes an array of values to the server Setting up a Windows Forms project Using the Measurement Studio Application Wizard you will create a new project that references the Measurement Studio Network Variable class library and Windows Forms controls Configuring the network variable data source control Using the Toolbox and the NationalInstruments NetworkVariable WindowsForms NetworkVariableDataSource smart tag you will add and configure a data source control to your application Displaying the array of data on a Windows Forms page Using the Toolbox you will add and configure a NationalInstruments WaveformGraph control to display the data Before you begin The following components are required to complete this walkthrough Microsoft Visual Studio 2005 or Visual Studio 2008 Measurement Studio 8 0 1 or later Professional or Enterprise package for Visual Studio 2005 or Measurement Studio 8 5 or later Professional or Enterprise package for Visual Studio 2008 5 22 ni com Chapter 5 Getting Started with Measurement Studio Writing an array of data to the server 1 Select Start All Programs Microsoft Visual Studio 2005 Microsoft Visual Studio 2005 or Start All Programs Microsoft Visual Studio 2008 Microsoft Visual Studio 2008 2 Select File New Project The New Project dialog box launches New Project Proje
89. e a range in the plot area of the graph Show tooltips configured to display data or other custom text Additional Operations Pan and zoom interactively as well as programatically Copy the graph as a BMP GIF JPEG or PNG image to the clipboard or a file Perform hit testing of mouse cursor coordinates Bind a plot to a data source on the waveform graph 0 Tip For more information about using the waveform and scatter graph controls refer to the Using the Measurement Studio Windows Forms Scatter and Waveform Graph NET Controls section in the NI Measurement Studio Help National Instruments Corporation 2 25 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Digital Waveform Graph Control Measurement Studio User Manual Use the Measurement Studio digital waveform graph control as shown in Figure 2 2 to display DigitalWaveform data on a Windows Forms user interface Digital Waveform Graph Control 0 l Waveform Signal Signal Signal Signal Signal Signal Signal Waveform Signal Figure 2 2 Digital Graph Windows Forms Control With the digital waveform graph control and the classes that interface with the control you can perform the following operations Plot Operations e Plot digital waveform data Data values can represent up to eight different digital states e Configure plot labels on the y axis e Configure plot templates to customize plots that ar
90. e and Read and Parse steps and advanced parsing capabilities The following screenshot shows the IIOA s ability to scale and parse IEEE long definite block data Measurement Studio User Manual 5 58 ni com Technical Support and Professional Services Visit the following sections of the award winning National Instruments Web site at ni com for technical support and professional services National Instruments Corporation Support Technical support at ni com support includes the following resources Self Help Technical Resources For answers and solutions visit ni com support for software drivers and updates a searchable KnowledgeBase product manuals step by step troubleshooting wizards thousands of example programs tutorials application notes instrument drivers and so on Registered users also receive access to the NI Discussion Forums at ni com forums NI Applications Engineers make sure every question submitted online receives an answer Standard Service Program Membership This program entitles members to direct access to NI Applications Engineers via phone and email for one to one technical support as well as exclusive access to on demand training modules via the Services Resource Center NI offers complementary membership for a full year after purchase after which you may renew to continue your benefits For information about other technical support options in your area visit ni com services or contact your
91. e implicitly created from plotted data e Specify anti aliased digital plots e Expand and collapse signal plots interactively or programmatically e Display tooltips 2 26 ni com Chapter 2 Measurement Studio NET Class Libraries Waveform Sample and Signal State Operations Simultaneously display waveforms and signals or display signals only Create custom waveform sample and signal state styles Configure the appearance of sample and state labels Create custom waveform sample and signal state labels Axis Operations Configure the axis modes to fixed exact autoscaling or loose autoscaling Interactively change the range of an axis and invert the axis at run time by clicking on the axis end labels Display captions on the axis Display grid lines Position the axis to display on one or both sides of the graph s plot area Configure major minor and custom divisions Additional Operations Display data in sample or time mode Perform hit testing of mouse cursor coordinates Pan with scroll bars Configure the style and mode of scroll bars Create custom scroll bars Pan and zoom interactively and programmatically Copy the graph as a BMP GIF JPEG or PNG image to the clipboard or a file Create custom mouse cursors programmatically or at design time using the mouse cursor style editor 0 Tip For more information about using the digital waveform graph control refer to the Using the Measurement Studio
92. eaming TDMS sse 2 20 TDM Excel Add in ettet dete 2 20 User Interlace d iet Ra ee Rp tete tee e e teo arcas 2 21 Windows Forms Controls eese eene eene Tssa orao i Tiina 2 22 Waveform Graph and Scatter Graph Controls esses 2 23 Digital Waveform Graph Control sse 2 26 Complex Graph Control oisein oian ieia i 2 28 Legend Control earran e RC eed 2 30 Numeric Controls sssri tete tette eel tete eee RH Ee e ER ed 2 30 Numeric Edit Control ettet ttt teta dt ig diets 2 32 Switch and LED Controls essent nennen enne 2 33 Property Editor Control eee eret eee tentis 2 34 Windows Forms Array Controls eseseseseeeeeeeeeeeeneenee nennen ennemi rennen 2 35 Switch and LED Array Controls esee 2 36 Numeric Edit Array Control sese ene 2 37 InstrumentControlStrip Control esee 2 37 ASP NET Web Forms Controls esee nne emnes 2 39 Waveform Graph and Scatter Graph Controls esses 2 39 Digital Waveform Graph Control eeeseeeeeeeennee 2 42 Complex Graph Control totes ie eire tenes 2 44 Legend Control ihres n eerte tO I RIRR thins HE NR ERE EROR PY NEG 2 46 Numeric Controls 2 nr ae pep e HE e detis 2 46 Numeric Edit Control egre det ted tbe tene 2 49 Switch and LED Controls
93. ed on TCP IP to exchange files between computers A control used to input or display numerical data General Purpose Interface Bus The standard bus used for controlling electronic instruments with a computer Also called IEEE 488 bus because it is defined by ANSI IEEE Standards 488 1978 488 1 1987 and 488 2 1987 A 2D or 3D display of one or more plots HyperText Transfer Protocol Protocol based on TCP IP which is used to download Web pages from an HTTP server to a Web browser National Instruments Corporation G 5 Measurement Studio User Manual Glossary IEEE 488 IMAQ Vision indicator installer instrument driver Instrument I O Assistant interface IVI knob Shortened notation for ANSI IEEE Standards 488 1978 488 1 1987 and 488 2 1987 See also GPIB National Instruments image acquisition and analysis software that you can use to acquire images from National Instruments image acquisition IMAQ boards display them in your program perform interactive viewer operations and analyze the images to extract information A control in read only mode Software program that copies program system and other necessary files to computers Library of functions to control and use one specific physical instrument Also a set of functions that adds specific functionality to an application Assists in writing code to communicate with devices such as serial Ethernet or GPIB instruments The Instrument I O Ass
94. elp Topics NI DAQmx MAX Help for NI DAQmx For the purposes of this walkthrough the NI PCI 6280 device of the M Series DAQ family is recommended To set up the project 1 Open Visual Studio from Start All Programs Microsoft Visual Studio 2005 Microsoft Visual Studio 2005 or Start All Programs Microsoft Visual Studio 2008 Microsoft Visual Studio 2008 2 Select File New Project The New Project dialog box launches National Instruments Corporation 5 48 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio 3 Inthe Project types pane expand the Visual C or Visual Basic node depending on which language you want to create the project in and select Measurement Studio Code generation works in both languages 4 Inthe Templates pane select NIDAQ Windows Application Specify MyDAQmxProject for Name and specify a Location of your choice Click OK The Measurement Studio DAQ Application Wizard launches New Project Project types Templates Visual Cs Visual Studio installed templates Windows Smart Device INI DAQ Windows Application n Windows Application Database RENI VISA Windows Application AON Class Library Starter Kits Bu VISA Class Library Measurement Studio Other Languages My Templates Other Project Types y i search Online Templates 4 project for creating a Measurement Studio Ct DAQmx application Name MyDAQmxProject Location
95. ent Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries e Automatically label axes with log or inverted numeric scales and continuous or discrete values e Customize the knob by using ticks labels and value pairs e Bind properties to a DataSocket source or target You use binding to read property values from a source and write property values to a target Tip For more information about easily using the knob control refer to the Using the Measurement Studio Knob Visual C Control section in the NI Measurement Studio Help Numeric Edit Control Use the Measurement Studio ActiveX numeric edit control as shown in Figure 3 5 to display numeric values and provide a way by which end users can edit numeric values Typically you use a numeric edit control to input or display numerical data instead of using a text box The CNiNumEdit class provides the Visual C interface to the ActiveX numeric edit control j 1e 002 J M Figure 3 5 ActiveX Numeric Edit Control With the numeric edit control and the classes that interface with the control you can perform the following operations e Use built in numeric format styles including scientific symbolic engineering scaling time and date e Perform range checking e Bind properties to a DataSocket source or target You use binding to read property values from a source and write property values to a target Tip For more information about easily
96. ersions of Measurement Studio sess 1 5 Measurement Studio Package Comparison Chart eee 1 5 Learning Measurement Studio eese nennen ene 1 7 Chapter 2 Measurement Studio NET Class Libraries Measurement Studio Support for Visual Studio NET Class Library Overview 2 1 64 bit Support in Measurement Studio NET Assemblies 2 2 Class Labraries eene nere eee eee Dan 2 2 UL e p 2 3 Standard Analysis eerte trito edere it Rhe Rp RE Lip RS 2 3 Professional Analysis oita te dd Se ei e tete e adit 2 3 Enterprise Analysi idiot rt d RR EAD DR EXTRA AFER 2 4 COMMON ses sic dh e ie eter Sues er P te a DE P RR 2 14 Data Transfer ueste pte att D NOSE ERE ED E ERE Eee 2 15 Network Variable in aed e deer st E ever ec 2 15 DataSocket etate oui ape ERR EGER E 2 16 INI A88 2 3 m i Re Ut E ER p E BEER e P Spe 2 17 NEDAQGTIS i rada i EO e E a RT ue P d 2 17 NEIMAQ 5 2 3 n END a ectetur Ain ea ER RE RA d eas eae 2 18 NLEIMAQdX 5 5 enmieuenmcentet ence iniecta teret pride 2 18 NIESCOPE sos ees 2 18 NEVISA uates ate teta aed RT epe epe 2 19 National Instruments Corporation V Measurement Studio User Manual Contents NET Support Included with Other Products sene 2 19 NI Vision Development Module eee 2 20 Technical Data Management Str
97. es Continued Analysis NET Library Professional Package Enterprise Package Cycle RMS Average v Harmonic Analyzer v Harmonic Analyzer Using Signal v Impulse Response Function Network Functions avg Power and Frequency Estimate Pulse Measurements Scaled Time Domain Window Single Tone Information Spectrum Unit Conversion State Levels Transfer Function Transition Measurements ALN NTE NEN SN NEN SN Signal Generation Arbitrary Wave v Chirp Pattern Gaussian White Noise v Impulse Pattern Pulse Pattern Ramp Pattern Sawtooth Wave Sinc Pattern Sine Pattern Sine Wave S Square Wave ALN ONENESS NEN SN National Instruments Corporation 2 5 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis NET Library Professional Package Enterprise Package Triangle Wave v v Uniform White Noise v v Windowing Blackman Window v Blackman Harris Window Blackman Nuttall Window Cosine Tapered Window Dolph Chebyshev Window Exact Blackman Window Exponential Window Flat Top Window Force Window Gauss Window General Cosine Window
98. exer Tip For more detailed information about the Common class library refer to the National Instruments section in the NI Measurement Studio Help Data Transfer You can use the NetworkVariable class library or the DataSocket class library to transfer live measurement data between applications over a network You can use NetworkVariable or DataSocket to exchange different types of data between Measurement Studio LabVIEW LabWindows CVI and other applications that support NI Publish Subscribe Protocol psp NetworkVariable is the preferred method for transferring data between these applications and in these cases Network Variable supersedes DataSocket You can also use Network Variable and DataSocket to exchange different types of data between OLE for Process Control opc servers Exchanging data between Measurement Studio applications and OPC servers with Network Variable requires LabVIEW DSC Run Time System Use DataSocket to communicate directly with an OPC server Network Variable The Measurement Studio Network Variable NET class library includes three namespaces NationalInstruments NetworkVariable NationalInstruments NetworkVariable WindowsForms and NationalInstruments NetworkVariable WebForms You use the Network Variable class library to transfer live measurement data between applications and servers over the network You use NationalInstruments NetworkVariable WindowsForms and NationalInstruments NetworkVariable
99. ferenced Measurement Studio assemblies The Refresh Project process works by going through the licenses 1icx file line by line for the active project and removing each Measurement Studio licensed type that matches the Measurement Studio PublicKeyToken After all Measurement Studio licensed types are removed from the Licenses 1licx file the current Measurement Studio licensed types that are referenced by the project are added to the licenses 1licx file This ensures all Measurement Studio licensed types used by the project are added to the Licenses 1licx file Add 64 Bit Protection to Project Updates your project s platform target to x86 and updates your project to protect it from build error LC0000 Refer to Using Measurement Studio on 64 Bit Operating Systems and Protecting Your Project from LC0000 Build Error topics in the NI Measurement Studio Help for more information This menu item is only available in Visual Studio 2005 on a 64 bit Windows OS Visual Studio 2008 projects function correctly without this protection Remove 64 Bit Protection from Project Removes protection for build error LC0000 from your project Refer to Using Measurement Studio on 64 Bit Operating Systems and Protecting Your Project from LC0000 Build Error in the NI Measurement Studio Help for more information This menu item is only available in Visual Studio 2005 on a 64 bit Windows OS Visual Studio 2008 projects function correctly without this protection Upda
100. g code to generate random data plot the data calculate the mean of the data and display the mean on the gauge VB NET Declare and initialize an instance of WhiteNoiseSignal Dim whiteNoise As New WhiteNoiseSignal Store the generated data in a double array named data Dim data As Double whiteNoise Generate 1000 0 256 Use the PlotY method to plot the data Plot PlotY data Use the Mean method to calculate the mean of the data Dim mean As Double Statistics Mean data Display the mean on the gauge gauge Value mean C4 Declare and initialize an instance of WhiteNoiseSignal WhiteNoiseSignal whiteNoise new WhiteNoiseSignal Store the generated data in a double array named data double data whiteNoise Generate 1000 0 256 Use the PlotY method to plot the data Plot PlotY data Use the Mean method to calculate the mean of the data double mean Statistics Mean data Display the mean on the gauge gauge Value mean Measurement Studio User Manual 5 8 ni com Chapter 5 Getting Started with Measurement Studio Customizing your user interface 1 Right click the legend and select Edit Items to display the LegendItem Collection Editor dialog box You use the LegendItem Collection Editor dialog box to add or remove legend items and to configure legend item properties Legenditem Collection Editor Members legendItem1 properties SIME A o legenditemi 4 Lie
101. ght clicks the icon e Overridable event handling CNiTempFile CNiTempFile extends the functionality of CNiFile to add temporary file creation and manipulation CNiTimer CNiTimer objects use the Windows multimedia timer to generate high resolution asynchronous tick events Respond to tick events when you want to perform an action at a discrete interval Additionally you can count the tick events to calculate elapsed time The CNiTimer class also contains static functions you can use to delay for a period of time or to determine elapsed time between two points in your program Q Tip For more information about using the Utility class library refer to the Utility Visual C Class Library Overview section in the NI Measurement Studio Help Measurement Studio User Manual 3 24 ni com Measurement Studio Integrated Tools and Features When you use Measurement Studio in the Visual Studio environment you have access to measurement and automation tools and features for Visual Basic NET Visual C ASP NET and Visual C These integrated tools and features are designed to help you quickly and easily build measurement and automation applications These integrated tools and features are included in support for both Visual Studio 2005 and Visual Studio 2008 This chapter includes the following sections to help you develop applications with Measurement Studio Measurement Studio Menu e Creating a Measurement Studio
102. he Measurement Studio ActiveX 3D graph control as shown in Figure 3 1 to plot three dimensional data The 3D graph is included only in the Measurement Studio Enterprise and Professional packages Qa Qw an Figure 3 1 ActiveX 3D Graph Control Measurement Studio User Manual 3 2 ni com Plot Operations Additional Operations Chapter 3 Measurement Studio Visual C Class Libraries With the Measurement Studio ActiveX 3D graph control and the classes that interface with the control you can perform the following operations Plot three dimensional data including curves and surfaces Use multiple plot styles point line line point hidden line contour surface surface line surface contour and surface normal Create multiple plots with individual properties such as name line and point style width and base value Configure the control to render directly to OpenGL enabled hardware accelerator cards Bind the control to a DataSocket Server to enable automatic read and write functionality Configure the axes using customizable ticks labels value pairs and captions Use legends and plane projections Use cartesian cylindrical and spherical coordinate systems Customize the control using color maps transparency and lighting Display in orthographic and perspective views Use built in format styles for labels including scientific symbolic engineering scaling time and date Rotate pan an
103. he application will run as 64 bit on a 64 bit operating system Class Libraries Measurement Studio 2009 support for Visual Studio 2008 includes 64 bit support for the following class libraries Analysis Common Network Variable TDMS User Interface NI DAQmx 8 9 5 and later versions hy Note Not all NI DAQ hardware supported by NI DAQmx is supported in 64 bit user mode Refer to the NI DAQ Readme for more information installed at Start AIl Programs National Instruments NI DAQ NI DAQ Readme Measurement Studio User Manual NI VISA 4 5 1 and later versions NI 488 2 2 7 1 and later versions MAX 4 6 and later versions 2 2 ni com Analysis Chapter 2 Measurement Studio NET Class Libraries 64 bit support for the following class libraries is not available e DataSocket NET class libraries e NI SCOPE NET class libraries NI Vision NI IMAQ and NI IMAQdx NET class libraries e Modular instruments NET wrappers for other NI drivers Standard Analysis The Measurement Studio Analysis NET class library is in the NationalInstruments Analysis namespace The Analysis class library includes a set of classes that provides various digital signal processing signal filtering signal generation peak detection and other general mathematical functionality Use this library to analyze acquired data or to generate data Additionally the documentation for the Analysis class library includes analysis code snippets th
104. he axis to display on one or both sides of the graph s plot area e Configure major minor and custom divisions Additional Operations e Display data in sample or time mode e Configure the style and mode of scroll bars e Create custom scroll bars Zoom interactively as well as programmatically e Specify the image format of the control as BMP GIF JPEG or PNG e Create custom mouse cursors programmatically or at design time using the mouse cursor style editor National Instruments Corporation 2 43 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Q Tip For more information about using the digital waveform graph control refer to the S Using the Measurement Studio Web Forms Digital Waveform Graph NET Control section in the NI Measurement Studio Help Complex Graph Control Use the Measurement Studio complex graph control as shown in Figure 2 15 to display ComplexDouble data on a ASP NET Web application A ComplexDouble consists of a real part and an imaginary part You can use a waveform graph to plot complex waveform data Z Measurement Studio Complex Graph Web DAR File Edit View Favorites Tools Help AN ix a A Search Figure 2 15 Complex Graph Web Forms Control With the complex graph control and the classes that interface with the control you can perform the following operations Plot Operations Measurement Studio User Manual Plot and chart Co
105. hrough Creating a Measurement Studio NI DAQmx Application section for step by step instructions on how to create DAQ applications Start Page Formi cs Design DAQmxTask1 mxb gt Test Add Channels XX Remove Channels si Project Task E Connection Diagram Show Details Voltage Input Setup Settings me Calibration Signal Input Range Scaled Units Max Volts v Min 5 Terminal Configuration Differential v Glick the Add Channels button to li add more channels to the task Custom Scaling lt No Scale gt v f M Task Timing 4L Task Triggering Acquisition Mode 1 Sample On Demand O ag Clock Settings O1 Sample HW Timed Samples To Read 100 N Samples O Continuous Rate Hz 1k Advanced Clock Settings Figure 4 3 DAQ Assistant The DAQ Assistant interactively assists you in performing the following operations e Creating an NI DAQmx task class e Configuring an NI DAQmx task class e Generating a Visual Basic NET Visual Cft or Visual C class that includes the functionality you configure in the user interface National Instruments Corporation 4 7 Measurement Studio User Manual Chapter 4 Measurement Studio Integrated Tools and Features e Generating code that uses an NI DAQmx task class e Using an NI DAQmx task class in a project e Generating a DAQ component that uses the task to provide appropriate operations for y
106. hs Use the following walkthroughs to help you develop Measurement Studio applications in Visual Studio 2005 or Visual Studio 2008 e Walkthrough Creating a Measurement Studio Application with Windows Forms Controls and Analysis e Walkthrough Creating a Measurement Studio Application with Web Forms Controls and Analysis e Walkthrough Creating a Measurement Studio Application with Windows Forms Controls and Network Variable e Walkthrough Creating a Measurement Studio Application with Web Forms Controls and Network Variable e Walkthrough Creating a Measurement Studio NI DAQmx Application e Walkthrough Creating a Measurement Studio Instrument I O Application National Instruments Corporation 5 1 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio Walkthrough Creating a Measurement Studio Application with Windows Forms Controls and Analysis iyi Note To complete this walkthrough you must have either the Measurement Studio Professional or or later This w Measurement Studio User Manual Measurement Studio Enterprise package installed for Visual Studio 2005 alkthrough will not work with the Measurement Studio Standard package Measurement Studio includes user interface controls such as a waveform graph control and a gauge control and analysis functionality such as signal generation and mathematical functions This walkthrough is designed to help you learn how to add analysis an
107. ibrary National Instruments Corporation 5 13 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio Measurement Studio ASP NET Web Site Wizard Select the class libraries you want to include in the project Measurement Studio Class Libraries Nuno l INSTRUMENTS Enterprise Analysis C NetworkVariable Communication Web Forms User Interface Controls Q Tip If you are working with an existing project you can access the Add Remove Class Libraries dialog box by selecting Measurement Studio Add Remove NET Class Libraries Wizard 7 Click Finish to display Default aspx in the Web Forms Designer You can change the title of your Web page Click inside the lt title gt tag and rename the title to Measurement Studio Web Forms Controls and Analysis Walkthrough Measurement Studio User Manual 5 14 ni com Chapter 5 Getting Started with Measurement Studio Adding user interface controls to the project In this section you will build a Web page that looks like the following screenshot E Measurement Studio Web Forms Controls and Analysis Walkthrough DER File Edit View Favorites Tools Help ay Q ee z ix a 5 Search Sf Favorites re National Instruments Corporation 0 1 EE 1 l 200 260 i00 Signal 0 0328 om Click Design in the lower left corner to switch from Source View to Design View Select View Toolbox to display the Toolbox The To
108. ic Edit Web Forms Control With the numeric edit control and the classes that interface with the control you can perform the following operations e Perform range checking e Set the minimum range value to negative infinity and the maximum range value to positive infinity e Create custom formats or use built in numeric formats including generic engineering and simple double You can use these numeric formats with other Measurement Studio user interface controls such as the waveform graph and numeric pointer controls e Connect to a Measurement Studio numeric control so that if you change the value of one control it changes the value of the other control e Setthe coercion mode property to discrete or continuous values This property configures the control to allow entry or display of either a discrete set of values or any value e Validate and format data without posting back to the Web server Tip For more information about using the Web Forms numeric edit control refer to the NumericEdit Class section in the NI Measurement Studio Help National Instruments Corporation 2 49 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Switch and LED Controls Use the Measurement Studio switch and LED controls as Boolean controls in an ASP NET Web application You typically use a switch control to receive and control Boolean input in an ASP NET Web application You typically use an LED control to i
109. in angle brackets represents directory names and parts of paths that may vary on different computers such as Windows NSystem The symbol leads you through nested menu items and dialog box options to a final action The sequence File Page Setup Options directs you to pull down the File menu select the Page Setup item and select Options from the last dialog box This icon denotes a tip which alerts you to advisory information This icon denotes a note which alerts you to important information Bold text denotes items that you must select or click on in the software such as menu items and dialog box options Bold text also denotes class library member names or emphasis Italic text denotes parameters variables cross references or an introduction to a key concept Italic text also denotes text that is a placeholder for a word or value that you must supply Text in this font denotes text or characters that you enter from the keyboard sections of code programming examples and syntax examples This font also is used for the proper names of disk drives paths directories programs device names filenames and extensions and code excerpts X ni com Introduction to Measurement Studio Measurement Studio is an integrated suite of tools and class libraries that is designed for developers using Microsoft Visual Basic NET Visual C ASP NET and Visual C to develop measurement and automation applications Measurement
110. ion 5 27 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio 6 Select Network Variable Communication Library and Windows Forms User Interface Control Library Measurement Studio Visual CZ Windows Application Wizard Measurement Studio Class Libraries NATIONAL Select the class libraries you want to include in the project INSTRUMENTS C Enterprise Analysis Library C DataSocket Communication Library Network ariable Communication Library Windows Forms User Interface Control Library G Tip If you are working with an existing project you can access the Add Remove Class Libraries dialog box by selecting Measurement Studio Add Remove Class Libraries Wizard 7 Click Finish to display Form1 in the Windows Forms Designer Configuring the network variable data source control 1 Select View Toolbox to display the Toolbox The toolbox contains components and controls that you can add to your project 2 Expand the Measurement Studio group on the Toolbox Select the Network VariableDataSource control in the toolbox and drag and drop it on the form The Network VariableDataSource control is a data source control with functionality similar to System Web UL WebControls ObjectDataSource and System Web UI WebControls SqlDataSource in the NET Framework The Network VariableDataSource control encapsulates Network Variable functionality Measurement Studio User Manual 5 28 ni com Chapte
111. ion 5 41 Measurement Studio User Manual Chapter 5 Ej Getting Started with Measurement Studio 6 Select File Save Default aspx to save your application 7 Select Debug Start Without Debugging to run the application The waveform graph displays the array of data Measurement Studio Network Variable DER ae File Edit View Favorites Tools Help x 2 5 A Search Note You can also use the System Web UI WebControls FormView control to bind to NationalInstruments NetworkVariable WebForms NetworkVariableDataSource Refer to Using the Measurement Studio Network Variable Data Source in Web Forms for more information Walkthrough Creating a Measurement Studio NI DAQmx Application 3 Measurement Studio User Manual 5 42 Note To complete this walkthrough you must have either the Measurement Studio Professional or Measurement Studio Enterprise package installed This walkthrough requires the DAQ Assistant which is not included in the Measurement Studio Standard package This walkthrough is designed to help you learn how to create an NI DAQmx applicationby taking you through the following steps e Setting up the project Using the Measurement Studio DAQ Application Wizard you will create a new project that references the NI DAQmx assembly and launches the DAQ Assistant to create an NI DAQmx task ni com Chapter 5 Getting Started with Measurement Studio e Configuring your task Using the DAQ Ass
112. is turned on A control that displays symbols and descriptions for a specific set of elements of another object such as the plots or cursors of a graph A rectangular array of numbers or mathematical elements that represent the coefficients in a system of linear equations Megabytes of memory National Instruments tool for configuring your National Instruments hardware and driver software executing system diagnostics adding new devices interfaces and virtual channels and viewing devices and instruments connected to your system DAQ devices such as the E Series multifunction I O MIO devices SCXI signal conditioning modules and switch modules National Instruments software that includes tools to build measurement applications in Visual Basic NET Visual C and Visual C A control used to input or display numerical data Function that performs a specific action on or with an object The operation of the method often depends on the values of the object properties Microsoft Foundation Class A framework for programming in Microsoft Windows MFC provides code for managing windows menus and dialog boxes performing basic input output storing collections of data objects and more Measurement Studio User Manual Glossary NI 488 2 NI DAQ NI DAQmx NI IMAQ numeric edit 0 OCX OLE OPC oscilloscope Driver level software to control and communicate with National Instruments GPIB hardware Drive
113. istant you will interactively configure and save your task The wizard then generates code to reflect your configuration settings The wizard also generates a component that provides common operations for your task and integration with the Windows Forms designer e Creating a custom user interface for the task Using the DAQ Component UI generation wizard you will create a custom user interface that uses the DAQ component you created to automatically plot the DAQ signal Before you begin The following components are required to complete this walkthrough e Visual Studio 2005 or Visual Studio 2008 e Measurement Studio 8 0 1 or later Professional or Enterprise package for Visual Studio 2005 or Measurement Studio 8 5 or later Professional or Enterprise package for Visual Studio 2008 e NI DAQmx 8 1 or later for Visual Studio 2005 or NI DAQmx 8 7 1 or later for Visual Studio 2008 e NI DAQmx supported DAQ device or simulated device For information about installing and configuring your DAQ device refer to the DAQ Getting Started Guide You can also use a simulated device to complete this walkthrough For information on how to create an NI DAQmx simulated device refer to Creating NI DAQmx Simulated Devices topic in the Measurement amp Automation Explorer Help for NI DAQmx To open this help select Start All Programs National Instruments Measurement amp Automation In Measurement amp Automation Explorer MAX select Help H
114. istant provides a user interface within the Visual Studio environment You use the Instrument I O Assistant to interactively write commands to a device read data that the device returns and specify how to parse the response Connection between one or more of the following hardware software and the user For example hardware interfaces connect two other pieces of hardware Interchangeable Virtual Instruments A technology involving standard programming interfaces for classes of instruments such as oscilloscopes DMMs and function generators that results in hardware independent instrument drivers The IVI standard programming interfaces have been defined by the IVI Foundation an industry consortium Refer to www ivifoundation org for more information A control used to input or display numerical data Measurement Studio User Manual G 6 ni com L LabVIEW LabWindows CVI LED legend matrix MB Measurement amp Automation Explorer MAX measurement device Measurement Studio meter method MFC National Instruments Corporation G 7 Glossary Laboratory Virtual Instrument Engineering Workbench Graphical development environment used for developing test and measurement applications ANSI C development environment for building test and measurement applications Light Emitting Diode An indicator that emits a light when current passes through it For example an LED shows if your computer or printer
115. k Variable Browser dialog box to quickly locate and select data items on other computers and servers The Browser Dialog is included in the WindowsForms class Q Tip For more detailed information about the Network Variable class library refer to the Using the Measurement Studio Network Variable NET Library section in the NI Measurement Studio Help DataSocket The Measurement Studio DataSocket NET class library is in the NationalInstruments Net namespace Use the DataSocket class library to transfer live measurement data over the Internet or an intranet between applications on the same computer and to and from files Use the classes in the DataSocket class library to perform the following operations e Read and write data between different data sources and targets e Useasingle simple API to communicate with several types of servers including DataSocket Servers dstp Web servers http file transfer protocol servers tp file systems 11e and OLE for Process Control opc servers Measurement Studio User Manual 2 16 ni com Chapter 2 Measurement Studio NET Class Libraries e Specify data sources and targets using a URL the same way you access Web pages in a Web browser e Use DataSocket Transfer Protocol DSTP to exchange different types of data e Expose DataSocket data items as data sources that you can bind to properties of a Windows Forms control e nteractively browse to quickly locate and select d
116. k class in a user friendly class and creates a dialog that provides an example of using the new class You can use the user code in two different ways You can call the DoModal function on the new dialog class or you can use the user friendly wrapper class directly in your code by calling the class programmatically To use the user code directly create an instance of the DAQmx user code class and call the appropriate function in your source code You can create an instance of the user code directly in source code just as you create an instance of any class directly in source code Declare a variable of the appropriate type and use it directly The h file for the user friendly wrapper for the DAQmx task class contains additional information on using the user code Q Tip For more information on how to create user code refer to the Using a DAQmx Task Class in a Project topic in the NI Measurement Studio Help Creating an Instrument Control Application To create a Measurement Studio instrument control application use the Instrument I O Assistant The Instrument I O Assistant as shown in Figure 4 5 integrates into Visual Studio as a code designer Use the Add New Item wizard to add an instrumentation task to your project and use the Instrument I O Assistant user interface to create and configure the instrumentation task The Instrument I O Assistant generates a Visual Basic NET Visual C or Visual C class that includes the functiona
117. l including photocopying recording storing in an information retrieval system or translating in whole or in part without the prior written consent of National Instruments Corporation National Instruments respects the intellectual property of others and we ask our users to do the same NI software is protected by copyright and other intellectual property laws Where NI software may be used to reproduce software or other materials belonging to others you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction Trademarks National Instruments NI ni com and LabVIEW are trademarks of National Instruments Corporation Refer to the Terms of Use section on ni com 1legal for more information about National Instruments trademarks Other product and company names mentioned herein are trademarks or trade names of their respective companies Members of the National Instruments Alliance Partner Program are business entities independent from National Instruments and have no agency partnership or joint venture relationship with National Instruments Patents For patents covering National Instruments products technology refer to the appropriate location Help Patents in your software the patents txt file on your media or the National Instruments Patent Notice at ni com patents WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS 1 NATIONAL INSTRU
118. l C class library to easily access Windows operating system functionality Table 3 2 lists classes in the Utility class library and their functionality National Instruments Corporation 3 23 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 2 Utility Class Names and Functionalities Utility Class Functionality CNiFile CNiFile extends the MFC CStdioFile class by adding streaming operators for standard Visual C data types In addition a variety of class static functions add the ability to manipulate file path directory and drive attributes CNiSound CNiSound encapsulates an interface for generating synchronous and asynchronous tones at specific frequencies CNiSystem CNiSystem provides the following functionality Getting and setting system preferences Displaying help files Getting input for the keyboard CNiSystemTrayIcon CNiSystemTrayIcon encapsulates the interface to the system tray area that displays changes in the status of an application The CNiSystemTrayIcon class includes the following features e cons You can place an icon in the system tray to notify the user of changes in an application status String tooltips You can associate a string tooltip with an icon and display the tooltip when the user hovers over the icon Shortcut menus You can associate a shortcut menu with an icon and display the shortcut menu when the user ri
119. learn how to build an instrument I O application by taking you through the following steps Setting up the project Using the Measurement Studio VISA Windows Application project you will create a new project that references the VisaNS assembly and launches the Instrument I O Assistant to create a VisaNS task Performing a query on the instrument Using the Instrument I O Assistant you will write a command to an instrument and read the instrument response Displaying Instrument I O Assistant data on your UI Using text box and button controls you will create a Windows Forms application to display the Instrument I O Assistant data Before you begin The following components are required to complete this walkthrough Visual Studio 2005 or Visual Studio 2008 Measurement Studio 8 0 1 or later Professional or Enterprise package for Visual Studio 2005 or Measurement Studio 8 5 or later Professional or Enterprise package for Visual Studio 2008 National Instruments Device Driver CD Message based instrument on a supported VISA bus such as GPIB or Serial 3 Note For more information about the Instrument I O Assistant refer to the Instrument I O Assistant Help by selecting the Show Help button inside the assistant P Show Help Setting up the project 1 National Instruments Corporation Open Visual Studio from Start All Programs Microsoft Visual Studio 2005 Microsoft Visual Studio 2005 or Start All Programs Micros
120. lements a vector object that contains scalar numbers CNiVariant Extends the MFC COleVariant class with additional constructors and assignment operators for CNiComplex CNiVector and CNiMatrix derived objects and with cast operators to convert CNiVariant objects to a variety of other object types CNiException Extends the MFC CException class and serves as the base class for many Measurement Studio exceptions CNiRegKey Encapsulates the interface to the Windows registry Use this class and related classes to open and create keys get keys and get values associated with those keys 3 14 ni com Chapter 3 Measurement Studio Visual C Class Libraries Q Tip For more detailed information about the Common class library refer to the Common Visual C Class Library Overview topic in the NI Measurement Studio Help DataSocket Use the Measurement Studio DataSocket Visual C class library to transfer live measurement data over the Internet or an intranet between applications on the same computer and to and from files Use the classes in the DataSocket Visual C class library to perform the following operations e Read and write data between different data sources and targets e Usea single simple API to communicate with several types of servers including DataSocket Servers dstp Web servers http file transfer protocol servers ftp file systems file and OLE for Process Control opc servers e Specif
121. lity you configure in the user interface Use this assistant to help you write code that communicates with devices such as serial Ethernet or GPIB instruments 3 Note The Instrument I O Assistant is available only if you have installed either the Measurement Studio Professional or Measurement Studio Enterprise package Refer to Chapter 5 Getting Started with Measurement Studio and the Walkthrough Creating a Measurement Studio Instrument I O Application section for step by step instructions on how to use the Instrument I O Assistant National Instruments Corporation 4 9 Measurement Studio User Manual Chapter 4 Measurement Studio Integrated Tools and Features P Show Help Faddstep Undo gt Run Idle ela vim Select Instrument s Run this step Termination character Enter a command click Run to send command zi cur gt Query and Pat Auto parse Parsing help 3 Clear parsing gt lenathNumBytes nunBytes Bre nde TY Bravremecenetion r i cnt 3120 39 39 Bg E B a Ib Waveform 00000000014 2 rE 00000000028 00000000042 00000000056 00000000070 00000000084 nnnnnnnnnaa zl BinandASCI Byteorder Big Endian Motorola Separator s Selected Token Settings Value 1 5e 009 1e 009 Token name waveform Data Type Scaling Type 4 byte uint M Aray Byte Count Array Size
122. ls e Waveform graph e Scatter graph e Digital waveform graph e Complex graph Legend e Knob e Gauge e Meter e Slide Thermometer e Tank e Numeric edit e Switch LED e Property editor e Array controls Use this class library to add measurement specific user interface controls to your application You can configure the controls programmatically at design time through the Properties window in the Windows Forms Designer or at run time with the property editor control The following sections describe each of the Measurement Studio Windows Forms user interface controls G Tip For more information about using the NET user interface controls refer to the Using the Measurement Studio Windows Forms NET Controls section in the NI Measurement Studio Help Measurement Studio User Manual 2 22 ni com Chapter 2 Measurement Studio NET Class Libraries Waveform Graph and Scatter Graph Controls Use the Measurement Studio waveform graph and scatter graph controls as shown in Figure 2 1 to display two dimensional data on a Windows Forms user interface Use the waveform graph to display two dimensional linear data You explicitly specify each value in one dimension and provide an initial value and interval to implicitly specify the values in the other dimension Use the scatter graph to display two dimensional linear or nonlinear data you explicitly specify each value in both dimensions Figure 2 1 Waveform Graph Wi
123. m divisions and invert the scale Use the Measurement Studio slide tank and thermometer controls as shown in Figure 2 17 to input and display numeric data on your interface E Measurement Studio Slide Tank and Thermometer Controls DEAR File Edit View Favorites Tools Help Q sxx amp x B Search Sf Favorites Figure 2 17 Slide Tank and Thermometer Web Forms Controls With the slide tank and thermometer controls and the classes that interface with them you can perform the following operations e Fill to the minimum or maximum value of the scale Position the scale horizontally with left right or both and position the scale vertically with top bottom or both Q Tip For more information about using the Web Forms knob gauge meter slide tank or thermometer controls refer to the Knob Gauge Meter Slide Tank or Thermometer Class sections in the NI Measurement Studio Help Measurement Studio User Manual 2 48 ni com Chapter 2 Measurement Studio NET Class Libraries Numeric Edit Control Use the Measurement Studio numeric edit control as shown in Figure 2 18 to display numeric values and to provide a way by which end users can edit numeric values Typically you use a numeric edit control to input or display double numerical data instead of using a Web Forms TextBox control Numeric Edit Control DAR File Edt View Favorites T F i 2 5 000Hz Figure 2 18 Numer
124. ment Studio Help Property Editor Control Use the Measurement Studio property editor control as shown in Figure 2 9 to configure properties for Windows Forms controls at run time Measurement Studio User Manual Sel DE Property Editor Drag the sweep or start angle lines to ae the arc Scale Arc G8 240 300 18 m Start angle pano 0 Sweep angle 300 0 AE Invert Cancel Figure 2 9 Property Editor Windows Forms Control for the Knob Control Scale Arc Property 2 34 ni com Chapter 2 Measurement Studio NET Class Libraries With the property editor control and the classes that interface with the control you can perform the following operations Edit any NET type at run time including collections Edit expandable properties that represent nested properties of another object such as major divisions of an axis Display custom editors and type converters for properties Connect to a Windows Forms control so that if you change the value of a property of the control the Property Editor will update to reflect the change Configure the display mode as a visual representation of the value text only or both Set the interaction mode to edit values or indicator 0 Tip For more information about using the property editor control refer to the Using the Measurement Studio Property Editor Control topic in the NI Measurement Studio Help Windows Forms Array Controls Y
125. ment Studio Help 1 7 technical support A 1 how to use manual set ix installation optional 1 3 requirements 1 2 instrument drivers NI resources A 1 Instrument I O Assistant 4 9 Measurement Studio User Manual l 2 K knob NET control 2 31 NET Web Forms control 2 47 Visual C control 3 21 KnowledgeBase A 1 L LED array control 2 36 LED control 2 33 2 50 legend control 2 30 2 46 Measurement amp Automation Explorer MAX 4 2 Measurement Studio developing with 4 1 home page 4 3 Menu 4 1 overview 1 1 package comparison chart 1 5 Preferences 4 4 resources 1 7 meter control 2 31 2 48 Microsoft Excel Interface Visual C class library 3 15 Microsoft Word Interface Visual C class library 3 16 National Instruments support and services A 1 NET class libraries Analysis 2 3 Common 2 14 NI Vision Development Module 2 20 NI 488 2 2 17 NI DAQmx 2 17 NI IMAQ 2 18 ni com NI IMAQdx 2 18 NI SCOPE 2 18 NI VISA 2 19 overview 2 1 User Interface 2 21 2 39 deployment requirements 1 4 Network Variable NET class library 2 15 NI DAQ Assistant 4 6 NI Developer Zone 4 3 NI Discussion Forums 4 3 NI Instrument Driver Network 4 3 NI Spy 4 2 NI Vision Development Module NET class library 2 20 NI 488 2 NET class library 2 17 Visual C class library 3 16 NI DAQmx creating a DAQ application 4 6 NET class library 2 17 Visual C class library 3 16 NI IMAQ
126. mmunication physical layer testing video testing and high speed digital design verification Measurement Studio User Manual G 8 ni com PCI PID plot point postback property property editor property pages PXI Glossary Peripheral Component Interconnect High performance expansion bus architecture commonly found in PCs Proportional Integral Derivative A three term control mechanism combining proportional integral and derivative control You might use a PID algorithm to control processes such as heating and cooling systems fluid level monitoring flow control and pressure control 1 Trace data line on a graph representing the data in one row or column of an array 2 To display a new set of data while deleting any previous data on the graph Structure that contains two 16 bit integers that represent horizontal and vertical coordinates The process in which a Web page sends data back to the same page on the server Attribute that defines the appearance or state of an object The property can be a specific value or another object with its own properties and methods For example a value property is the color property of a plot object while an object property is a specific Y axis property on a graph object The Y axis itself is another object with properties such as minimum and maximum values A control used to configure properties for Windows Forms controls at run time Window or dialog b
127. mplexDouble data Configure a graph to contain multiple plots to show separate but related data on the same graph You can configure a graph to automatically generate different colors for different plots Draw lines or fills from a plot to an X value Y value or another plot Use the extensible plot and plot area drawing capabilities and events to customize the graph appearance 2 44 ni com Chapter 2 Measurement Studio NET Class Libraries Configure the plot to display arrows The arrows indicate the direction of the complex data Create custom point and line styles for plots Specify anti aliased plots for plot lines Calculate and display error bands Configure plot to specify how data is saved and restored across HTTP requests Axis Operations Configure a graph to include multiple axes or independent ranges so that plot data fits the graph plot area Configure the axis modes to fixed autoscaling including autoscaling based on the visible data only strip chart or scope chart Interactively change the range of an axis and invert the axis at run time by clicking on the axis end labels Display origin lines captions on the axis and grid lines Position the axis to display on one or both sides of the graph s plot area Configure major minor and custom divisions and origin lines Cursor Operations National Instruments Corporation Use cursors to identify key points in plots and the plot area Configure
128. ms array controls 2 35 LED array control 2 36 switch array control 2 36 Windows Forms user interface controls 2 21 ni com
129. n of Measurement Studio was rele ased National Instruments recommends using Measurement Studio with the latest operating system service pack R Note If you want to upgrade your operating system National Instruments recommends first uninstalling all National Instruments software including application software and drivers Measurement Studio User Manual e Microsoft NET Framework 2 0 for Visual Studio 2005 or Microsoft NET Framework 3 5 for Visual Studio 2008 required only for the Measurement Studio NET class libraries e Intel Pentium III class processor 1 6 GHz or higher 1 2 ni com Chapter 1 Introduction to Measurement Studio e Video display 1024 x 768 256 colors 16 bit color recommended for user interface controls e Minimum of 512 MB of RAM 1024 MB or higher recommended e Minimum of 419 MB of free hard disk space for Visual Studio 2005 support or minimum of 395 MB of free hard disk space for Visual Studio 2008 support Microsoft compatible mouse Microsoft Internet Explorer 6 0 or later Optional Installation In order for links from Measurement Studio help topics to NET Framework help topics to work you must install the product documentation for Visual Studio which installs the MSDN Library This requires a secondary installation during the Visual Studio installation process Driver Support To use NET or Visual C class libraries that interface to National Instruments device drivers NI DA
130. n software NI Developer Zone zone ni com Provides access to online example programs tutorials technical news and Measurement Studio discussion forums where you can participate in discussion forums for Visual Basic 6 0 Visual C and NET Languages Measurement Studio NET Class Hierarchy Chart and Measurement Studio Visual C Class Hierarchy Chart Provide overviews of class relationships within class libraries Charts are included with all Measurement Studio packages and are posted online at ni com manuals Review the information from the Microsoft Web site on using Visual Studio 1 8 ni com Measurement Studio NET Class Libraries This chapter provides overview information about the NET class libraries included with Measurement Studio support for Visual Studio 2005 and Visual Studio 2008 Refer to the Using the Measurement Studio NET Class Libraries section of the NI Measurement Studio Help for detailed information about these libraries Refer to Chapter 5 Getting Started with Measurement Studio for step by step instructions on developing applications with these libraries 3 Note Measurement Studio support for Visual Studio NET 2003 is considered legacy To view documentation for Visual Studio NET 2003 support refer to the Measurement Studio Support for Visual Studio NET 2003 Readme located on the installation media for Measurement Studio for Visual Studio NET 2003 After installing Visual Studio NET 2003
131. n the Data Type tab Selected Token Settings Token name Data Type Scaling Type String m Character Count 9 4 amp To end of data 7 Select Token2 rename it to Device and ensure that the data type for Token2 is String To select Token2 left click on it within the Query and Parse step in the Step Sequence window on the left side of the Instrument I O Assistant Follow the instructions from step 6 to change the token name and to set the token data type Select File Save to save your task 9 Select View Solution Explorer to display the Solution Explorer Measurement Studio User Manual 5 56 ni com Chapter 5 Getting Started with Measurement Studio 10 Click the Show All Files icon and expand the visaTask mxb node Solution Explorer MyIIOAProject 1x W a Properties H 3j References amp E Formt cs c Program cs amp W visaTask mxb R VisaTask cs 11 Double click the VisaNSTask1 file to view the code that the Instrument I O Assistant generated for you Displaying Instrument I O Assistant data on your user interface 1 Oe Us Double click the Form1 file in the Solution Explorer to open your main application form Select View Toolbox to display the Toolbox Expand the All Windows Forms group on the Toolbox Select the Button control and drag and drop it onto the form Select the TextBox control and drag and dro
132. nd simple double e Connect to a numeric control so that if you change the value of one control it changes the value of the other control e Setthe coercion mode property to discrete or continuous values This property configures the control to allow entry or display of either a discrete set of values or any value e Setthe interaction mode to keyboard and mouse keyboard only mouse only or none Use the edit box to select text programmatically and to validate text values e Configure the layout of the control to be horizontal or vertical Bind the value of the control to a data source 0 Tip For more information about using the numeric edit array control refer to the Using the Measurement Studio Control Array NET Controls topic in the NI Measurement Studio Help InstrumentControlStrip Control You can use the InstrumentControlStrip control as a toolbar for editing property values of another control through the associated editors at run time For example you can populate the InstrumentControlStrip with National Instruments Corporation 2 37 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries ToolStripPropertyEditor items that edit property values of a WaveformGraph through the associated editors at run time The editor displayed by the ToolStripPropertyEditor is the same editor that displays when you edit the property at design time Instrument Control Strip Control AR S
133. ndicate a Boolean value on an ASP NET Web application The switch and LED controls are shown in Figure 2 19 Switch and LED Controls E E X File Edit View Favorites Tool gt BIRKAN 5 il Figure 2 19 Switch Web Forms Control in Vertical Toggle 3D Style and LED Web Forms Control in Square 3D Style With the switch and LED controls and the classes that interface with the controls you can perform the following operations e Receive notification before or after the state of the control changes e Specify the image format of the control as BMP GIF JPEG or PNG e Configure the appearance of the control e Configure the LED control to blink while it is on or off and configure the rate at which the LED control blinks Tip For more information about using the switch and LED controls refer to the Using the Measurement Studio Web Forms Switch and LED NET Controls section in the NI Measurement Studio Help AutoRefresh Control Use the AutoRefresh control to update a Web control or a group of Web controls on the client at a specified interval The AutoRefresh control uses the ASP NET client callback architecture to update a control or a group of controls at a specified interval The AutoRefresh control sets up a timer inside the browser using Javascript Measurement Studio User Manual 2 50 ni com Chapter 2 Measurement Studio NET Class Libraries When the timer elapses the AutoRefresh updates the controls in the
134. ndows Forms Control with Cursors and Scatter Graph Windows Forms Control with XY Point Annotation Both Graphs Have Corresponding Legends With the waveform graph and scatter graph controls and the classes that interface with the controls you can perform the following operations National Instruments Corporation 2 23 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Plot Operations Plot and chart arrays of double precision floating point values analog waveforms and complex waveforms Configure a graph to contain multiple plots to show separate but related data on the same graph You can configure a graph to automatically generate different colors for different plots Draw lines or fills from a plot to an X value Y value or another plot Specify plots in the scatter graph control as X and Y data Specify plots in the waveform graph control as X or Y data and optionally with date and time scaling Use the extensible plot and plot area drawing capabilities and events to customize the graph appearance Use plot data tooltips to display X and Y coordinates when a user hovers the mouse over a data point Create custom point and line styles for plots Specify anti aliased plots for plot lines Calculate and display error bands Axis Operations Configure a graph to include multiple axes or independent ranges so that plot data fits the graph plot area Configure the axis modes to fixed aut
135. ng advanced functionality Measurement Studio User Manual Bessel Chebyshev Inverse Chebyshev Windowed Kaiser and Elliptic Low High Bandpass and Bandstop filters Signal processing functions such as convolution deconvolution correlation decimation integration and differentiation FFT Inverse FFT Real FFT Fast Hartley Inverse Fast Hartley Fast Hilbert Inverse Fast Hilbert DST Inverse DST DCT and Inverse DCT transformations Linear algebra functions such as determinant check positive definiteness calculate dot product and other various matrix methods Scaled and unscaled windowing classes Common statistical functions such as mean median mode and variance Exponential linear and polynomial curve fitting functions Signal generation functions EquiRipple filters Linear algebra functions such as forward and back substitution LU factorization Cholesky factorization Schur decomposition and Hessenberg decomposition Probability and analysis of variance Sinc impulse pulse ramp and chirp patterns General least squares fit power fit log fit Gauss Fit cubic spline fit and interpolation functions Special functions 3 4 ni com Chapter 3 Measurement Studio Visual C Class Libraries Refer to Table 3 1 to determine the type of measurements available in the Professional and Enterprise Analysis Visual C libraries Table 3 1 Analysis Visual C Library Measurement Types included in the Profe
136. nitialize an instance of WhiteNoiseSignal WhiteNoiseSignal whiteNoise new WhiteNoiseSignal Store the generated data in a double array named data double data whiteNoise Generate 1000 0 256 Use the PlotY method to plot the data graph PlotY data Use the Mean method to calculate the mean of the data Getting Started with Measurement Studio double mean Statistics Mean data Display the mean on the numeric edit numericedit Value mean Display the mean on the gauge gauge Value mean Customizing your user interface l 2 Select the Default aspx tab to return to the Web Forms Designer Right click the legend and select Edit Items to display the LegendItem Collection Editor dialog box You use the LegendItem Collection Editor dialog box to add or remove legend items and to configure legend item properties Legenditem Collection Editor National Instruments Corporation Members legendItem1 properties Eala El Appearance Source Text Visible E Data ApplicationSettin Tag El Design Name legendItem1 GenerateMember True Modifiers Private E Plot Signal True 5 19 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio 3 Select Plots 0 in the Source drop down list and enter Signal in the Text box Click OK Now that you have specified a legend item for the plot changes you make to the plot will be reflected on the legend
137. nt amp Automation Explorer Help for NI DAQmx Create New NI DAQ DAQ Assistant Select the physical channel s to add to the task If you have previously configured global virtual channels of the same measurement type as the task click the Virtual tab to add or copy global virtual channels to the task If you have TEDS configured click the TEDS tab to add TEDS channels to the task For hardware that supports multiple channels in a task you can select multiple channels to add to a task at the same time National Instruments Corporation 5 47 Sri Wii Physical Virtual Supported Physical Channels Gm Devi PCI MIO 16E 4 aid Ctrl or Shift click to select multiple channels Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio 4 Inthe Edit DAQ Task dialog box you can edit the configuration of your DAQ task If the embedded DAQ Assistant help is not open by default click the Show Help button in the upper right corner of the window to display the help Edit DAQ Task Edit DAQ Task NATIONAL Configure the settings of your new DAG task INSTRUMENTS e Ru 7 Add Channels X Remove Channels 3 Show Help ni Project Task Connection Diagram 1 0 Amplitude si 1 1 1 1 1 1 1 1 1 20 40 60 80 100 160 180 200 AutoScale Axis Graph Y Display Type Configuration Triggering Advanced Timing Channel Settings
138. nts The numeric controls include a knob gauge meter slide thermometer and tank The following sections describe operations available with the controls and the classes that interface with them With all of the numeric controls and the classes that interface with them you can perform the following operations e Configure the scale to be linear or logarithmic and toggle the visibility of the scale e Fill the scale and configure the range color dimensions and style of the fill e Connect to the Measurement Studio NET numeric edit control so that if you change the value of one control it changes the value of the other control e Customize the appearance of the control using 3D lab styles or classic 2D styles and change the color and length of ticks and labels Measurement Studio User Manual 2 30 ni com Chapter 2 Measurement Studio NET Class Libraries e Configure the format of value labels to engineering or date time e Display tooltips reflecting the current value of the pointer e nteractively change the value of the control by clicking or dragging and moving the pointer with the mouse e nteractively change the range of an axis and invert the axis at run time by clicking on the axis end labels e Programmatically move the pointer to previous or next value e Perform hit testing of mouse cursor coordinates e Specify the image format of the control as BMP GIF JPEG or PNG Use the Measurement Studio knob gauge
139. o NET Class Libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis NET Library Professional Package Enterprise Package Power Spectrum v v Pulse Parameters v Real and Complex FFT v Threshold Peak Detector v Unwrap Phase v NINES Linear Algebra Back Transform Eigen Vectors Backward Substitution Cholesky Factorization Complex Back Transform Eigen Vectors NNN Complex Cholesky Factorization S Complex Determinant lt S Complex Dot Product S Complex Eigen Vectors and Eigen Values Complex General Eigen AB lt S Complex Hessenberg Decomposition NS Complex Inverse Matrix Complex Linear Equations Complex LU Factorization Complex Matrix Balance Complex Matrix Condition Number SOS Sh NSS Complex Matrix Norm lt S Complex Matrix Rank Measurement Studio User Manual 2 8 ni com Chapter 2 Measurement Studio NET Class Libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis NET Library Professional Package Enterprise Package Complex Outer Product v v Complex Pseudo Inverse Matrix v v Complex QR Factorization Complex QR Factorization with Pivot Ma
140. o Help Use the NI Measurement Studio Help to access detailed Measurement Studio help including function reference walkthroughs and conceptual topic documentation on developing with Measurement Studio Measurement Studio Online Resources Measurement Studio Home Page Use the Measurement Studio Web site at ni com mstudio to find Measurement Studio news support downloads and evaluation software Select Measurement Studio Online Resources Measurement Studio Home Page to access this menu item Measurement Studio Online Resources Instrument Driver Network Use the NI Instrument Driver Network at ni com idnet as a central resource for downloading developing and submitting instrument drivers Select Measurement Studio Online Resources Instrument Driver Network to access this menu item Measurement Studio Online Resources Discussion Forums Use the NI Discussion Forums at forums ni com to participate in discussion forums and exchange code with measurement and automation developers around the world Select Measurement Studio Online Resources Discussion Forums to access this menu item Measurement Studio Online Resources Search Technical Support Use NI Technical Support at ni com support to find support resources available for most products including software drivers and updates KnowledgeBase articles product manuals step by step troubleshooting wizards conformity documentation example code tutorials and application n
141. o automatically create Word documents from within measurement and automation applications Use the Microsoft Word Interface class library to perform offline processing of the measurement and automation data you acquire and analyze using other Measurement Studio Visual C classes This class library is included only in the Measurement Studio Enterprise package This class library is not available in Visual Studio 2008 we Tip For more information about using the Measurement Studio Word Visual C class library to create applications that present data in Microsoft Word refer to the Microsoft Word Interface Visual C Class Library Overview topic in the NI Measurement Studio Help NI 488 2 Use the Measurement Studio NI 488 2 Visual C class library to communicate with and control instruments on a GPIB interface This class library is included when you install the NI 488 2 driver Use this class library to configure and communicate with GPIB devices using the Device and Board classes You can use the NI 488 2 class library to create programs that interface with a device that is using GPIB and or programs that interface with the GPIB device directly Tip For information about easily creating a Measurement Studio NI 488 2 application using the Instrument I O Assistant refer to the Creating an Instrument Control Application section of Chapter 4 Measurement Studio Integrated Tools and Features You can create Measurement Studio NI 488
142. oft Visual Studio 2008 Microsoft Visual Studio 2008 Select File New Project The New Project dialog box launches 5 58 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio New Project Project types Templates Visual Basic isual Studio installed templates Visual Cat 7 Windows E NI Windows Application PAN VISA Windows Application Smart Device g NI Class Library NI VISA Class Library Database Starter Kits My Templates Measurement Studio Visual J amp SE Search Online Templates Visual C Other Project Types A project For creating a Measurement Studio C Visa application with a Windows user interface Mame MyIIOAProject Location C Documents and Settings Projects v Browse Solution Name MyIIOAProject Create directory For solution Cancel 3 Inthe Project Types pane select Measurement Studio under Visual C or Visual Basic depending on which language you want to create the project in This walkthrough refers to Visual C but you can follow the same process if you use Visual Basic NET 4 Inthe Templates pane select NI VISA Windows Application Specify MyIIOAProject for Name and select a Location of your choice 5 Click OK Your project opens in Visual Studio with a visaTask mxb file and references to NationalInstruments VisaNS NationalInstruments UI WindowsForms and NationalInstruments created for you 6 Select View Solu
143. oftware from the list and click the Change Remove button Then select NI TDM Excel Add In from the list and click the Remove button Refer to NI Developer Zone zone ni com for more information about the TDM Excel Add In Measurement Studio User Manual 2 20 ni com User Interface Chapter 2 Measurement Studio NET Class Libraries The Measurement Studio user interface controls are in the Windows Forms and Web Forms NET class libraries The following sections list the functionality included with the Measurement Studio Windows Forms and Web Forms controls Refer to the following table for UI controls provided by Measurement Studio User Interface Controls Windows Forms Web Forms Waveform graph v v Scatter graph Digital waveform graph Complex graph Legend Knob Gauge Meter Slide Thermometer Tank Numeric edit Switch LED SESS ESSET Property editor Array controls SENT NNN NESE NNN NSN AutoRefresh control InstrumentControlStrip control lt S National Instruments Corporation 2 21 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Windows Forms Controls The Windows Forms NET class library is in the NationallInstruments UI WindowsForms namespace The Windows Forms class library encapsulates the following Measurement Studio user interface contro
144. ograms Microsoft Visual Studio 2005 Microsoft Visual Studio 2005 or Start All Programs Microsoft Visual Studio 2008 Microsoft Visual Studio 2008 2 Select File New Project The New Project dialog box launches New Project Project types Templates Visual Basic Visual Studio installed templates Windows Smart Device fag I Windows Application go Ml Class Library Database Starter Kits My Templates Measurement Studio Visual C ao Search Online Templates Windows Smart Device Database Starter Kits Measurement Studio Visual J Visual C Other Project Types 4 project for creating a Measurement Studio C application with a Windows user interface Name MyMeasurementStudioProject Location C Documents and Settings Administrator My Documents Visual Studio 2005 Projects v Browse Solution Name MyMeasurementStudioProject Create directory For solution Cancel J 3 Inthe Project Types pane select Measurement Studio under Visual Cit or Visual Basic depending on which language you want to create the project in 4 Inthe Templates pane select NI Windows Application Specify MyMeasurementStudioProject for Name and specify a Location of your choice Click OK The Measurement Studio Application Wizard launches Select Analysis Library and Windows Forms User Interface Control Library National Instruments Corporation 5 8 Measurement Studio
145. olbox contains components and controls that you can add to your project Expand the HTML group on the Toolbox Select the Table control in the Toolbox and drag and drop it on the form You use the table cells to arrange the user interface controls on your Web page as shown in the previous screenshot The default table that appears is 3 x 3 This table provides a customizable form for arranging the user interface controls for your Web page Expand the table to approximately 300 px pixels tall by 550 px wide by clicking and dragging the table borders If you are using Visual Studio 2005 merge the top two cells of all three columns by selecting the cells right clicking and selecting Merge Cells If you are using Visual Studio 2008 merge the top two cells of all three columns by selecting the cells right clicking and selecting Modify Merge Cells Expand the Standard group on the Toolbox The Standard group contains ASP NET server controls included in the System Web UI namespace 5 15 Measurement Studio User Manual Chapter 5 10 11 12 q Getting Started with Measurement Studio Select the Button control and drag and drop it into the lower right table cell Right click the button and select Properties to display the Properties window You configure the properties of the control in the Properties window Scroll to the Text property in the Properties window Type Start for the button text Expand the Measurement
146. olynomial v v Evaluation 1D Polar to Rectangular v v Measurement Studio User Manual 3 10 ni com Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis Visual C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package 1D Rectangular to Polar v v Complex Number Arithmetic v Find Polynomial Roots v Scale 1D and 2D v E Curve Fitting Cubic Spline Fit Exponential Fit v Exponential Fit Interval Gauss Fit Gauss Fit Interval General Least Squares Fit Goodness of Fit Linear Fit Linear Fit Interval Logarithm Fit Logarithm Fit Interval Nonlinear Fit Polynomial Fit Power Fit Power Fit Interval Remove Outliers ALN NE NEN SENN SN NEN S Statistics 1D 2D and 3D ANOVA Chi Square Distribution erf x and erfc x F Distribution SINSIN IS National Instruments Corporation Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis Visual C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Histogram v v Inverse Chi Square Distribution v
147. om Chapter 3 Measurement Studio Visual C Class Libraries Additional Operations Configure cursor snap modes to be fixed floating nearest point and to plot Pan and zoom interactively Configure the graph for fixed strip or scope charting Customize the graph by using ticks labels and value pairs Bind properties to a DataSocket source or target You use binding to read property values from a source and write property values to a target Q Tip For more information about easily using the graph control refer to the Using the Measurement Studio Graph Visual C Control section in the NI Measurement Studio Help Knob Control Use the Measurement Studio ActiveX knob control as shown in Figure 3 4 to display numerical information The CNiKnob class provides the Visual C interface to the ActiveX knob control Knob Control with Knob Dial and Meter Styles Figure 3 4 ActiveX Knob Control with Knob Dial and Meter Styles With the knob control and the classes that interface with the control you can perform the following operations National Instruments Corporation Use different display styles knobs dials and meters Use multiple control pointers each representing one scalar value A control pointer indicates the current value of the knob Use the CNiAxis class to interface to a single axis of a knob control This feature allows you to modify the appearance and behavior of the axis 3 21 Measurem
148. onsole but keep the application running Measurement Studio User Manual 5 26 ni com Chapter 5 Getting Started with Measurement Studio Setting up a Windows Forms project 1 Select Start All Programs Microsoft Visual Studio 2005 Microsoft Visual Studio 2005 2 Select File New Project The New Project dialog box launches New Project Project types Templates E Visual Cs Visual Studio installed templates Windows E Smart Device Fn windows Application mu Class Library Database Starter Kits My Templates Measurement Studio Web Other Languages Other Project Types aa Search Online Templates A project for creating a Measurement Studio ci application with a Windows user interface Name WindowsNetwrkVariableReader Location C Documents and Settings AdministratorlMy DocumentslVisual Studio 2005 Projects v Browse Solution Name WindowsNetworkVariableReader Create directory For solution Cancel 3 Inthe Project types pane select Measurement Studio under Visual Cit or Visual Basic depending on which language you want to create the project in 4 Inthe Templates pane select NI Windows Application Name the project WindowsNetworkVariableReader and specify a Location you wish to save to project by clicking Browse and navigating to a directory of your choice 5 Click OK The Measurement Studio Application Wizard launches National Instruments Corporat
149. ontrol Make the control background transparent Configure the LED controls to blink while they are on or off and configure the rate at which the LED controls blink Configure the layout of the control to be horizontal or vertical Bind the value of the control to a data source Mark an array of Boolean controls so that only one can be true at a time Q Tip For more information about using the switch and LED array controls refer to the Using the Measurement Studio Control Array NET Controls topic in the NI Measurement Studio Help Measurement Studio User Manual 2 36 ni com Chapter 2 Measurement Studio NET Class Libraries Numeric Edit Array Control Use the Measurement Studio numeric edit array control as shown in Figure 2 11 to control and visualize values of an array of double values With the numeric edit array control and the classes that interface with the control you can perform the following operations 2e 000 2e 000 4 4 2e 000 Figure 2 11 Numeric Edit Array Control e Set values by passing an array of data e Modify the number of controls displayed based on the length of the array of values you specify e Use up and down buttons for easy incrementing and decrementing e Perform range checking e Set the minimum range value to negative infinity and the maximum range value to positive infinity e Create custom formats or use built in numeric formats including generic engineering a
150. or operation that begins and returns control to the program only when the operation is complete A control used to input or display numerical data NI DAQmx a set of channels and the channel configurations timing and triggering and other details that define a measurement or generation you want to perform Measurement Studio User Manual G 10 ni com TCP IP TestStand thermometer U UI uplevel browser V vector virtual instrument VI VISA VXI W waveform graph National Instruments Corporation G 11 Glossary Transmission Control Protocol Internet Protocol A standard format for transferring data in packets from one computer to another The two parts of TCP IP are TCP which deals with the construction of data pockets and IP which routes them from computer to computer Ready to run test executive from National Instruments for organizing controlling and executing your automated prototype validation or manufacturing test systems A control used to input or display numerical data User Interface Recent generation Web browser that supports rich client interaction and functionality See also downlevel browser 1D array Program in Measurement Studio that models the appearance and function of a physical instrument Driver software architecture developed by National Instruments to unify instrumentation software for serial GPIB and VXI instruments or controllers It has been accepted as
151. oscaling including autoscaling based on the visible data only strip chart or scope chart Use logarithmic axes with configurable bases Interactively change the range of an axis and invert the axis at run time by clicking on the axis end labels Display origin lines Display captions on the axis Display grid lines Position the axis to display on one or both sides of the graph s plot area Configure major minor and custom divisions and origin lines Cursor Operations Measurement Studio User Manual Use cursors to identify key points in plots and the plot area Configure cursor snap modes to be fixed floating nearest point or to plot 2 24 ni com Chapter 2 Measurement Studio NET Class Libraries Use cursor labels to display X and Y data coordinates in a customized format that the cursor crosshair points to and customize the text font and colors of the label Create custom point and line styles for cursors Interactively move the cursor by clicking and dragging the vertical or horizontal crosshair or the center of the cursor Programmatically move the cursor to previous or next position or to a specified coordinate Create custom mouse cursors programmatically or at design time using the mouse cursor style editor Annotation Operations Configure text labels arrows and drawing shapes to annotate a point anywhere in the plot area of the graph Configure range area text labels and arrows to annotat
152. otes instrument drivers discussion forums and a measurement glossary Select Measurement Studio Online Resources Search Technical Support to access this menu item Measurement Studio Online Resources NI Developer Zone NI Developer Zone zone ni com provides access to online example programs tutorials technical news and a Measurement Studio Discussion Forum where you can participate in discussion 4 3 Measurement Studio User Manual Chapter 4 Measurement Studio Integrated Tools and Features forums for Visual Basic 6 0 Visual C and NET Languages Select Measurement Studio Online Resources NI Developer Zone to access this menu item Patents Use the Patents dialog box to view information about NI patents Licenses Use the Licenses dialog box to view information about NI licenses About Measurement Studio Use the Measurement Studio About box to view version information Preferences Use the Measurement Studio Preferences dialog box to configure Measurement Studio settings such as conversion options and add in preferences Select Tools Options to access this menu item Q Tip For more information about the resources included in the Measurement Studio Menu refer to the Measurement Studio Menu topic in the NI Measurement Studio Help Creating a Measurement Studio Project Measurement Studio includes class library and application templates that you can use to quickly create measurement applications with Vis
153. ou can create an array of Measurement Studio controls that behave as a single unit For example you can use these array controls to visualize and control ports of a digital line or values of an array Measurement Studio includes switch LED and numeric edit array controls You can create control arrays of other controls if those controls meet the constraints of the generic type parameter TControl National Instruments Corporation 2 35 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Switch and LED Array Controls Use the Measurement Studio switch and LED array controls as an array of Boolean controls on a Windows Forms user interface You typically use a switch array control as shown in Figure 2 10 to control ports of a digital line or values of an array You typically use an LED array control as shown in Figure to visualize ports of a digital line or values of an array Figure 2 10 Switch and LED Array Controls With the switch and LED array controls and the classes that interface with the controls you can perform the following operations Set values by passing an array of data Modify the number of controls displayed based on the length of the specified values Receive notification before or after the state of the control changes Configure how the control behaves when you click it with the mouse or press the spacebar when the control has focus Configure the appearance of the c
154. our measurement type 0 Tip For more information about using the DAQ Assistant to create a Measurement Studio NI DAQmx application refer to the Creating a Measurement Studio NI DAQmx Application section in the NI Measurement Studio Help Creating an NI DAQmx User Interface Using the Configure DAQ Component UI wizard as shown in Figure 4 4 you can customize and preview a user interface and code for your task The wizard also generates event handlers and code to acquire data and present it on your generated user interface Generate DAQ UI Configure DAQ Component UI The user interface will be created for the DAQ component with the specified settings Options Preview False v El Fem E Code Error handler daqT askComponer Generate error handler True 10 Graph name waveformGraph1 Read button name button Read click handler button Click Read completed handler daqT askComponer Asynchronous read Specifies if the read operation will be performed asynchronously Figure 4 4 Configure DAQ Component UI Wizard Q Tip For more information on how to create an NI DAQmx user interface refer to the Using a NET DAQ Component in a Project topic in the NI Measurement Studio Help Measurement Studio User Manual 4 8 ni com Chapter 4 Measurement Studio Integrated Tools and Features Creating NI DAQmx User Code in Visual C You can create NI DAQmx user code in Visual C The DAQmx User Code wizard wraps the configured DAQmx tas
155. ox that displays current configuration information and allows users to modify the configuration PCI eXtensions for Instrumentation Rugged open platform for modular instrumentation with specialized mechanical electrical and software features Refer to www pxisa org for more information National Instruments Corporation G 9 Measurement Studio User Manual Glossary R range scalar scale scatter graph scope serial slide slider smart tag switch synchronous tank task Region between the limits within which a quantity is measured received or transmitted The range is expressed by stating the lower and upper range values Number that a point on a scale can represent The number is a single value as opposed to an array Part of graph chart and some numeric controls and indicators that contains a series of marks or points at known intervals to denote units of measure A control that displays two dimensional data on a Windows Forms or Web Forms user interface displays a graph of X and Y data pairs See oscilloscope Standard serial bus on a computer used to communicate with instruments Also known as RS 232 A control used to input or display numerical data Moveable part of a slide control A glyph attached to a Measurement Studio control or component that exposes commonly performed tasks A control used to receive and control Boolean input in an application user interface Property
156. p it onto the form Repeat this step to add a second text box to the form The following screenshot shows the controls on the form Form1 6 Double click the Button control to display the Form1 code with the National Instruments Corporation cursor inside the click event handler of the button control 5 57 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio 7 Add the following code to display the vendor and model name of your instrument in the text boxes VB NET Declare an instance of VisaTask Dim myTask As New VisaTask Dim results As VisaTaskResults Display the data in the text boxes results myTask Run textBoxl Text results Vendor textBox2 Text results Device C Declare an instance of VisaTask VisaTask myTask new VisaTask Display the data in the text boxes VisaTaskResults results myTask Run textBoxl Text results Vendor textBox2 Text results Device iy Note Your sample code will be different depending on the instrument actually used 8 Build and run the application 9 Click the Button on the form to run the task The following screenshot shows the controls on the form with sample returned data Form1 National Instruments GPIB and Serial Device 3 Note Although this walkthrough only covers the use of a simple Query and Parse step the Instrument I O Assistant offers additional capabilities such as independent Writ
157. plication by taking you through the following steps e Writing an array of data to the server Using NationallInstruments NetworkVariable NetworkVariable BufferedWriter TValue you will create and run a console application that writes an array of values to the server Setting up a Web Forms project Using the Measurement Studio Application Wizard you will create a new project that references the Measurement Studio Network Variable class library and Web Forms controls Configuring the network variable data source control Using the Toolbox and the NationalInstruments NetworkVariable WebForms NetworkVariableDataSource smart tag you will add and configure a data source control to your application Displaying the array of data on a Web page Using the Toolbox you will add and configure an NationalInstruments UI WebForms AutoRefresh control and a NationalInstruments UI WebForms WaveformGraph control to display the data Before you begin The following components are required to complete this walkthrough e Microsoft Visual Studio 2005 or Visual Studio 2008 e Measurement Studio 8 0 1 or later Professional or Enterprise package for Visual Studio 2005 or Measurement Studio 8 5 or later Professional or Enterprise package for Visual Studio 2008 National Instruments Corporation 5 31 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio Writing an array of data to the server 1 Select Sta
158. pper right corner of the control 9 Type Plot for the Name Click OK 10 Before you add the Measurement Studio legend numeric edit and gauge controls you need to resize the form to accommodate them Select the form and use the double sided arrow to resize it 11 Select the Legend control and drag and drop it onto the form 12 Select the NumericEdit control and drag and drop it onto the form 13 Select the Gauge control and drag and drop it onto the form 14 Click the gauge smart tag to display the Gauge Tasks Measurement Studio User Manual 5 6 ni com Chapter 5 Getting Started with Measurement Studio iij KI Gauge Tasks 4 6 i p pause a Appearance L2 8 Dial Color White v Gauge Style SunkenWithThickNeedle w T Pointer Color lo Black v Spindle Color Gainsboro v Scale Arc 240 300 v Value 0 Behavior Coercion Mode Mone v Coercion Interval 1 Interaction Mode Indicator v Range 0 10 v Edit Range Fills Edit Custom Divisions Auto Format 15 Type gauge for the name of the gauge The following screenshot shows Form1 with the user controls Form1 National Instruments Corporation 5 7 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio Generating plotting and analyzing the data 1 Double click the button control to display the Form1 code with the cursor inside the click event handler of the button control 2 Add the followin
159. r 5 Getting Started with Measurement Studio 4 Inthe Network VariableDataSource smart tag select Edit Bindings to launch the Network VariableBinding Collection Editor dialog box A NetworkVariableDataSource Tasks ic networkVariableDataSourcet Connection Timeout NIRE v Write Timeout 00 00 10 v Edit Bindings 5 Select Add to create a connection with the underlying network variable You can use the Network VariableBinding Collection Editor to configure the binding properties Enter 0 as the DefaultReadValue NetworkVariableBinding Collection Editor Members Binding1 properties Erin El Behavior BindingMode Read ConnectionTimeout 00 00 10 PEE E om Binding1 WriteTimeout 00 00 10 6 For the Location browse to the localhost System double location in the Select Network Item dialog box Select Network Item Location Mlocalhost S ystem double E K localhost amp C3 System E couse E amp J Network Neighborhood National Instruments Corporation 5 29 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio Measurement Studio User Manual Click OK to return to the Network VariableBinding Collection Editor dialog box After you configure the binding properties click OK to return to the Windows Forms Designer Displaying the array of data on a Windows form 1 2 Select WaveformGraph in the Toolbox and drag and drop it on the form
160. r level software to control and communicate with DAQ hardware NI DAQ is an extensive library of VIs and functions you can call from an application development environment ADE to program all the features of an NI measurement device such as configuring acquiring and generating data from and sending data to the device The latest NI DAQ driver with new VIs functions and development tools for controlling measurement devices The advantages of NI DAQmx over earlier versions of NI DAQ include the DAQ Assistant for configuring channels and measurement tasks for your device for use in LabVIEW LabWindows CVI and Measurement Studio increased performance such as faster single point analog I O and a simpler API for creating DAQ applications using fewer functions and VIs than earlier versions of NI DAQ Driver level software to control and communicate with National Instruments image acquisition hardware A control used to display and edit numeric values OLE Control eXtension Another name for ActiveX controls reflected by the ocx file extension of ActiveX control files Object Linking and Embedding See also ActiveX OLE for Process Control An industry standard based on ActiveX and COM technologies that enables you to create a single client application that can communicate with disparate devices Refer to www opcfoundation org for more information Measurement instrument widely used in high speed testing applications such as teleco
161. rial Modified Bessel Ist Modified Bessel 2nd Parabolic Cylinder Psi Sine Integral Spherical Bessel 1st ON SOS ERT RS SON SP TOT OSS ASE RENT ORS SN OSS Spherical Bessel 2nd National Instruments Corporation 2 13 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis NET Library Professional Package Enterprise Package Stirling v Struve v Tricomi v Zeta v Q Tip For more information about analyzing or generating data with the Analysis class library refer to the Using the Measurement Studio Analysis NET Library topic in the NI Measurement Studio Help For more information about the functionality included in the Analysis class library visit ni com analysis and select Analysis in Measurement Studio Common The Measurement Studio Common NET class library is in the NationallInstruments namespace The Common class library provides a set of classes that facilitates the exchange of data between the acquisition analysis and user interface portions of your application The Common class library includes the following features Measurement Studio User Manual A ComplexDouble data type This data type represents a complex number of type Double that is composed of a real part and an imaginary part
162. roject Measurement Studio User Manual 5 32 ni com Chapter 5 Getting Started with Measurement Studio 7 Select Network Variable Communication Library Click Finish Measurement Studio Visual CZ Windows Application Wizard Measurement Studio Class Libraries Select the class libraries you want to include in the project C Enterprise Analysis Library amp 7 Measurement Studio Hardware Class Libraries C DataSocket Communication Library NetworkVariable Communication Library C Windows Forms User Interface Control Library 8 InProgram cs add the following code to write an array of data to the server VB NET Imports NationalInstruments NetworkVariable Imports System Threading Imports System Module Module1 Private Function GenerateDoubleArray ByVal phase As Double As Double Sub Dim values 999 As Double Dim x As Integer For x 0 To 999 values x Math Sin 2 Math PI x 1000 phase 2 Next x Return values Function Main Const location As String localhost system double Dim bufferedWriter As NetworkVariableBufferedWriter Of Double New NetworkVariableBufferedWriter Of Double location National Instruments Corporation 5 88 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio bufferedWriter Connect Dim phase As Integer 0 While True Dim values As Double GenerateDoubleArray phase Console WriteLine Writing Array b
163. rt All Programs Microsoft Visual Studio 2005 Microsoft Visual Studio 2005 or Start All Programs Microsoft Visual Studio 2008 Microsoft Visual Studio 2008 2 Select File New Project The New Project dialog launches New Project Project types Templates Visual Cs Visual Studio installed templates Windows E Smart Device EE Windows Application eu DAQ Windows Application Database SENI Windows Application SENI VISA Windows Application Starter Kits G2 Class Library A Windows Control Library Measurement Studio Console Application jslCrystal Reports Application E Other Languages ci Device Application E Other Project Types My Templates Search Online Templates 4 project for creating command line application Name NetworkVariable writer Location C Documents and Settings Administrator My Documents Visual Studio 2005 Projects I Browse Solution Name NetworkVariableWriter Create directory for solution 3 Inthe Project Types pane select Visual C or Visual Basic depending on which language you want to create the project in 4 Inthe Templates pane select Console Application Specify NetworkVariableWriter for Name and specify a Location of your choice Click OK 6 Select Measurement Studio Add Remove NET Class Libraries The Measurement Studio Add Remove Class Libraries wizard launches You use this wizard to add Measurement Studio components to your p
164. s i Printing i Dialogs Crystal Reports ht Pointer NU WaveformGraph T ScatterGraph DigitalWaveformGraph a ComplexGraph EJ Legend E Gauge 223 Knob SU Meter 3 Slide u Tank Thermometer 03 NumericEdit amp Switch Led ra NumericEdit rray Ad Switcharray Ledarray PropertyEditor A InstrumentControlStrip amp amp DaqComponent amp NetworkYariableDataSource S5 NetworkvariableBrowserDialog General 7 Select the WaveformGraph control and drag and drop it onto the form 8 Right click the waveform graph and select Edit Plots to display the WaveformPlot Collection Editor dialog box You use the WaveformPlot Collection Editor dialog box to add or remove plots and to configure plot properties National Instruments Corporation 5 5 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio WaveformP lot Collection Editor Members 0 Plot Plot properties esl m ApplicationSettin Tag El Design Name Plot GenerateMember True Modifiers Private Fill Lines To Base BasePlot L none BasexValue 0 BaseY Value 0 FillBase EB value FillMode Gl None FillToBaseColor BH Firebrick mum 4 v AA Note You can also access the WaveformPlot Collection Editor dialog box by clicking the waveform graph smart tag To access the smart tag left click on the control to select it and then left click on the arrow button in the u
165. s library 3 14 complex graph control 2 28 2 44 conventions used in the manual x creating Measurement Studio Application with Web Forms Controls and Analysis in Visual Studio 2005 walkthrough 5 11 Measurement Studio Application with Web Forms Controls and Network Variable in Visual Studio 2005 walkthrough 5 31 Measurement Studio Application with Windows Forms Controls and Analysis walkthrough 5 2 Measurement Studio Application with Windows Forms Controls and Network Variable walkthrough 5 22 Measurement Studio Instrument I O Application walkthrough 5 52 Measurement Studio NI DAQmx application 4 6 Measurement Studio NI DAQmx Application walkthrough 5 42 new Measurement Studio project 4 4 NI DAQmx user code 4 9 NI DAQmx user interface 4 8 D DAQ Assistant 4 6 data acquisition DAQ 2 17 3 16 DataSocket NET class library 2 16 Declaration of Conformity NI resources A 2 Measurement Studio User Manual Index deployment requirements 1 4 developing with Measurement Studio 4 1 diagnostic tools NI resources A 1 digital waveform graph control 2 26 2 42 documentation conventions used in the manual x how to use manual set ix NI resources A 1 drivers NI resources A 1 E examples NI resources A 1 G gauge control 2 30 2 46 graph control 3D 3 2 ActiveX 3 20 complex 2 28 2 44 digital waveform 2 26 2 42 scatter 2 23 2 39 waveform 2 23 2 39 H help NI Measure
166. s you work through this manual you will see italicized references to relevant help topics To find these topics use the table of contents in the NJ Measurement Studio Help installed on your machine The following resources also are available to provide you with information about Measurement Studio Measurement Studio User Manual Getting Started information Refer to the Measurement Studio Core Overview topic and the Getting Started with the Measurement Studio Class Libraries section in the NI Measurement Studio Help for an introduction to Measurement Studio and for walkthroughs that guide you step by step in learning how to develop Measurement Studio applications For an introduction to Measurement Studio resources refer to the Using the Measurement Studio Help topic in the NI Measurement Studio Help Examples Measurement Studio installs examples organized by class library depending on the component the version of Visual Studio or the NET Framework that the example supports the version of Measurement Studio installed on the system and the operating system For more information on example locations refer to the Where to Find Examples topic in the NI Measurement Studio Help NI Technical Support Refer to Appendix A Technical Support and Professional Services for more information Measurement Studio Web site ni com mstudio Contains Measurement Studio news support downloads white papers product tutorials and evaluatio
167. ssional and Enterprise Packages Analysis Visual C Library Professional Package Enterprise Package Measurements AC and DC Estimator S Amplitude and Phase Spectrum lt S Auto Power Spectrum Cross Power Spectrum Harmonic Analyzer Impulse Response Function Network Functions avg Power and Frequency Estimate Scaled Time Domain Window Spectrum Unit Conversion Transfer Function St NEAT SEAN RSIS Signal Generation Arbitrary Wave v Chirp Pattern v Gaussian White Noise v Impulse Pattern Pulse Pattern Ramp Pattern Sawtooth Wave Sinc Pattern Sine Pattern Sine Wave NUS NS RSIS OSS National Instruments Corporation 3 5 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis Visual C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Square Wave v v Triangle Wave v v Uniform White Noise v v Windowing Blackman Window v y Blackman Harris Window v v Blackman Nuttall Window v v Cosine Tapered Window v v Dolph Chebyshev Window v v Exact Blackman Window v v Exponential Window v v Flat Top Window v v Force Windo
168. sual C Measurement Studio includes the following Visual C class libraries 3D Graph Analysis Common DataSocket Microsoft Excel Interface Microsoft Word Interface NI 488 2 NI DAQmx NI Reports NI VISA User Interface Utility This class library is not supported in Visual Studio 2008 2 This class library is not supported in Visual Studio 2008 3 This class library is not supported in Visual Studio 2008 National Instruments Corporation 3 1 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Refer to the following sections for information about each Measurement Studio Visual C class library ActiveX Controls in Visual C ActiveX controls are specialized COM servers that implement a specific set of interfaces The Measurement Studio Visual C button graph knob numeric edit slide and 3D graph are ActiveX controls Measurement Studio includes classes that provide native C interfaces to the ActiveX controls For example the CNiGraph class provides an interface to the CWGraph ActiveX graph control The Measurement Studio classes that provide interfaces to the Measurement Studio ActiveX controls simplify using ActiveX controls in Visual C interfaces and programs The features that simplify this process include overloaded functions the ability to call the control from any thread and automatic data type translations 3D Graph Control Use t
169. symbols and descriptions for a specific set of elements of another object such as the plots or cursors of a graph When you associate the legend control with another object any changes you make to that object are automatically reflected in the legend For example if you associate the legend control with the plots of a graph any changes you make in the plots collection editor are automatically reflected in the legend Tip For more information about using the legend control refer to the Using the Measurement Studio Web Forms Legend NET Control section in the NI Measurement Studio Help Numeric Controls Use the Measurement Studio numeric controls to display numerical information in an ASP NET Web application with the look of scientific instruments The numeric controls include a knob gauge meter slide thermometer and tank The following sections describe operations available with the controls and the classes that interface with them Measurement Studio User Manual 2 46 ni com Chapter 2 Measurement Studio NET Class Libraries With all of the numeric controls and the classes that interface with them you can perform the following operations Configure the scale to be linear or logarithmic and toggle the visibility of the scale Fill the scale and configure the range color dimensions and style of the fill Connect to a Measurement Studio NET numeric edit control so that if you change the value of one control it changes the v
170. t are versioned and deployed as a unit An assembly is the primary building block of a NET Framework application All managed types and resources are contained within an assembly and are marked either as accessible only within the assembly or as accessible from code in other assemblies Function that begins an operation and returns control to the program prior to the completion or termination of the operation Measurement Studio User Manual Glossary button C channel chart client callback CodeBuilder A control used to input or display Boolean information or to initiate an action in a program 1 Physical a terminal or pin at which you can measure or generate an analog or digital signal A single physical channel can include more than one terminal as in the case of a differential analog input channel or a digital port of eight lines The name used for a counter physical channel is an exception because that physical channel name is not the name of the terminal where the counter measures or generates the digital signal 2 Virtual a collection of property settings that can include a name a physical channel input terminal connections the type of measurement or generation and scaling information You can define NI DAQmx virtual channels outside a task global or inside a task local Configuring virtual channels is optional in Traditional NI DAQ and earlier versions but is integral to every measurement you take in NI D
171. te Measurement Studio Project References Updates any outdated Measurement Studio references to the latest version installed on the system NI Tools Measurement amp Automation Explorer MAX Use MAX to configure NI hardware add new channels interfaces and tasks execute system diagnostics and view devices and instruments connected to the system Select NI Tools Measurement amp Automation Explorer MAX to access this menu item The MAX menu option is available only if you have MAX installed NI Tools NI Spy Use NI Spy to monitor record and display National Instruments API calls made by instrument connectivity applications Use NI Spy to quickly locate and analyze any erroneous National Instruments API calls that an application makes and verify 4 2 ni com National Instruments Corporation Chapter 4 Measurement Studio Integrated Tools and Features that the communication with an instrument is correct Select NI Tools NI Spy to access this menu item The NI Spy menu item is available only if you have NI Spy installed NI Tools Variable Manager Use Variable Manager to create new processes and variables delete existing processes and variables start and stop processes create variables with specific data types or the variant data type allow multiple writers or restrict write access to a single client and configure server buffering Select NI Tools Variable Manager to access this menu item NI Measurement Studi
172. tion Mocalhost E E3 System E a Network Neighborhood Click OK to return to the Network VariableBinding Collection Editor dialog box After you configure the binding properties click OK to return to the ASP NET Designer Displaying the array of data on a Web page 1 Select WaveformGraph in the Toolbox and drag and drop it on the form Select AutoRefresh in the Toolbox and drag and drop it on the form In the AutoRefresh smart tag check Enabled Select Edit Default Refresh Items to launch the RefreshItem Collection Editor dialog box IJ AutoRefresh Tasks hutoRefresh AutoRefresh1 ID Enabled Interval 00 00 03 000 v Edit Default Refresh Items Measurement Studio User Manual 5 40 ni com Chapter 5 Getting Started with Measurement Studio 4 Select Add Select WaveformGraph1 for the ItemID and click OK Refreshltem Collection Editor Members NationalInstruments UI RefreshItem properti o NationalInstruments UI RefreshItqlile s 4l El Behavior ItemID WaveformGraphi v d 5 Double click the AutoRefresh control Add the following code to the AutoRefresh event handler to bind the waveform graph control to the network variable data source control VB NET WaveformGraphl BindingData NetworkVariableDataSourcel Bindings 0 GetValue C WaveformGraphl BindingData NetworkVariableDataSourcel Bindings 0 GetValue National Instruments Corporat
173. tion Explorer to display the Solution Explorer Double click Visa Task mxb in the Solution Explorer to launch the Instrument I O Assistant Measurement Studio User Manual 5 54 ni com Chapter 5 Getting Started with Measurement Studio Performing a query on the instrument nye Note This walkthrough was created using the NI Instrument Simulator Any identification information or sample code generated for this device will be different depending on the instrument actually used 1 The Select Instrument step automatically appears in the Step Sequence window when you launch the Instrument I O Assistant Select the instrument you want to communicate with or the port to which your instrument is connected from the Select an instrument drop down listbox 2 Select Add Step and then select Query and Parse from the expanded list You use a Query and Parse step to both write a command to an instrument and read the instrument s response Dc S ELE write a Read and Parse rite and read from a message based instrument and parse the response 3 Enter the command idn and click Run this step The idn command is a standard instrument command for querying an instrument s identification information If your instrument does not support the idn command refer to the documentation for the instrument for more information about the instrument s command set gt Run this step Enter a command click Run to send command Termination char
174. tional Instruments Corporation 5 35 Measurement Studio User Manual Chapter 5 Getting Started with Measurement Studio Setting up a Web Forms project 1 Select Start All Programs Microsoft Visual Studio 2005 Microsoft Visual Studio 2005 or Start All Programs Microsoft Visual Studio 2008 Microsoft Visual Studio 2008 2 Select File New Web Site The New Web Site dialog box launches New Web Site Templates Visual Studio installed templates ASP NET Web Site PI ASP NET Web Site 2 ASP NET Web Service Personal Web Site Starter Kit B Empty Web Site B ASP NET Crystal Reports Web Site My Templates Ej Search Online Templates A Measurement Studio ASP NET web site Location File System C Documents and Settings MyMeasurementStudiowebSite v Browse Language Visual C 3 Inthe Templates pane select NI ASP NET Web Site Select File System for Location and specify a file path of your choice 4 Use the drop down box to select Visual Cft or Visual Basic depending on which language you want to create the project in 5 Click OK The Measurement Studio ASP NET Web Site Wizard launches Measurement Studio User Manual 5 36 ni com Chapter 5 Getting Started with Measurement Studio 6 Select Network Variable Communication Library and Web Forms User Interface Control Library Measurement Studio ASP NET Web Site Wizard Measurement Studio Class Libraries NATIONAL Select the class
175. trix Complex QR Factorization with Pivot Vector Complex QZ Decomposition Complex Schur Decomposition Complex Solve Linear Equations Multiple Right Hand Complex Solve Linear Equations Single Right Hand S Complex SVD Factorization Complex Vector Norm Determinant Dot Product Forward Substitution General Eigen AB Hessenberg Decomposition Inverse Matrix Linear Equations LU Factorization Matrix Balance Matrix By Vector Multiplication SIN NISUS SINSI SINSI SI SI S National Instruments Corporation 2 9 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Table 2 1 Analysis NET Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis NET Library Professional Package Enterprise Package Matrix Condition Number v v Matrix Multiplication Matrix Norm Matrix Rank Outer Product Pseudo Inverse Matrix NISCSCSIS QR Factorization QR Factorization with Pivot Matrix AL SENN SN NSIS QR Factorization with Pivot Vector E QZ Decomposition NI Schur Decomposition S Solve Linear Equations Multiple Right Hand lt S Solve Linear Equations Single Right Hand S Special Matrix SVD Factorization Test Positive Definite Matrix v Trace
176. tudio NET Class Libraries Axis Operations Configure a graph to include multiple axes or independent ranges so that plot data fits the graph plot area Configure the axis modes to fixed autoscaling including autoscaling based on the visible data only strip chart or scope chart Interactively change the range of an axis and invert the axis at run time by clicking on the axis end labels Display origin lines and grid lines Configure major minor and custom divisions and origin lines Position the axis to display on one or both sides of the graph s plot area Display captions on the axis Cursor Operations Use cursors to identify key points in plots and the plot area Configure cursor snap modes to be fixed floating nearest point or to plot Use cursor labels to display X and Y data coordinates that the cursor crosshair points to and customize the text font and colors of the label Create custom point and line styles for cursors Configure the graph to display cursors that are used to determine the real imaginary magnitude and phase data coordinates of a point on the plot area Create custom mouse cursors programmatically or at design time using the mouse cursor style editor Annotation Operations National Instruments Corporation Configure text labels arrows and drawing shapes to annotate a point anywhere in the plot area of the graph Configure range area text labels and arrows to annotate a
177. ual Basic NET Visual C ASP NET and Visual C Refer to the following sections Walkthrough Creating an Application with Windows Forms Controls and Analysis or Walkthrough Creating an Application with Web Forms Controls and Analysis for step by step instructions on how to create a Measurement Studio project Use the Visual Studio New Project dialog box as shown in Figure 4 1 to access these templates and to create projects You can create the following projects in Measurement Studio Measurement Studio User Manual Measurement Studio Visual Basic NET project Measurement Studio Visual C project Measurement Studio ASP NET Web site Measurement Studio Visual C project Measurement Studio Visual C project with LabWindows CVI libraries 4 4 ni com New Project Project types E Visual Basic Windows Smart Device Database Starter Kits Measurement Studio Visual C Windows H Smart Device Database Starter Kits Measurement Studio Visual J amp Visual C Other Project Types Chapter 4 Measurement Studio Integrated Tools and Features Templates Visual Studio installed templates E wT Windows Application gM Class Library My Templates amp Search Online Templates 4 project For creating a Measurement Studio C application with a Windows user interface Name ReaderWriter Location C Documents and Settings Administrator My Documents Visual Studio 2005 Projects v Browse
178. udio numeric edit control as shown in Figure 2 6 to display numeric values and to provide a way by which end users can edit numeric values Typically you use a numeric edit control to input or display double numerical data instead of using a Windows Forms TextBox or NumericUpDown control 5 000 kHz Figure 2 6 Numeric Edit Windows Forms Control Measurement Studio User Manual 2 32 ni com Chapter 2 Measurement Studio NET Class Libraries With the numeric edit control and the classes that interface with the control you can perform the following operations e Use up and down buttons for easy incrementing and decrementing e Perform range checking e Set the minimum range value to negative infinity and the maximum range value to positive infinity e Create custom formats or use built in numeric formats including generic engineering and simple double You can use these numeric formats with other Measurement Studio user interface controls such as the waveform graph and numeric pointer controls e Connect to a Measurement Studio numeric control so that if you change the value of one control it changes the value of the other control e Setthe coercion mode property to discrete or continuous values This property configures the control to allow entry or display of either a discrete set of values or any value e Setthe interaction mode to keyboard and mouse keyboard only mouse only or none Tip For more information
179. ufferedWriter WriteValue values Thread Sleep 500 phase phase 1 End While End Sub End Module C using System using System Threading using NationalInstruments NetworkVariable namespace NetworkVariableWriter class Program private static double GenerateDoubleArray double phase double values new double 1000 for int x 0 x lt 1000 x values x Math Sin 2 Math PI x 1000 phase 2 return values static void Main string args const string Location localhost system double NetworkVariableBufferedWriter lt double gt bufferedWriter new NetworkVariableBufferedWriter lt double gt Location bufferedWriter Connect int phase 0 while true double value GenerateDoubleArray phase Console WriteLine Writing array bufferedWriter WriteValue value Thread Sleep 500 phase Measurement Studio User Manual 5 34 ni com Chapter 5 Getting Started with Measurement Studio 9 Select Debug Start Without Debugging to run the application Writing Writing Writing Writing Writing Writing Writing Writing Writing Writing Writing Writing Writing Writing Writing Writing Writing array array array array array array array array array array array array array array array array array array array array cx C WINDOWS system32 cmd exe a 10 Minimize the console application but keep the application running Na
180. user interface and code for your task Generate DAQ UI Configure DAQ Component UI The user interface will be created for the DAQ component with the specified settings Options Preview False v El Fom E Code Error handler daqT askComponer Generate error handler True 10 Graph name waveformGraph1 Read button name button Read click handler button1_Click Read completed handler daqT askComponer Asynchronous read Specifies if the read operation will be performed asynchronously 2 Click Finish to generate the task user interface in your project form Measurement Studio User Manual 5 50 ni com Chapter 5 Getting Started with Measurement Studio Formi cs Form1 cs Design E Form daqTaskComponent1 The wizard also generates event handlers and code to acquire data and present it on your generated user interface Form1 cs Form1 cs Design Xx t MyDAQmxProject Form1 v g daqTaskComponent _Error abject sender Nationallr v go namespace MyDAOmxProject y n El public partial class Formi Form E public Formi i InitializeComponent F El private void buttonl Click object sender Eventirgs e NationalInstruments dnalogilaveform lt double gt acquiredDat waveformGraphi PlotWaveforms acquiredData El private void daqTaskComponenti Error object sender National TODO Handle DAQ errors string message e Exception Message MessageBox Show message D
181. using the numeric edit control refer to the Using the Measurement Studio Numeric Edit Visual C Control section in the NI Measurement Studio Help Measurement Studio User Manual 3 22 ni com Chapter 3 Measurement Studio Visual C Class Libraries Slide Control Use the Measurement Studio ActiveX slide control as shown in Figure 3 6 to display numerical data CNiS1ide is the class that provides the Visual C interface to the ActiveX slide control Figure 3 6 ActiveX Slide Control With the slide control and the classes that interface with the control you can perform the following operations e Use different display styles vertical horizontal tank and thermometer e Use the CNiAxis class to interface to a single axis of a slide control This ability allows you to modify the appearance and behavior of the axis e Use multiple control pointers each one representing one scalar value e Automatically label axes with log or inverted numeric scales and continuous or discrete values e Customize the slide by using ticks labels and value pairs Bindproperties to a DataSocket source or target You use binding to read property values from a source and write property values to a target Tip For more information about easily using the slide control refer to the Using the i Measurement Studio Slide Visual C Control section in the NI Measurement Studio Help Utility Use the Measurement Studio Utility Visua
182. w v d Gauss Window v v General Cosine Window v v Hamming Window v v Hanning Window v v Kaiser Window v v Scaled Time Domain Windows v v Symmetric Time Domain v v Windows Triangle Window v v Filters Bessel v v Butterworth v v Cascade v v Measurement Studio User Manual 3 6 ni com Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis Visual C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Chebyshev v v Elliptic v Equiripple FIR FIR Windowed IIR Cascade IIR Inverse Chebyshev Kaiser SON CSI SIS AS SS SIS SOS I SIUS Signal Processing Autocorrelation ES Convolution Cross Power Cross Correlation Decimate Deconvolution Derivative x t Discrete Cosine Transform Discrete Sine Transform Fast Hilbert Transform Fast Hartley Transform Integral x t Inverse Real and Complex Fast Fourier Transform FFT ALN NE NE SINISI SINISI SEN N NONE NEN SESE SN SENN Inverse Fast Hilbert Transform S S Inverse Fast Hartley Transform National Instruments Corporation 3 7 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis Visual C Library Measurement Types included in
183. y data sources and targets using a URL the same way you access Web pages in a Web browser e Use DataSocket Transfer Protocol DSTP to exchange different types of data e nteractively browse to quickly locate and select data items on other computers and servers Tip For more information about using DataSocket refer to the DataSocket Visual C m Class Library Overview topic in the NI Measurement Studio Help Microsoft Excel Interface Use the Measurement Studio Excel Visual C class library to automatically create Excel spreadsheets and charts from within measurement and automation applications Use the Microsoft Excel Interface class library to perform offline processing of the measurement and automation data you acquire and analyze using other Measurement Studio Visual C classes This class library is included only in the Measurement Studio Enterprise package This class library is not available in Visual Studio 2008 Tip For more information about using the Measurement Studio Excel Visual C class library to create applications that present data in Microsoft Excel format refer to the Microsoft Excel Interface Visual C Class Library Overview topic in the NI Measurement Studio Help National Instruments Corporation 3 15 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Microsoft Word Interface Use the Measurement Studio Microsoft Word Interface Visual C class library t
Download Pdf Manuals
Related Search
Related Contents
Gateway 7400 Server User Manual Smart MX44 Digitaler Satellitenreceiver DSL 250 PDF document - Eetasia.com 日本語リーフレット 仕様書 (PDF形式、257kバイト) IT-Indicatore magnetico con approvazione LLOYD`S Gamber-Johnson Support Brace - Long Soundstream Technologies Angina A4 Stereo Amplifier User Manual - Oracle Documentation Copyright © All rights reserved.
Failed to retrieve file