Home

Measurement Studio User Manual

image

Contents

1. Analysis NET Library Professional Package Enterprise Package Hanning Window Y Vv Kaiser Window Y Y Scaled Time Domain Windows Y Y Symmetric Time Domain Y Y Windows Triangle Window Y Y Filters Bessel Y Vv Butterworth Vv Vv Cascade Vv Vv Chebyshev Y Vv Elliptic Y Y Equiripple Vv FIR Vv Vv FIR Windowed Vv Y IIR Vv Vv IIR Cascade Vv Vv Inverse Chebyshev Y Y Kaiser Y Y Signal Processing Autocorrelation Y Y Convolution Vv Vv Cross Correlation Y Y Cross Power Y Y Decimate Y Y Deconvolution Y Vv Derivative x t Y Y 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 Discrete Cosine Transform Y Y Discrete Sine Transform Fast Hartley Transform Fast Hilbert Transform Integral x t Inverse Fast Hartley Transform Inverse Fast Hilbert Transform Inverse Real and Complex Fast Fourier Transform FFT KISIR ISI ISI ISIS KIKIRIKI SIS Peak Detection Power Spectrum Pulse Parameters Real and Complex FFT Threshold Peak Detector KISISISIS Unwrap Phase KISIRI SISIS Linear Algebra Back Tra
2. 0 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 NationalInstruments 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 e AComplexDouble data type This data type represents a complex number of type Double that is composed of a real part and an imaginary part e A DigitalWaveform data type This data type represents a set of digital states that are grouped by samples or signals Measurement Studio User Manual 2 12 ni com Chapter 2 Measurement Studio NET Class Libraries e 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 e An EngineeringFormatInfo class that defines a custom formatter to format numeric values with engineering notation and International System of Units SI prefixes and symbols 0 Tip For more detailed information about the Common class library refer to the
3. National Instruments Corporation 3 5 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Sine Pattern Y Sine Wave Square Wave Triangle Wave Uniform White Noise KISIS S KISIS S Windowing Blackman Window 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 Hamming Window Hanning Window Kaiser Window Scaled Time Domain Windows Symmetric Time Domain Windows QVISPNENESPNESESYT SSIES ESTES QVINSPSES ISISI S I R ISIR SISIESYSNYS Triangle Window s s Filters Bessel s s Butterworth Measurement Studio User Manual 3 6 ni com Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Cascade Y Y Chebyshev Y Elliptic Y Equiripple FIR FIR Windo
4. 4 National Instruments Corporation 4 35 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio 9 Select View Solution Explorer to display the Solution Explorer 10 Click the Show All Files icon Solution Explorer WindowsApplication 4 E lo Solution 7 ation7 1 proj ga Win Show All Files 3 References bin obj El App ico E AssemblyInfo cs Form cs al InstrumentDriverWrapper 1 cs lr licenses licx 11 Double click the VisaNSTask1 cs file to view the code that the Instrument I O Assistant generated for you Displaying Instrument 1 0 Assistant data on your user interface 1 Double click to open Form1 cs 2 Select View Toolbox to display the Toolbox 3 Select the WindowsForms tab on the Toolbox 4 Select the Button control and drag and drop it onto the form 5 Select the TextBox control and drag and drop 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 cursor inside the click event handler of the button control Measurement Studio User Manual 4 36 ni com Chapter 4 Developing 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 variable values for vendor and model Dim v
5. The Measurement Studio user interface controls are in the Windows Forms NET class library The Windows Forms NET class library is in the NationaliInstruments UI WindowsForms namespace The Windows Forms class library encapsulates the following Measurement Studio user interface controls e Waveform graph e Scatter graph e Digital waveform graph e Complex graph National Instruments Corporation 2 15 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries e Legend e Knob e Gauge e Meter e Slide e Thermometer e Tank e Numeric edit e Switch e LED e Property editor 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 user interface controls Tip For more information about easily using the NET user interface controls refer to z the Using the Measurement Studio Windows Forms NET Controls section in the NI Measurement Studio Help 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 data that is uniformly spaced in one dimension U
6. PID plot 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 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 telecommunication physical layer testing video testing and high speed digital design verification 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
7. 7 Measurement Studio Visual C Knob Control sections 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 q j 1e 002 4 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 using the numeric edit control refer to the Using the Measurement Studio Visual C Numeric Edit Control section in the NI Measurement Studio Help National Instruments Corporation 3 23 Measurement Studio User Manual 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
8. FTP OPC logos Lookout objects and file servers over the Internet It provides one common API to a number of different communication protocols Measurement Studio User Manual Glossary device digital I O digital waveform graph distribution DLL DMM driver DSTP E Ethernet event executable 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 Digital Waveform data on a Windows Forms user interface the Digital Waveform 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 Digital Multimeter A common measurement instrument that measures resistance current and voltage in a wide variety of applications Software that controls a specific hardware device such as a data acquisition board or GPIB interface
9. In order for links from Measurement Studio help topics to INET Framework help topics to work you must install the Microsoft NET Framework SDK 1 1 Deployment Requirements To deploy an application built with Measurement Studio NET class libraries the target computer must have a Windows 2000 XP XP x64 operating system and the NET Framework version 1 1 To deploy an application built with Measurement Studio Visual C class libraries the target computer must have a Windows 2000 XP XP x64 operating system Installation Instructions Measurement Studio 8 0 Professional and Enterprise packages include two CDs one with support for Visual Studio NET 2003 and one with support for Visual Studio 6 0 The Measurement Studio 8 0 Standard package includes one CD with support for Visual Studio NET 2003 This manual documents the Visual Studio NET 2003 CD For help with Visual Studio 6 0 refer to the Measurement Studio Support for Visual Studio 6 0 Readme located on the Measurement Studio for Visual Studio 6 0 CD If you install Measurement Studio 8 0 on a machine that has Measurement Studio 7 x installed the installer replaces Measurement Studio 7 x functionality including class libraries The Measurement Studio 7 x assemblies remain in the global assembly cache GAC therefore applications that reference the Measurement Studio 7 x version continue to use Measurement Studio 7 x NET assemblies The default directory for Measu
10. Studio project Use the Visual Studio NET New Project dialog box as shown in Figure 4 1 to access these templates and create the following types of projects e Measurement Studio Visual Basic NET project e Measurement Studio Visual C project e Measurement Studio Visual C project e Measurement Studio Visual C project with LabWindows CVI libraries National Instruments Corporation 4 3 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio New Project Project Types Templates C Visual Basic Projects E Visual C Projects Visual J Projects Windows Class Library visual C Projects Application 5 Measurement Studio Projects Visual Basic Projects fen visual C Projects E Visual C Projects E CVI Projects Mens In on 4 Windows Application project using Measurement Studio components Name ReaderWriter Location C Documents and Settings Administrator My Documer w Browse Add to Solution Close Solution Project will be created at C Administrator My Documents Visual Studio Projects Reader writer More Cancel Help Figure 4 1 New Project dialog box 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 For information about converting Measurement Studio projects refer to the Converting Measurement Studio Projec
11. 0 Hidden axes Histogram LabVIEW default Logarithmic and Y axes Logarithmic axis Strip chart Y step Description Configures the graph with settings that are ideal for plotting scatter data Cancel 5 Right click the gauge and select Auto Format to display the Auto Format dialog box Select Dark and click OK Right click the gauge and select Properties to display the Properties window 8 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 Right click the numeric edit and select Properties to display the Properties window 10 Select Gauge in the Source drop down list Setting the Source property to the gauge allows two way binding between the controls 11 Deselect ArrowKeys Buttons and Text for the InteractionMode property of the numeric edit control Deselecting these interaction Measurement Studio User Manual 4 12 ni com Chapter 4 Developing with Measurement Studio modes makes the numeric edit an indicator The numeric edit control only displays the calculated mean 12 Select the Format Mode property and in the Numeric Edit Format Mode Editor dialog box change the Precision to 4 Click OK 13 Select File Save Form1 cs to save your application 14 Select Debug Start Without Debugging to run the application 15 After your program builds click Start Notice the graph shows the data plot and
12. 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 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 National Instruments Corporation G 5 Measurement Studio User Manual Glossary installer instrument driver Instrument I O Assistant interface IVI knob L LabVIEW LabWindows CVI LED legend 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 Assistant provides a user interface within the Visual Studio NET 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 hardwar
13. 4 Developing with Measurement Studio 5 To complete the DAQ configuration select the N Samples Acquisition Mode in the Task Timing tab For more information on timing refer to Timing in the NI DAQmx Help Task Timing L Task Triggering Acquisition Mode O 1 Sample On Demand Clock Settings O 1 Sample HW Timed Samples To Read l 100 N Samples Continuous Rate Hz 1000 Advanced Clock Settings Clock Type _ Active Edge Clock Source Internal v Rising 6 Next click the Test button to launch the test panel for your task The test runs automatically You can use test panels 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 DAQ Assistant Analog Input Test Panel Voltage a Display 1 1 Graph 50m 75m 100m Time sec AutoScale Y Axis 7 Click the Close button when you are done National Instruments Corporation 4 23 Measurement Studio User Manual Chapter 4 Measurement Studio User Manual 4 24 ni com Developing with Measurement Studio 8 Right click the MyDAQmxTask mxb tab and select Save MyDAQmxTask mxb Saving the mxb file causes the DAQ Assistant to regenerate the class so that any changes you made are automatically reflected 9 The class contains source code that corresponds to the configuration information that is stored in the mxb file To view this code right cli
14. DAQ and earlier versions but is integral to every measurement you take in NI DAQmx 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 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 Automatic conversion that Measurement Studio controls perform to change the numeric representation of a data element Component Object Model Microsoft specification for architecting and developing reusable software components Measurement Studio User Manual G 2 ni com complex graph context sensitive help control counter timer I O Cursor cursor label DAQ DAQ Assistant DAQ device DataSocket National Instruments Corporation G 3 Glossary A control that displays ComplexDoub1le data on a Windows Forms user interface the ComplexDouble data type represents a complex number of
15. Help Complex Graph Control Use the Measurement Studio complex graph control as shown in Figure 2 3 to display ComplexDoub1e data on a Windows Forms user interface A ComplexDoub1e consists of a real part and an imaginary part Complex Graph control Measurement Studio User Manual Figure 2 3 NET Complex Graph 2 20 ni com Chapter 2 Measurement Studio NET Class Libraries 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 ComplexDoubl1e data e Configure a graph to contain multiple plots to show separate but related data on the same graph 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 Create custom point and line styles for plots e Specify anti aliased plots for plot lines Axis Operations e Configure a graph to include multiple axes or independent ranges so that plot data fits the graph plot area e Configure the axis modes to fixed exact autoscaling loose autoscaling strip chart or scope chart Additional Operations e Pan and zoom interactively e Configure major minor and custom divisions and origin lines e Copy the graph as a BMP GIF JPEG or PNG image to the clipboard or a file Tip For more information about using the complex
16. INSTRUMENTS 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 BECA
17. Library Overview ccceceeceesesseeeeeeeeseeeseeseneeeaes 2 1 AMIGA YSIS E E E EE A E a thueancbua swe cnedaged aap soeten cavd AE EEEE 2 2 Standard Analysis pininana a a aiia 2 2 Prof sio nal Analysis imes aiaa n od sates a oc bad ao aa a aN 2 2 Enterprise Amal ysi8esssc c sisii ce3jedscesastsccssssvsvecsbeascesscshansssendesscdassdesgostevescasescis 2 3 COTTON ays seneo E E ETEA A E R AE neds alas debe head tees a ivtees 2 12 DiataS 0CK Cbissses ehegssdasepieooscesttestasesisk sites teas ys seeders sseasiedea a a a 2 13 NEPAS 822 EIE A be ezety deeds ated hie Sa a oS aed sk edd aioe Ade 2 13 NIFDAQUiksed see stetesicea adh ia las otiteiteure alla tei euiadls pen lala n hiss nies 2 14 NEVISA esin stitches r Aa at inet cea il wines Roslin eee ative 2 15 User Interfac s unne e tao a i E T A R a A a 2 15 Waveform Graph and Scatter Graph Controls ssssssseeseseeeessssessesrerrsreereresee 2 16 Plot Operations siini iiser sanie skonis aesa riani eisa ia 2 17 AXIS Operation Sen na neiii e EE ERRE RRE 2 18 Cursor Operation Sissit irna aa E T T G 2 18 Annotation Operations sesssesseseserssssrsreerestsresterestestsrestnsrsesresteeses 2 18 Additional Operations ninsis irass nsi sessista siii 2 18 Digital Waveform Graph Control eessseesseesssessreeresrsresrsresresrsresrreesrsresesreees 2 18 Plot Operations z cc scssesieeecdtas an a a aaa 2 19 Additional Operations cece esceeeseeesecseceseeseeeseeseee
18. NationalInstruments 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 Use asingle 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 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 Interactively browse to quickly locate and select data items on other computers and servers NI 488 2 The Measurement Studio NI 488 2 NET class library is in the NationaliInstruments N1I4882 namespace This class library is included when you install the NI 488 2 driver The NI 488 2 class library includes a set of classes for communicating with GPIB instruments controlling GPIB devices and acquiring GPIB status informati
19. Settings Token name Value token 20000 Data Type Scaling 10000 Type 2 23 Number vil Aray Array Size 2500 X I 1 1 To end of data 1000 1500 2000 2500 Figure 4 4 Instrument I O Assistant The Instrument I O Assistant aids you in performing the following operations e Creating an instrumentation task class e Configuring an instrumentation task class to communicate with an instrument and parse data you receive from the instrument Tip For more information about using the Instrument I O Assistant to create a Measurement Studio NI 488 2 or NI VISA application refer to the Creating a Measurement Studio 488 2 or VISA Application section of the NI Measurement Studio Help ag National Instruments Corporation 4 29 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio Walkthrough Creating a Measurement Studio Instrument I O Application 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 learn how to build an instrument I O 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 VisaNS assembly and launches the Instrument I O Assistant to create a VisaNS task Performing a query on th
20. Start Guide You can also use simulation to complete this walkthrough For information on how to create an NI DAQm x simulated device refer to Creating NI DAQmx Simulated Devices 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 Help 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 NET from Start All Programs Microsoft Visual Studio NET 2003 Microsoft Visual Studio NET 2003 2 Select File New Project The New Project dialog box launches 3 Inthe Project Types pane expand the Measurement Studio Projects folder Select Visual Basic Projects or Visual C Projects depending on which language you want to create the project in Code generation works in both languages 4 Inthe Templates pane select Windows Application Specify MyDAQmxProject for Name and specify a Location of your choice Click OK The Measurement Studio Application Wizard launches Measurement Studio User Manual 4 16 ni com Chapter 4 Developing with Measurement Studio New Project Project Types Templates Visual Basic Projects 5 Visual C Projects E Visual 3 Projects Wie Class Library J Visual C Projects Measurement Studio Proje
21. 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 Special Functions Airy Bessel Ist Bessel 2nd Beta Complimentary Gamma Cosine Integral Dawson s Integral Dilogarithm 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 KISIRI SISSI RISS SIRAI SIR ISIR SIRASI SESE SESISYS Logarithm of Factorial 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 Packages Continued Analysis NET Library Professional Package Enterprise Package Modified Bessel 1st Vv Modified Bessel 2nd Parabolic Cylinder Psi Sine Integral Spherical Bessel Ist Spherical Bessel 2nd Stirling Struve Tricomi QSISPSESESYESISITSYSYS Zeta
22. User Control Specify MyDAQmxUserControl for Name and click Open Add New Item MyDAQm gt Project Categories Templates Measurement Studio x I Assistants oun Local Project Items DAQmx Task DO Control 4 new Windows Forms control that provides a user interface to a DAQmx task Name MyDAQmxUserControl cs 4 Inthe Select DAQmx Task dialog box select Project Task and then select MyDAQmxProject MyDAQmxTask from the drop down menu This binds the NI DAQmx user control with the task that you just created A project task is used for classes that are created using the DAQ Assistant from Visual Studio A global task is a task that is created and saved in MAX For more information refer to Creating Tasks and Channels in the Measurement amp Automation Explorer Help for NI DAQmx Click Next National Instruments Corporation 4 25 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio SY Measurement Studio Select DAQmx Task Select which DAQmsx task you want the generated code to reference Project Task MyDAQmxProject MyDAQmsT ask v C Global Task There are no items available Help lt lt Back Finish Cancel 5 Review the information in the New DAQmx Task Summary and click Finish Measurement Studio generates and adds a class named MyDAQmxUserControl to your project A new user control is placed in the My User Controls tab of the Visual Studio toolbox and opened in the Windows F
23. a target Y Tip For more information about easily using the graph control refer to the Using the Measurement Studio Visual C Graph Control section in the NJ 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 Measurement Studio User Manual 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 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 22 ni com 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
24. a Measurement Studio NI DAQm x Application This walkthrough is designed to help you learn how to create an NI DAQmx application by taking you through the following steps National Instruments Corporation Setting up the project Using the Measurement Studio 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 Configuring your task Using the DAQ Assistant you will interactively configure and save your task The wizard then generates code to reflect your configuration settings Creating a custom UI control and source code for the task Using the Add New Item wizard you will create a custom NI DAQmx user control that uses the task you just configured to automatically plot the DAQ signal Acquiring data To begin acquiring data from the DAQ device or simulated device you will drop the custom UI control onto a form and run your application The DAQ signal automatically begins plotting data onto your control 4 15 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio Before You Begin The following components are required to complete this walkthrough e Visual Studio NET 2003 e Measurement Studio 8 0 Professional or Enterprise package e NI DAQmx 7 4 or later e NI DAQmx supported DAQ device or simulated device For information about installing and configuring your DAQ device refer to the DAQ Quick
25. a numeric control so that if you change the value of one control it changes the value of the other control e Set the 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 Set the interaction mode to keyboard and mouse keyboard only mouse only or none e Use the edit box to select text programmatically and to validate text values 0 Tip For more information about using the numeric edit control refer to the NumericEdit Class section in the NI Measurement Studio Help Measurement Studio User Manual 2 24 ni com Chapter 2 Measurement Studio NET Class Libraries 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 J Figure 2 7 Switch 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 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 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 th
26. graph control refer to the Using the T Measurement Studio Graph NET Controls 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 National Instruments Corporation 2 21 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Q Tip For more information about using the legend control refer to the Using the Measurement Studio 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 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 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 a
27. other various matrix functions e Scaled and unscaled windowing classes e Common statistical functions such as mean median mode and variance e Exponential linear and polynomial curve fitting functions e Signal generation functions Measurement Studio User Manual 2 2 ni com Enterprise Analysis Chapter 2 Measurement Studio NET Class Libraries 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 e EquiRipple filters e Linear algebra functions such as forward and back substitution LU factorization Cholesky factorization Schur deomposition and Hessenberg decomposition e Probability and analysis of variance e Sinc impulse pulse ramp and chirp patterns e General least square curve fit power fit log fit Gauss fit cubic spline fit and interpolation functions e 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 S Amplitude and Phase Spectrum s Auto Power Spectrum Cross Power Spectrum Harmonic Analyzer Impul
28. 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 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 0 Tip For more information about easily using the slide control refer to the Using the Measurement Studio Visual C Slide Control section in the NI Measurement Studio Help Measurement Studio User Manual 3 24 ni com Chapter 3 Measurement Studio Visual C Class Libraries Utility Use the Measurement Studio Utility Visual C class library to easily access Windows operating system functionality Table 3 2 lists classes in the Utility class library and their functionality Table 3 2 Utility Class Names and Functionalities Utility Class Functionality CNiFile CNiFile extends the MFC CStdioFile class by adding streaming operators for standard Visu
29. the gauge and the numeric edit display the mean of the data The following screenshot shows Form1 with customization Form1 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 NET 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 C or Visual C class that includes the functionality you configure in the user interface Refer to the following section Walkthrough Creating a Measurement Studio NI DAQm x Application for step by step instructions on how to use the DAQ Assistant National Instruments Corporation 4 13 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio Start Page DAQmxTask1 mxb Form1 cs Design PP Test 3P show Help Analog Output Voltage Task x Channel List DAQ Assistant 5 Settings po Analog Output Yoltage Task Output Range a Max 10 vots Min 10 vots s Function Cycles Sine v 38 lt Terminal Configuration lt Let NI DAQ Choose gt w Custom Scaling a lt No Scale gt Running Stop tE Task timing 41 Task Triggering TES Generation Mode 1 Sample On De
30. the information in the Product Information dialog box and click Next 5 Click Next to install all NI software to the default installation directory or click Browse to select a different installation directory You must install Measurement Studio to a local drive Click Next Sy Note The option to browse for an installation location is valid only if you have not already installed any Measurement Studio features If you have any Measurement Studio features installed then Measurement Studio installs to the same root directory to which you installed other Measurement Studio features 6 From the feature tree select the features you want to install To change the Measurement Studio installation directory select the first feature in the list and click Browse Click Next 7 Inthe Product Information dialog box carefully review important information about the features you are installing Click Next 8 Review the license agreement and select I accept the License Agreement s Click Next 9 Inthe Installation Summary dialog box review the features you selected Click Next Note Step 9 starts the installation of Measurement Studio Be aware that when the installer indicates that it is removing backup files this is a normal operation The installer may take several minutes to complete this step 10 If prompted insert the Device Drivers CD and select Rescan Drive If not prompted go to step 15 on this list National Instruments Co
31. with the Measurement Studio LabVIEW RT Interface Visual C class library work only with LabVIEW Real Time Module 6 0 or later ag Tip For more information about using the LabVIEW Real Time Module refer to the LabVIEW Real Time Interface Visual C Class Library Overview topic in the NI Measurement Studio Help For more information about the LabVIEW Real Time Module visit ni com labviewrt 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 0 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 Measurement Studio User Manual 3 16 ni com Chapter 3 Measurement Studio Visual C Class Libraries Microsoft Word Interface Use the Measurement Studio Microsoft Word Interface Visual C class library to automatically create Word documents from within measurement and automation applications Use the Microsoft
32. 25 CNiSystem table 3 25 CNiSystemTrayIcon table 3 25 CNiTempFile table 3 26 CNiTimer table 3 26 V Visual C class libraries 3D graph 3 2 Analysis 3 3 Common 3 14 deployment requirements 1 2 Instrument Drivers 3 15 LabVIEW Real Time Interface 3 16 Microsoft Excel Interface 3 16 Microsoft Word Interface 3 17 NI 488 2 3 17 NI DAQmx 3 17 NI Reports 3 18 NI VISA 3 18 overview 3 1 User Interface 3 19 Utility 3 25 Measurement Studio User Manual l 4 W walkthrough Creating a Measurement Studio Application with Windows Forms Controls and Analysis 4 5 Creating a Measurement Studio Instrument I O Application 4 30 Creating a Measurement Studio NI DAQmx Application 4 15 waveform graph control 2 16 Windows Forms user interface controls 2 15 ni com
33. 88 2 application 4 28 NET class library 2 13 Visual C class library 3 17 NI DAQmx creating a DAQ application 4 13 NET class library 2 14 Visual C class library 3 17 NI Reports Visual C class library 3 18 NI VISA creating a VISA application 4 28 NET class library 2 15 Visual C class library 3 18 numeric controls 2 22 numeric edit NET control 2 24 Visual C control 3 23 0 overview Measurement Studio 1 1 NET class libraries 2 1 Visual C class libraries 3 1 P Parameter Assistant 4 38 project conversion wizard 4 2 project templates 4 3 property editor control 2 26 National Instruments Corporation l 3 Index R requirements distribution 1 2 installation 1 1 S scatter graph control 2 16 selecting a Measurement Studio parameter value 4 38 slide control NET 2 23 Visual C 3 24 switch control 2 25 T tank control 2 23 thermometer control 2 23 U User Interface NET class library 2 15 complex graph 2 20 digital waveform graph 2 18 gauge 2 22 knob 2 22 LED 2 25 legend 2 21 meter 2 22 numeric edit 2 24 property editor 2 26 scatter graph 2 16 slide 2 23 switch 2 25 tank 2 23 thermometer 2 23 waveform graph 2 16 Measurement Studio User Manual Index Visual C class library 3 19 button 3 19 graph 3 21 knob 3 22 numeric edit 3 23 slide 3 24 Utility Visual C class library CNiFile table 3 25 CNiSound table 3
34. C Class Libraries 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 the 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 package Qa Q rwxrkan 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 lin
35. 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 ht tp file transfer protocol servers ftp file systems file and OLE for Process Control opc servers 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 Interactively browse to quickly locate and select data items on other computers and servers Instrument Drivers Measurement Studio includes a set of class libraries that provides Visual C classes that you can use to program instruments such as digital multimeters and oscilloscopes These Visual C classes provide Visual C interfaces to ANSI C DLL based Interchangeable Virtual Instrument IVD class drivers Each Measurement Studio instrument driver class library includes a set of Visual C classes that interfaces to a single IVI driver The Measurement Studio Visual C classes provide enhancements to the ANSI C interface such as automatic dat
36. Important Information Warranty The media is warranted against defects in materials and workmanship for a period of one year from the date of shipment as evidenced by receipts or other documentation National Instruments will at its option repair or replace equipment that proves to be defective during the warranty period This warranty includes parts and labor 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 rese
37. Measurement Studio User Manual October 2005 lt 7 NATIONAL 373392A 01 N 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 0 662 45 79 90 0 Belgium 32 0 2 757 00 20 Brazil 55 11 3262 3599 Canada 800 433 3488 China 86 21 6555 7838 Czech Republic 420 224 235 774 Denmark 45 45 76 26 00 Finland 385 0 9 725 725 11 France 33 0 1 48 14 24 24 Germany 49 0 89 741 31 30 India 91 80 51190000 Israel 972 0 3 6393737 Italy 39 02 413091 Japan 81 3 5472 2970 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 3390150 Portugal 351 210 311 210 Russia 7 095 783 68 51 Singapore 1800 226 5886 Slovenia 386 3 425 4200 South Africa 27 0 11 805 8197 Spain 34 91 640 0085 Sweden 46 0 8 587 895 00 Switzerland 41 56 200 51 51 Taiwan 886 02 2377 2222 Thailand 662 278 6777 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 2003 2005 National Instruments Corporation All rights reserved
38. The following sections describe each of the Measurement Studio user interface controls National Instruments Corporation 3 19 Measurement Studio User Manual 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 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 button control refer to the Using the Measurement Studio Visual C Button Control section in the NI Measurement Studio Help Measurement Studio User Manual 3 20 ni com Graph Control Chapter 3 Measurement Studio Visual C Class Libraries Use the Measurement Studio Ac
39. USE EACH 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 cccccceeesesssessscccccsccececcccsececesssseessesssccsncnaesesssssseeeeseeeeess 1X CONVEMUONS 258 5 scat checchecete Mescaan EET ERAEN E A ET x Chapter 1 Introduction to Measurement Studio Installation Requirements sssri Deian ia era aE o EEE EEEE OEE NEEE 1 1 Deployment Requirement ccceecccesscesececeeseecesecesceesaeeesceeseeeeaeecsaeceaeeesaeenaeesneees 1 2 Installation IMstructions ceescescesecsseceseeeseeescececeeeaeeeaecescecsaeeeseecsaeeeeeeseeceaeeseaeeeaes 1 2 Measurement Studio Package Comparison Chart 00 ecceecceseceseeseeeeeeseesseeeeeseeneenee 1 4 Measurement Studio Resources eeeeeeeeeseeeeceseeeseeceseeeceesaeeeseecececesaeeeaeeeeecaeeeneereas 1 6 Chapter 2 Measurement Studio NET Class Libraries Measurement Studio NET Class
40. 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 Q 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 ag Tip For information about easily creating a Measurement Studio NI 488 2 application using the Instrument I O Assistant refer to the Creating a Measurement Studio NI 488 2 or NI VISA Application section of Chapter 4 Developing with Measurement Studio 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
41. Y ScatterGraph Slide amp Switch m Tank Thermometer WE WaveformGraph Measurement Studio C Tools Data Components Windows Forms Clipboard Ring General 7 Select the WaveformGraph control and drag and drop it onto the form Measurement Studio User Manual 4 8 ni com Chapter 4 Developing with Measurement Studio 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 WaveformPlot Collection Editor Plot Properties ToolTipsEnabled False ToolTipxFormat Numeric GS ToolTipyFormat Numeric GS El Gonfiourations DynamicProperti E Dat Tag Plot Modifiers Private 1 8 BasePlot L none BaseXValue 0 BaseYValue 0 __ FillBase FR value Name Indicates the name used in code to Remove identify the object Cancel Help 9 Type Plot for the Name Click OK 10 Before you add the legend 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 Right click the gauge and select Properties to display the Properties window 15 Type gaug
42. a type translation and organization of properties and methods into a logical hierarchy Each class driver provides a consistent interface to a particular type of device Measurement Studio includes the following class driver class libraries e IviDcPwr Provides an interface to the IVI DC power supply class driver CNi IviDcPwr is the top level class of this class library e IviDmm Provides an interface to the IVI DMM class driver CNiIviDm is the top level class of this class library e IviFgen Provides an interface to the IVI arbitrary waveform generator class driver CNiIviFgen is the top level class of this class library National Instruments Corporation 3 15 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries e IviScope Provides an interface to the IVI oscilloscope class driver CNilviScope is the top level class of this class library e IviSwitch Provides an interface to the IVI switch class driver CNilviSwtch is the top level class of this class library LabVIEW Real Time Interface Use the Measurement Studio LabVIEW Real Time Interface Visual C class library to read from and write to shared memory on a LabVIEW RT Series processor board Use shared memory to pass data between LabVIEW RT VIs and your application Use this class library both from an application that runs on the host machine and from a DLL that you download to the board 3 Note The LabVIEW RT DLLs you create
43. adds references to the appropriate class libraries and sets up the project for you 7 Click Next Select Launch the Instrument I O Assistant to create a VisaNS Task This option adds a new Instrument I O Assistant task to your project Each task consists of a collection of related instrument communication operations that you want your application to perform together For more information click the Configuring a VisaNS Instrumentation Task Class link to access the help Measurement Studio User Manual 4 32 ni com Chapter 4 Developing with Measurement Studio Measurement Studio Visual C Windows Application Wizard Add Tasks Select the tasks you want to add to the project Select a NI 488 2 VisaNS or DAQmx task to add to the project Use a task to interactively configure a measurement or automation operation and generate code for that operation Launch the Instrument 1 0 Assistant to create a NI 488 2 task File Name hi Configuring an_NI 488 2 Instrumentation Task Class M Launch the Instrument 1 0 Assistant to create a VisaNS task File Name VisaNSTask1 mxb Configuring a VisaNS Instrumentation Task Class F Launch the DAQms Assistant to create a DAGmx task File Name l Configuring a DAGmx Task Class Help lt lt Back Cancel Tip If you are working with an existing project you can access the Add Tasks dialog box 7 by selecting Project Add New Item 9 Click Finish The Instrument I O Assistant automatical
44. aeeeseeaeenseeaes 2 20 Complex Graph Control isinisisi esiosa kase isi iia iais ai 2 20 Plot Operations wavs incinse shevtccdye siuos subesceaea sisati 2 21 ARIS Operations insesi R aG 2 21 Additional Operations ssse ssssesessseeesesreetsstersstsrestesesresesresresrssrereees 2 21 National Instruments Corporation v Measurement Studio User Manual Contents Legend Control siiicar daca tesadevk asawh sti vedas aS EE OAR av Seviees 2 21 Numeric Controls ccccccessssccccesssscccccesessnseecceeessneeeccecesaeeececeesseeeeeeeeesaeeeees 2 22 Numere Edt O OO aE dh Ee EE E A be 2 24 Switch and LED Controls cccccccccccccsssccccesessseccceessssseececessseeeeeesesseeeeeeeesses 2 25 Property Editor Controls icccisedccscesasceus tienes cide ectbssnsececsas iiaa 2 26 Chapter 3 Measurement Studio Visual C Class Libraries Measurement Studio Visual C Class Library Overview c cee eeeeseeeeseeereeeeeees 3 1 ActiveX Controls in Visual C cece eeccceccsseeeeeecencecseeceeeesaeesaeeeaceceaeeeseeesaeeeeeenneeees 3 2 3D Graph Control caresses cesseaschscoases es e E A a a AT 3 2 Plot Operations i eini heipsan ai aie E E E RAA 3 3 Additional Operations si c ccssesssesssscssosestiscssesessecesseseseosegsesesssaeasasseanoedvees 3 3 TIAL Y S18 ses eiri aeoaea Soi sel cian EEE osc E EE EE A A E AR 3 3 Standard Analysis pisina tenia aa e ai E R a 3 4 Professional Analysis nennen nioi oa A 3 4 Ent rprise Ana
45. al Basic Visual C and Visual Studio NET 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 on the Manuals page at ni com manuals 1 7 Measurement Studio User Manual Measurement Studio NET Class Libraries This chapter provides overview information about the NET class libraries included with Measurement Studio 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 4 Developing with Measurement Studio for step by step instructions on developing applications with these libraries Measurement 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 e Analysis e Common e DataSocket e NI 488 2 e NI DAQmx e NI VISA e User Interface Refer to the following sections for information about each Measurement Studio NET class library National Instruments Corporation 2 1 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Analysis Standard Analysis The Measurement Stu
46. al 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 e Getting and setting system preferences e Displaying help files e Getting input for the keyboard CNiSystemTraylIcon CNiSystemTraylIcon 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 Icons You can place an icon in the system tray to notify the user of changes in an application status e String tooltips You can associate a string tooltip with an icon and display the tooltip when the user hovers over the icon e Shortcut menus You can associate a shortcut menu with an icon and display the shortcut menu when the user right clicks the icon e Overridable event handling National Instruments Corporation 3 25 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 2 Utility Class Names and Functionalities Continued Utility Class Functionality CNiTempFile CNiTempFile extends the functionality of CNiFile to add temporary file creation and manipulation CNiTimer CNiTimer objects use the Windows multimedia timer t
47. alysis 2 3 Filters table 2 5 Linear Algebra table 2 6 Measurements table 2 3 Professional Analysis 2 2 Signal Generation table 2 4 Signal Processing table 2 5 Standard Analysis 2 2 Statistics table 2 10 Windowing table 2 4 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 National Instruments Corporation l 1 languages 4 38 class driver class libraries IviDcPwr 3 15 IviDmm 3 15 IviFgen 3 15 IviScope 3 16 IviSwitch 3 16 Common NET class library 2 12 Visual C class library 3 14 complex graph control 2 20 conventions used in the manual x creating Measurement Studio Application with Windows Forms Controls and Analysis walkthrough 4 5 Measurement Studio Instrument I O Application walkthrough 4 30 Measurement Studio NI 488 2 or NI VISA application 4 28 Measurement Studio NI DAQmx application 4 13 Measurement Studio NI DAQmx Application walkthrough 4 15 new Measurement Studio project 4 3 NI DAQmx user control 4 15 Measurement Studio User Manual Index D DAQ Assistant 4 13 data acquisition DAQ 2 14 3 17 DataSocket NET class library 2 13 Vis
48. alysis functionality as well as the following advanced functionality Measurement Studio User Manual 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 3 4 ni com Chapter 3 Measurement Studio Visual C Class Libraries e General least square curve fit power fit log fit Gauss Fit cubic spline fit and interpolation functions e Special functions Refer to Table 3 1 to determine the type of measurements available in the Professional and Enterprise Analysis C libraries Table 3 1 Analysis C Library Measurement Types included in the Professional and Enterprise Packages Analysis Visual C Library Professional Package Enterprise Package Measurements AC and DC Estimator S Amplitude and Phase Spectrum 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 os SISIA Signal Generation Arbitrary Wave Chirp Pattern Gaussian White Noise Impulse Pattern Pulse Pattern Ramp Pattern Sawtooth Wave Sinc Pattern KISIS SISISISI S
49. ata Display the mean on the gauge gauge Value mean 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 Legendlitem Collection Editor Members legendItem1 Properties o Ep eee Source Plot sional Visible True Bc DynamicPropertie Elst Tag B De Name legendItem1 Modifiers Private Text The description of the legend item Remove Cancel Help 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 National Instruments Corporation 4 11 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio 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 4 Select Points Only Click OK Notice that the legend changed automatically to match the formatting of the graph yy Auto Format Anti aliased plot Black and white Default Double Y axis Drop fill to 0 Drop lines to 0 Fill to
50. ation 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 mechanical 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 Trademarks National Instruments NI ni com and LabVIEW are trademarks of National Instruments Corporation Refer to the Terms of Use section on ni com legal for more information about National Instruments trademarks FireWire is the registered trademark of Apple Computer Inc Other product and company names mentioned herein are trademarks or trade names of their respective companies 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 refer to the appropriate location Help Patents in your software the patents txt file on your CD or ni com patents WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS 1 NATIONAL
51. becussaeckasscauccovcesaes sods a E 4 2 Creating a Measurement Studio Project 0 eee ees cseeeseesecesecseeeseceeeeaeseeeseeseeeseesees 4 3 Adding or Removing Measurement Studio Class Libraries 0 0 0 0 cece eeeeeeseeeeeeeeeee 4 4 Walkthrough Creating a Measurement Studio Application with Windows Forms Controls and Analysis ccececeseeecseceseeseeeseeeeesesseesaeeeeeaeensenss 4 5 Creating a Measurement Studio NI DAQmx Application 0 eee eee eeeeseeeeeeseeeees 4 13 Creating an NI DAQmx User Control oo eecceecceeeceeeeseceeeeseeaeeeseeseessecseeeasenseaes 4 15 Walkthrough Creating a Measurement Studio NI DAQmx Application 4 15 Creating a Measurement Studio NI 488 2 or NI VISA Application 0 0 4 28 Walkthrough Creating a Measurement Studio Instrument I O Application 4 30 Selecting a Measurement Studio Parameter Valle eee eeceeseeeseereeeseeeeeeeeetenes 4 38 Calling Instrument Drivers from NET Languages 0000 0 eee eee eeseeseeeeeeeeeeeeeneeeaes 4 38 Appendix A Technical Support and Professional Services Glossary Index National Instruments Corporation vij Measurement Studio User Manual 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 NET including Microsoft Visual Basic NET Microsoft Vi
52. 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 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 Measurement Studio User Manual G 4 ni com form front panel FTP gauge GPIB graph HTTP TEEE 488 IMAQ Vision indicator Glossary 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 based 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
53. box 0 Tip Ifyou receive a user control error message when you drop the MyDAQmxUserControl on Form1 ensure that you have first compiled the project by selecting Build Build Solution 3 Select Debug Start Without Debugging to run the application National Instruments Corporation 4 27 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio 4 After you have started the application click the Read button to begin acquiring data from your DAQ device Formi What s Next To learn more about tasks channels and other NI DAQmx concepts refer to the NI DAQmx Help located at Start All Programs National Instruments NI DAQ NI DAQm x Help For more information about creating and using tasks in Measurement Studio refer to Using the Measurement Studio NI DAQmx NET Library in the NI Measurement Studio Help You can also look at examples that ship with NI DAQmx Refer to Measurement Studio NI DAQmx NET Examples in the NI Measurement Studio Help for the locations of these examples Creating a Measurement Studio NI 488 2 or NI VISA Application Measurement Studio User Manual To create a Measurement Studio NI 488 2 or NI VISA application use the Instrument I O Assistant The Instrument I O Assistant as shown in Figure 4 4 integrates into Visual Studio NET 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
54. ck the mxb file in the Solution Explorer and select View Code If the Solution Explorer is not open select View Solution Explorer Formi cs Design MyDAQmxTask mxb MyD amp QmxTask cs 1p MyDAQmxProject MyDAQmxTask gt Configure gt 3 namespace MyDAQmxProject Hl using System using NationalInstruments DAQmx T public class MyDAQmxTask Task public MyDAQmxTask base MyDAQmxTask this Configure a public virtual void Configure this AIChannels CreateVoltageChannel Devi ail Voltage AITerminalConfiguration Differential 10 10 AIVoltageUnits Volts this Timing Configuresampleclocki 1000 Samp leClocka ctiveEdge Rising Cl oo o w 10 Notice that the call to ConfigureSampleClock has a sample mode set to finite This mode is what you selected in the previous step 5 For more information on this step refer to Generating Code for a DAQmx Task Class in the NI Measurement Studio Help Your NI DAQmx task is now configured and ready to use in a project SampleQuantityMode FiniteSamples 100 Chapter 4 Developing with Measurement Studio To create a custom UI control and source code for the task 1 Select Project Add New Item The Add New Item dialog box launches 2 Inthe Categories pane of the Add New Item dialog box expand the Measurement Studio folder and select Assistants 3 Inthe Templates pane select DAQmx
55. class library is included when you install the NI DAQmx driver Sy Note Some DAQ devices are not currently supported by the NI DAQm x driver Refer to the NI DAQ Readme for a complete listing of supported hardware National Instruments Corporation 3 17 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Use the NI DAQmx class library to perform the following types of tasks e Analog signal measurement e Analog signal generation e Digital I O e Counting and timing e Pulse generation e Signal switching 0 Tip For information about easily creating an NI DAQmx application using the DAQ Assistant refer to the Creating a Measurement Studio NI DAQmx Application or Walkthrough Creating a Measurement Studio NI DAQmx Application sections of Chapter 4 Developing with Measurement Studio For more information about DAQ visit ni com dataacquisition 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 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 in
56. 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 Measurement Studio User Manual G 8 ni com point property property editor property pages PXI range scalar scale scatter graph scope serial slide National Instruments Corporation G 9 Glossary Structure that contains two 16 bit integers that represent horizontal and vertical coordinates 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 box 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 Region between the limi
57. cts 4 Visual Basic Projects Visual C Projects E Visual C Projects E CHI Projects Aa e a ie l A project that uses Measurement Studio class libraries to create an application with a Windows user inte Name MyDAQmxProject Location l C Documents and Settings Administrator Desktop v Browse Project will be created at C Documents and Settings Administrator Desktop MyDAQmxProject More Cancel Help In the Add Class Libraries dialog box ensure that DAQmx Library and Windows Forms Controls are selected When you select these libraries the Measurement Studio Application Wizard automatically adds references to the appropriate class libraries Click Next National Instruments Corporation 4 17 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio Measurement Studio Visual C Windows Application Wizard Add Class Libraries Select the class libraries to add to the project E Enterprise Analysis Measurement Studio Hardware Class Libraries DAQms Library O DataSocket Communication Windows Forms User Interface Controls Help lt lt Back Finish Cancel Tip Ifyou are working with an existing project you can access the Add Class Libraries dialog box by selecting Measurement Studio Add Remove Class Libraries Wizard 6 Inthe Add Tasks dialog box you can configure the Measurement Studio Application Wizard to add a task to your project using the DAQ Assistant Sel
58. dio 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 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 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 e FFT Inverse FFT Real FFT Fast Hartley Inverse Fast Hartley Fast Hilbert Inverse Fast Hilbert DST Inverse DST DCT and Inverse DCT transformations e Linear algebra functions such as determinant check positive definiteness calculate dot product and
59. e National Instruments Tools Measurement amp Automation Explorer MAX Use MAX to configure NI hardware add new channels interfaces and virtual channels execute system diagnostics and view devices and instruments connected to the system National Instruments 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 that the communication with an instrument is correct Discussion Forums Use NI Discussion Forums at forums ni com to participate in discussion forums and exchange code with measurement and automation developers around the world Instrument Driver Network Use the NI Instrument Driver Network at ni com idnet as a central resource for downloading developing and submitting instrument drivers 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 notes instrument drivers discussion forums and a measurement glossary 4 2 ni com Chapter 4 Developing with Measurement Studio e NI Measurement Studio Help Use the NI Measurement Studio Help to access detailed Mea
60. e 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 and zoom interactively 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 3 3 Measurement Stud
61. e 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 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 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 Measurement Studio User Manual G 6 ni com matrix MB Measurement amp Automation Explorer MAX measurement device Measurement Studio meter method MFC NI 488 2 NI DAQ National Instruments Corporation G 7 Glossary A rectangular array of numbers or mathematical elements that represent the coefficients in a system of linear equations Megabytes of memory Nationa
62. e for the name of the gauge National Instruments Corporation 4 9 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio The following screenshot shows Form1 with the user controls Formi 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 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 Plot PlotyY 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 C 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 Measurement Studio User Manual 4 10 ni com Chapter 4 Developing with Measurement Studio 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 d
63. e 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 Ul 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 NET 2003 Measurement Studio 8 0 Professional or Enterprise package 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 1 0 Assistant Help by selecting the Show Help button inside the assistant Measurement Studio User Manual yp Show Help 4 30 ni com Chapter 4 Developing with Measurement Studio Setting up the project 1 Open Visual Studio NET from Start All Programs Microsoft Visual Studio NET 2003 Microsoft Visual Studio NET 2003 2 Select File New Project The New Project dialog box launches New Project Project Types Templates Visual Basic Projects 5 Visual C Projects f Visual J Projects Windows Class Library J Visual C Projects Application 5 Measurement Studio Projects I Visual Basic Projects Visual C Projects E Visual C Projects E CHI Projects Aa e In i om 4 project that uses Measurement Studio class libraries to cr
64. e signal Click Finish National Instruments Corporation 4 21 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio Create New NI DAQ instruments DAQ Assistant BB Physical Select the physical channel s to add to your task Supported Physical Channels You also can add or copy Devi PCI 6280 existing global virtual channels aid to your task Global virtua channels are virtual channels created from MAX or your application software that are saved in MAX and can be used in any task or application You can only add global virtual channels that support the measurement You also can add physical channel s associated with transducer electronic data sheet TEDS sensors to your task A TEDS is a data sheet for an analog sensor A TEDS contains the critical information needed by a device or measurement system to identify characterize lt Back Next Finish Cancel 3 Note You can also use simulation in this walkthrough For more information refer to Creating NI DAQmx Simulated Devices in the Measurement amp Automation Explorer Help for NI DAQmx 4 After the DAQ Assistant configuration window opens within the Visual Studio environment select the MyDAQmxTask mxb tab 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 Measurement Studio User Manual 4 22 ni com Chapter
65. e 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 Switch and LED 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 Property Editor Control Measurement Studio User Manual Use the Measurement Studio property editor control as shown in Figure 2 9 to configure properties for Windows Forms controls at run time Belt t Property Editor a 240 300 E Drag the sweep or start angle lines to change the arc Scale Arc Start angle 40 0 4 Sweep angle 300 0 Invert Cancel Figure 2 9 Property Editor Control for the Knob Control Scale Arc Property 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 Create custom editors and type converters for properties 2 26 ni com Chapter 2 Measurement Studio NET Class Lib
66. east Squares Linear Fit KISIS SISIS 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 NIST SESESYESESTSNYSYS Statistics 1D 2D and 3D ANOVA Chi Square Distribution erf x and erfc x F Distribution Histogram SINISE SUS National Instruments Corporation Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Inverse Chi Square Distribution Y Inverse F Distribution Inverse Normal Distribution Inverse T Distribution Mean Median and Mode Moment about Mean Normal Distribution Polynomial Interpolation RMS Spline Interpolant Spline Interpolation Standard Deviation T Distribution Variance KISIRI SIRSI ISIR ISISI SIASII Special Functions Airy Bessel 1st Bessel 2nd Beta Complimentary Gamma Cosine Integral Dawson s Integral Dilogarithm Elliptic 1st Elliptic 2nd KISIRI SIRSI ISIS ISISI Measurement Studio User Manual ni com C
67. easurement Studio User Manual Conventions Q S 3 bold italic monospace The following conventions appear in this manual 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 in the software such as menu items and dialog box options Italic text denotes variables emphasis a cross reference 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 should enter from the keyboard sections of code programming examples and syntax examples This font is also used for the proper names of disk drives paths directories programs subprograms subroutines device names functions operations variables filenames and extensions Measurement Studio User Manual X ni com Introduction to Measurement Studio Measurement Studio is an integrated suite of tools and class libraries that are designed for developers using Microsoft Visual Basic NET Visual C and Visual C to develop measurement and automation appl
68. eate an application with a Windows user inte Name MyIIOA4Project Location C Documents and Settings Administrator Desktop X Browse Project will be created at C Documents and Settings Administrator Desktop MyIIOAProject More Cancel Help 3 Inthe Project Types pane expand the Measurement Studio Projects folder Select Visual Basic Projects or Visual C Projects depending on which language you want to create the project in This walkthrough refers to Visual C but Visual Basic NET users can follow the same process 4 Inthe Templates pane select Windows Application Specify MyIIOAProject for Name and select a Location of your choice National Instruments Corporation 4 31 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio 5 Click OK The Measurement Studio Application Wizard launches Add Class Libraries Select the class libraries to add to the project O Enterprise Analysis E Measurement Studio Hardware Class Libraries O DAGms Library DONI 488 2 Library VisaNS Library O DataSocket Communication Windows Forms User Interface Controls Help lt lt Back Finish Cancel Tip Ifyou are working with an existing project you can access the Add Class Libraries 7 dialog box by selecting Measurement Studio Add Remove Class Libraries Wizard 6 Inthe Application Wizard dialog box select Windows Forms User Interface Controls and VisaNS Library The wizard automatically
69. ect Launch the DAQm x Assistant to create a DAQmx task and specify MyDAQmxTask mxb for the File Name This file name is the name used for the class that is generated later in this walkthrough For more information click the Configuring a DAQmx Task Class link to access the help Click Finish Measurement Studio User Manual 4 18 ni com Chapter 4 Developing with Measurement Studio gt Measurement Studio Visual C Windows Application Wizard Add Tasks Select the tasks you want to add to the project Select a NI 488 2 VisaNS or DAQms task to add to the project Use a task to interactively configure a measurement or automation operation and generate code for that operation r File Name Nid Task ms Configuring an NI 488 2 Instrumentation Task Class r File Name fVisaNST aski myt Configuring a VisaNS Instrumentation Task Class MV Launch the DAQm Assistant to create a DAGms task File Name M yDAGmsT ask mxb Configuring a DAQmx Task Class 7 The Measurement Studio Application Wizard automatically sets up your data acquisition project and launches the DAQmx Task Wizard 8 Inthe New DAQm x Task dialog box you can choose either to create a new task or copy a global task that was created in MAX For more information refer to Creating an NI DAQm x Task from an Existing Task in MAX For this walkthrough select New Item and click Next National Instruments Corporation 4 19 Measurement Studio User Manual Chap
70. endor model As String Declare an instance of VisaNSTask Dim mytask As New VisaNSTask1 Display the data in the text boxes mytask Run vendor model textBoxl Text vendor textBox2 Text model C str Declare variable values for vendor and model ing vendor model Declare an instance of VisaNSTask VisaNSTask1 mytask new VisaNSTask1 Display the data in the text boxes mytask Run out vendor out model tex tex tBoxl Text vendor tBox2 Text model Select Debug Start Without Debugging to 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 Note Although this walkthrough only covers the use of a simple Query and Parse step the Instrument I O Assistant offers additional features such as independent Write and Read and Parse steps and advanced parsing capabilities The following screenshot shows the IIOA s ability to scale and parse IEEE 488 2 Definite Length block data National Instruments Corporation 4 37 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio 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 me
71. ent 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 Forward Substitution Y General Eigen AB Hessenberg Decomposition Inverse Matrix Linear Equations LU Factorization Matrix Balance Matrix Condition Number Matrix Multiplication Matrix Norm Matrix Rank Outer Product Pseudo Inverse Matrix NIST NSYES GSES QR Factorization QR Factorization with Pivot Matrix QISTSESESTSYESESYSESIESYSIESTS QR Factorization with Pivot Vector s QZ Decomposition Schur Decomposition Solve Linear Equations Multiple Right Hand Solve Linear Equations Single Right Hand Special Matrix SVD Factorization Test Positive Definite Matrix 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 Trace Y Vv Transpose Vv Y Array and Numeric Operations 1D and 2D Array Arithmetic Y Y 1D and 2D Li
72. h e Microsoft Visual Studio NET 2003 e Measurement Studio 8 0 Professional or Enterprise package Setting up the project 1 Select Start All Programs Microsoft Visual Studio NET 2003 Microsoft Visual Studio NET 2003 2 Select File New Project The New Project dialog box launches New Project Project Types Templates Visual Basic Projects E Visual C Projects fl Visual J Projects Windows Class Library Visual C Projects Application 5 Measurement Studio Projects Visual Basic Projects Visual C Projects E Visual C Projects E CVI Projects Moe in om 4 project that uses Measurement Studio class libraries to create an application with a Windows user inte Name MyMeasurementStudioProject Location C Documents and Settings Administrator Desktop v Browse Project will be created at C Administrator Desktop MyMeasurementStudioProject More Cancel Help Measurement Studio User Manual 4 6 ni com Chapter 4 Developing with Measurement Studio 3 Inthe Project Types pane expand the Measurement Studio Projects folder Select Visual Basic Projects or Visual C Projects depending on which language you want to create the project in 4 Inthe Templates pane select Windows Application Specify MyMeasurementStudioProject for Name and specify a Location of your choice Click OK The Measurement Studio Application Wizard launches Select Analysis and Windows Forms User Interface Co
73. h the slide tank and thermometer controls and the classes that interface with them you can perform the following operations e Fill the minimum or maximum value of the scale e 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 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 National Instruments Corporation 2 23 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Numeric Edit Control Use the Measurement Studio 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 Control With the numeric edit control and the classes that interface with the control you can perform the following operations e Use up 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 e Connect to
74. hapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Exponential Integral Vv 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 Ist Modified Bessel 2nd Parabolic Cylinder Psi Sine Integral Spherical Bessel 1st Spherical Bessel 2nd Stirling Struve Tricomi Zeta QVISPNLENESPRESERSESIENRY SESS ENQYSESISYS National Instruments Corporation Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Q Tip For more information about analyzing or generating data with the Analysis class S library refer to the Using the Measurement Studio Analysis Visual C 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 Visual C class library prov
75. hrough Creating a Measurement Studio NI DAQmx Application sections of Chapter 4 Developing with Measurement Studio For more information about DAQ visit ni com daq Measurement Studio User Manual 2 14 ni com Chapter 2 Measurement Studio NET Class Libraries NI VISA The Measurement Studio NI VISA NET class library is in the NationalInstruments VisaNSs namespace This class library is included when you install the NI VISA driver 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 and 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 interfaces e GPIB e IEFE 1394 e PXI e Serial RS 232 and RS 485 e TCP IP e USB e VXI ag Tip For information about easily creating a Measurement Studio NI VISA application using the Instrument I O Assistant refer to the Creating a Measurement Studio NI 488 2 or NI VISA Application or Walkthrough Creating a Measurement Studio Instrument I O Application sections of Chapter 4 Developing with Measurement Studio For more information about NI VISA visit ni com visa User Interface
76. ications Measurement Studio dramatically reduces application development time through object oriented measurement hardware interfaces advanced analysis libraries scientific user interface controls measurement data networking 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 Installation Requirements To install Measurement Studio your computer must have the following e Microsoft Windows 2000 XP XP x64 operating system e Microsoft NET Framework 1 1 required only for the Measurement Studio NET class libraries e Standard Professional Enterprise Developer Enterprise Architect or Academic edition of Microsoft Visual Studio NET 2003 required to use the Measurement Studio integrated tools e Intel Pentium II class processor 266 MHz or higher e Video display 800 x 600 256 colors 16 bit color recommended for user interface controls e Minimum of 128 MB of RAM 256 MB or higher recommended e Minimum of 265 MB of free hard disk space e Microsoft compatible mouse e Microsoft Internet Explorer 6 0 or later Current NI driver support for Windows XP x64 is limited National Instruments Corporation 1 1 Measurement Studio User Manual Chapter 1 Introduction to Measurement Studio Optional Installation
77. ides 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 Implements 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 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 Ss Measurement Studio User Manual 3 14 ni com Chapter 3 Measurement Studio Visual C Class Libraries
78. ignal Signal Signal Signal Signal Signal Waveform Signal Figure 2 2 NET Digital Graph 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 including eight different digital states 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 Waveform and Signal State Operations e Simultaneously display waveforms and signals or display signals only e Create custom waveform and signal state styles e Configure state labels e Create custom waveform state labels National Instruments Corporation 2 19 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Additional Operations Display data in sample or time mode Pan with scroll bars Configure the style and mode of scroll bars Create custom scroll bars Configure the axis modes to exact or loose autoscaling or fixed Pan and zoom interactively Configure major minor and custom divisions Copy the graph as a BMP GIF JPEG or PNG image to the clipboard or a file 0 Tip For more information about using the digital waveform graph control refer to the Using the Measurement Studio Graph NET Controls section in the NI Measurement Studio
79. information about Measurement Studio Examples Measurement Studio installs examples to the following paths depending on whether you have previously installed Measurement Studio on your machine If you have previously installed Measurement Studio 7 0 for Visual Studio NET 2003 the example programs are installed to the following directories Visual Basic NET or Visual C Program Files National Instruments MeasurementStudio70 DotNET Examples Visual C Program Files National Instruments Measurement Studio70 VCNET Examples 1 6 ni com National Instruments Corporation Chapter 1 Introduction to Measurement Studio If you have not previously installed Measurement Studio 7 0 for Windows 2000 XP the example programs are installed to the following directories Visual Basic NET or Visual C Program Files National Instruments MeasurementStudioVS2003 DotNET Examples Visual C Program Files National Instruments MeasurementStudioVS2003 VCNET Examples 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 and evaluation software NI Developer Zone zone ni com Provides access to online example programs tutorials technical news and a Discussion Forum where you can participate in Measurement Studio discussion forums for Visu
80. 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 functionality you configure in the user interface Use this assistant to help you write code that 4 28 ni com Chapter 4 Developing with Measurement Studio communicates with devices such as serial Ethernet or GPIB instruments Refer to the following section Walkthrough Creating a Measurement Studio Instrument I O Application for step by step instructions on how to use the Instrument I O Assistant Start Page VisaNSTask1 mxb i gt x aAddStep Undo gt Run 3P Show Help de Ea m Run this step v Select Instrument Enter a command click Run to send command Termination character cURV i fe Query and Parse Auto parse Parsing help DX Clear parsing i Write Byte index Binary representation 00000000000 25 24 30 32 24 20 2 41 42 48 00000000016 s5 2c 2 21 25 32 26 26 2 44 Query and Par 00000000032 25 24 35 2 25 32 20 34 28 26 00000000048 25 22 32 20 24 20 2 42 43 44 I gt token 00000000064 24 2c 2 22 22 34 25 24 25 42 00000000080 00000000096 2 00000000112 20 2 _2 23 38 34 20 2 23 33 00000000128 20 25 256 2c 25 34 33 35 32 26 Bin and ASCII Byte order Big Endian Motorola z Separator s Selected Token
81. io User Manual Chapter 3 Measurement Studio Visual C Class Libraries sections for information about the Standard Professional and Enterprise Analysis class libraries Standard Analysis 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 Enterprise Analysis 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 The Enterprise Analysis class library which ships with Measurement Studio Enterprise Edition includes the Standard and Professional An
82. l 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 support phone numbers email addresses and current events National Instruments Corporation A 1 Measurement Studio User Manual Glossary A ActiveX ActiveX control ActiveX control container analog I O annotate ANSI C API 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 functio
83. l 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 NET 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 Driver level software to control and communicate with National Instruments GPIB hardware Driver 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 Measurement Studio User Manual Glossary NI DAQmx NI IMAQ numeric edit 0 OCX OLE OPC oscilloscope PCI
84. ly launches Performing a query on the instrument 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 your instrument is connected to 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 write a command to an instrument and to read the instrument response at once National Instruments Corporation 4 33 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio Query and Parse 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 character idn X 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 fo
85. lysis 2 scssscestssescedseescsesasscstacestined cgieaiecezsuses NASEER SESE DaS EE SE 3 4 COMMON eine a E A T E ies ea weed a danse evi aa a eA 3 14 DataSock Cbrssiss coesistestactssz ceetvessteates e i A E E R E E 3 15 Thstrument Drivers iege iiie e ee e ales cdeigea Aa Bt saben eae e bend e EERTE 3 15 LabVIEW Real Time Interface ssiri enp siaaa EA EAEan a Eni 3 16 Microsoft Excel Interface ics ccinkes cvceateccesdheveecdies e a a E EE A 3 16 Microsoft Word Interface osinn e i E E S 3 17 NIAE 8 2era n a EAE A EE E o EA A A A EA aa A NS 3 17 ATE BICO iiD EEEE T edd feseteonsetesceiai denies 3 17 NIPRe ports iisas io nr utes inns E EEEN E AAE E R E neues 3 18 NIEVA cocponrnitasen nae n e a E E AR esas 3 18 User Interfaces noone iieiea aR A E NE EEE E E E Ee 3 19 Button COntrO lasetin ar oasia araea na a a oiT As eva 3 20 Graph Control icnasiinenneie Nad Sheds Het a na e E A R een oases 3 21 Plot Operations saiisine ai a a ER A 3 21 AXIS Operations soea iaa Ai shah ci E A RA ee 3 21 Additional Operations cee eseeceeseceeeseeseeseeeeeeseeeeeeeseaesseeeaee 3 22 Knob Control i wisi csicndilitehuisn aia aitienia totes a a 3 22 N me rc Edit Control eones i aa R E E R aa EE 3 23 Slide Control asesi aeeai e A E EA EEE A EN 3 24 Uti siran a aa a A E E E EE a aSr ERES 3 25 Measurement Studio User Manual vi ni com Contents Chapter 4 Developing with Measurement Studio Measurement Studio Menu ss sc esiescscascaashese ces
86. mand Clock Settinas status 1 Sample HW Timed Samples To Write 100 ON Samples Continuous Rate Hz 1000 E output Ready Figure 4 3 DAQ Assistant The DAQ Assistant interactively assists you in performing the following operations e Creating an NI DAQm x task class e Configuring an NI DAQmx task class e Generating a Visual Basic NET Visual C or Visual C class that includes the functionality you configure in the user interface e Generating code that uses an NI DAQmx task class e Using an NI DAQmx task class in a project Y 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 Measurement Studio User Manual 4 14 ni com Chapter 4 Developing with Measurement Studio Creating an NI DAQmx User Control You can create an NI DAQmx NET user control with Measurement Studio that provides a default graphical user interface to an NI DAQm x task The NI DAQmx User Control wizard wraps a configured NI DAQm x task class in a user friendly control You can drop the generated user control from the Visual Studio NET Toolbox onto a form and use it just as you use any Windows Forms control Tip For more information on how to create a user control refer to the Using a DAQmx Task Class in a Project topic in the NI Measurement Studio Help Walkthrough Creating
87. nalysis C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Matrix Multiplication Vv Vv Matrix Norm Y Y Matrix Rank Y Y Outer Product Y Y Pseudo Inverse Matrix Vv Vv QR Factorization Vv QR Factorization with Pivot Vv Matrix QR Factorization with Pivot Y Vector QZ Decomposition Y Schur Decomposition Y Solve Linear Equations Y Multiple Right Hand Solve Linear Equations Y Single Right Hand Special Matrix Y Y SVD Factorization Y Test Positive Definite Matrix Y Y Trace Vv Y Transpose Vv Vv Array and Numeric Operations 1D and 2D Array Arithmetic Vv Vv 1D and 2D Linear Evaluation Vv Y 1D and 2D Polynomial Vv Vv Evaluation 1D Polar to Rectangular Vv Vv 1D Rectangular to Polar Y Y Measurement Studio User Manual 3 10 ni com Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Complex Number Arithmetic Vv Vv Find Polynomial Roots Vv Vv Scale 1D and 2D Vv Y Curve Fitting Cubic Spline Fit Exponential Fit Exponential Fit Interval Gauss Fit Gauss Fit Interval General L
88. nd toggle the visibility of the scale e Fill the scale and configure the range color dimensions and style of the fill e Bind the value to a NET data source using NET data binding 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 e Configure the format of value labels to engineering or date time Use the Measurement Studio knob gauge and meter controls as shown in Figure 2 4 to input and display numeric data on your user interface Knob Gauge and Meter Controls Figure 2 4 Knob Gauge and Meter NET Controls Measurement Studio User Manual 2 22 ni com 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 and custom divisions and invert the scale to counter clockwise 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 DEA Figure 2 5 NET Slide Tank and Thermometer Controls Wit
89. near Evaluation Y Y 1D and 2D Polynomial Y Y Evaluation 1D Polar to Rectangular Y Y 1D Rectangular to Polar Y Y Complex Number Arithmetic Y Y Find Polynomial Roots Y Y Scale 1D and 2D Y Vv Curve Fitting Cubic Spline Fit Vv Exponential Fit Y Y Exponential Fit Interval Y Gauss Fit Y Gauss Fit Interval Vv General Least Squares Y Y Linear Fit General Polynomial Fit Y Y Goodness of Fit Y Linear Fit Y Y Linear Fit Interval Y Logarithm Fit Y Logarithm Fit Interval Y Nonlinear Fit Y Y 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 Power Fit Y Power Fit Interval Y Remove Outliers Y Statistics 1D 2D and 3D ANOVA Chi Square Distribution erf x and erfc x F Distribution Histogram Inverse Chi Square Distribution QSISPSYEN ESTES Inverse F Distribution Inverse Normal Distribution Inverse T Distribution Mean Median and Mode Moment about Mean Normal Distribution Polynomial Interpolation RMS Spline Interpolant Spline Interpolation Standard Deviation T Distribution Variance QISTSESENRTSYESESYTSISIESYSNYESTS Measurement
90. ns and their input and return parameters A collection of one or more files that 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 channel chart CodeBuilder coercion COM 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
91. nsform Eigen Vectors Backward Substitution Cholesky Factorization Complex Back Transform Eigen Vectors KISIS S Complex Cholesky Factorization S Complex Determinant Complex Dot Product Complex Eigen Vectors and Eigen Values Complex General Eigen AB Measurement Studio User Manual 2 6 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 Hessenberg Decomposition Vv Complex Inverse Matrix Complex Linear Equations Complex LU Factorization Complex Matrix Balance Complex Matrix Condition Number S KISIRI SIS Complex Matrix Norm Complex Matrix Rank Complex Outer Product Complex Pseudo Inverse Matrix KISIS S KISIS S Complex QR Factorization s Complex QR Factorization with Pivot Matrix s 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 KISIS S National Instruments Corporation 2 7 Measurem
92. ntrols gt Measurement Studio Visual C Windows Application Wizard Add Class Libraries Select the class libraries to add to the project Enterprise Analysis O DataSocket Communication Windows Forms User Interface Controls lt lt Back Cancel Tip Ifyou are working with an existing project you can access the Add Class Libraries j dialog box by selecting Measurement Studio Add Remove Class Libraries 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 Select the Windows Forms tab The Windows Forms tab contains controls and components included in the System Windows Forms namespace National Instruments Corporation 4 7 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio 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 The Text property will be highlighted Type Start for the button text 6 Select the Measurement Studio NET Tools tab on the Toolbox Measurement Studio NET Tools R Pointer a ComplexGraph BE DigitalWaveformGraph 3 Gauge it Knob Led EJ Legend SS Meter NumericEdit 4 PropertyEditor E
93. nu 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 With the Parameter Assistant you can select the correct parameter value for a device or resource as shown in Figure 4 5 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 B amp Q E Physical Channel l Channels Dev1 ail AO Channels Dev aol CI Channels Dev1 ctrO CO Channels Devi ctrO DlLine Channels Dev1 portO lineO DlPort Channels Dev port0 DOLine Channels Dev1 port0 lineO DOPort Channels Dev1 port0 Cater sl Oh siemete Pret tsin zi AO Channels Select an analog output physical channel Figure 4 5 Measurement Studio Parameter Assistant 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 Calling Instrument Drivers from NET Languages To use an IVI or VXI plug amp play instrument driver with a C DLL ina 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 Wi
94. o 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 Tip For more information about using the Utility class library refer to the Utility Visual 5 C Class Library Overview section in the NI Measurement Studio Help Measurement Studio User Manual 3 26 ni com Developing with Measurement Studio When you use Measurement Studio in the Visual Studio NET environment you have access to measurement and automation tools and features for Visual Basic NET Visual C and Visual C These integrated tools and features are designed to help you quickly and easily build measurement and automation applications This chapter includes the following sections to help you develop applications with Measurement Studio e Measurement Studio Menu e Creating a Measurement Studio Project e Walkthrough Creating a Measurement Studio Application with Windows Forms Controls and Analysis e Creating a Measurement Studio NI DAQmx Application e Walkthrough Creating a Measurement Studio NI DAQmx Application e Creating a Measurement Studio NI 488 2 or NI VISA Application e Walkthrough Creating a Measurement Studio Instrument I O A
95. on Use this library to design code that communicates with and controls instruments on National Instruments Corporation 2 13 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries a GPIB interface Use the NI 488 2 class library to configure and communicate with GPIB devices using the Device and Board classes Q Tip For information about easily creating a Measurement Studio NI 488 2 application using the Instrument I O Assistant refer to the Creating a Measurement Studio NI 488 2 or NI VISA Application section of Chapter 4 Developing with Measurement Studio 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 Use the NI DAQm x class library to communicate with and control NI data acquisition DAQ devices 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 Use the NI DAQmx class library to perform the following types of tasks e Analog signal measurement e Analog signal generation e Digital I O e Counting and timing e Pulse generation e Signal switching ag Tip For information about easily creating a NI DAQmx application using the DAQ Assistant refer to the Creating a Measurement Studio NI DAQmx Application or Walkt
96. orms Designer The user control is designed to be used either as a user interface element or if a user interface is not needed to be directly called from source code 6 Right click MyDAQmxUserControl cs in the Solution Explorer and select View Code Browse through the code that is opened in the MyDAQmxUserControl cs tab Notice that in addition to providing a custom UI for the task the DAQ Assistant has generated all the source code needed to run your task including the CreateTask CleanupTask and Read methods 7 Select Build Build Solution to build the solution so that the environment can recognize the control This step is a requirement of user controls in Visual Studio Measurement Studio User Manual 4 26 ni com Chapter 4 Developing with Measurement Studio To acquire data 1 Select the Form1 cs Design tab so that you can place UI controls on the form 2 Inthe Visual Studio NET Toolbox select MyDAQmxUserControl from the My User Controls tab and drag it to Forml1 MyDAQmxProject Microsoft Visual C NET design Form1 cs Design File Edit View Project Build Debug Data Tools Window Measurement Studio Help H h ecla gt Debug gt Toolbox A X MyDAQmxTask mxb Formi cs Design MyDAQmxUserControl cs C My User Controls o h Pointer Form1 E MyDAQmxUserControl Measurement Studio NE Measurement Studio C To Data Components Windows Forms Clipboard Ring General Er Server E pd Tool
97. ources As you work with Measurement Studio you might need to consult other 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 NET environment The NI Measurement Studio Help is fully integrated with the Visual Studio NET help You must have Visual Studio NET installed to view the online help and you must have the Microsoft NET Framework SDK 1 1 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 From the Windows Start menu select Start All Programs National Instruments Measurement Studio 8 0 for VS NET 2003 Measurement Studio Documentation The help launches in a stand alone help viewer From Visual Studio NET select Help Contents to view the Visual Studio NET table of contents The NJ Measurement Studio Help is listed in the table of contents From Visual Studio NET select Measurement Studio NI Measurement Studio Help The help launches within the application Tip As you work through this manual you will see italicized references to relevant help topics You can find these topics by using the table of contents in the NJ Measurement Studio Help Measurement Studio User Manual The following resources also are available to provide you with
98. pplication e Adding or Removing Measurement Studio Class Libraries e Selecting a Measurement Studio Parameter Value e Calling Instrument Drivers from NET Languages These 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 National Instruments Corporation 4 1 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio Measurement Studio Menu Measurement Studio User Manual The Measurement Studio Menu provides an easy way to access the following National Instruments resources and tools 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 Add Remove 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 Project Conversion Wizard Use the Project Conversion wizard to convert Measurement Studio 1 0 and 6 0 Visual C projects to the current version installed on your machin
99. raries e 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 e Configure the display mode as a visual representation of the value text only or both e Set the interaction mode to edit values or indicator National Instruments Corporation 2 27 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 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 Visual C Measurement Studio includes the following Visual C class libraries e 3D Graph e Analysis e Common e DataSocket e Instrument Drivers e LabVIEW Real Time Interface e Microsoft Excel Interface e Microsoft Word Interface e NI 488 2 e NI DAQmx e NI Reports e NI VISA e User Interface e Utility Refer to the following sections for information about each Measurement Studio Visual C class library National Instruments Corporation 3 1 Measurement Studio User Manual Chapter 3 Measurement Studio Visual
100. re 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 1D array Program in Measurement Studio that models the appearance and function of a physical instrument Measurement Studio User Manual G 10 ni com Glossary VISA Driver software architecture developed by National Instruments to unify instrumentation software for serial GPIB and VXI instruments or controllers It has been accepted as a standard for VXI by the VXI plug amp play Systems Alliance VXI VME eXtension for Instrumentation Instrumentation architecture and bus based on the VME standard Used in high end test applications W waveform graph A control that displays two dimensional data on a Windows Forms user interface displays data that is uniformly spaced in one dimension National Instruments Corporation G 11 Measurement Studio User Manual Index A B ActiveX controls in Visual C 3 2 Add Remove Class Libraries wizard 4 4 button control 3 20 adding or removing Measurement Studio class c libraries 4 4 Analysis calling Instrument Drivers from NET NET class library 2 2 Array and Numeric Operations table 2 9 Curve Fitting table 2 9 Enterprise An
101. rement Studio 8 0 Program Files NationalInstruments Measurement Studiov 2003 is different than the default directory for Measurement Studio 7 0 Program Files NationalInstruments MeasurementStudio70 If Measurement Studio 7 0 is installed on your machine when you install Measurement Studio 8 0 Measurement Studio 8 0 installs to the 7 0 directory If you prefer to install Measurement Studio 8 0 to the default 8 0 directory you must first uninstall all Measurement Studio class libraries including class libraries installed with National Instruments driver software such as NI VISA NI 488 2 and NI DAQmx 1 Current NI driver support for Windows XP x64 is limited Measurement Studio User Manual 1 2 ni com Chapter 1 Introduction to Measurement Studio Measurement Studio supports side by side installation of version 6 0 and 8 0 You must install Measurement Studio 6 0 and 8 0 to different directories Complete the following steps to install Measurement Studio These steps describe a typical installation Please review carefully all additional licensing and warning dialog boxes 1 Insert the Measurement Studio CD into the CD ROM autorun exe automatically starts If it does not automatically start double click the autorun exe icon 2 Click Install NI Measurement Studio Enter the serial number You can find your serial number on the Certificate of Ownership card that you received with Measurement Studio Click Next 4 Review
102. rmats 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 6 Click Token In the Token name text box enter Vendor to rename the first token You use this name to reference the token in your application Measurement Studio User Manual 4 34 ni com Chapter 4 Developing with Measurement Studio Selected Token Settings Token name Render Data Type Scaling Type String v Character Count zl M To end of data 7 Rename Token2 to Device 8 Select File Save to save your task Enter a command click Run Sequence to send command Termination character CURV x hn D gt Run this step Auto parse Parsing help Clear parsing Byte index Binary representation ASCII representation 00000000000 FF FF FFgOO FF O1 FFgrE FF 00000000015 FE F 3 00000000030 amp 3 3 3 3 lt 3 3 3 Bas 229 s 55am 00000000045 5 2oacb enue 00000000060 a 00000000075 Qa yea Ieee 00000000090 gt gt s naha 00000000105 TORP are annannnnnion Tae SYBNNIIN INS xl Bin and ASCII Byte order Big Endian Motorola gt Separators Selected Token Settings Token name Value waveforr Data Type Scaling le 009 Type E52 4 byte uint Aray 5e 008 Byte Count Array Size 125 numBytes 500 byte s v 0 Q To end of data
103. rporation 1 3 Measurement Studio User Manual Chapter 1 11 12 13 14 15 16 17 Introduction to Measurement Studio From the feature tree select the Device Drivers components you want to install To change a driver installation directory select the driver and click Browse Click Next In the Product Information dialog box carefully review important information about the features you are installing Click Next Review the license agreement and select I accept the License Agreement s Click Next In the Installation Summary dialog box review the features you selected Click Next When prompted click the appropriate registration options Click Finish to complete the installation Click the appropriate restart option Measurement Studio Package Comparison Chart Table 1 1 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 Table 1 1 Measurement Studio Package Comparison Chart Feature Standard Edition Professional Edition Enterprise Edition Project Wizards Vv Vv Vv User Interface Y Y Y Controls Standard Analysis Vv Vv Y Libraries GPIB Class Libraries Y Y Y VISA Class Libraries Y Y Y NI DAQmx Class Y Y Y Libraries NET Instrument Y Y Y Driver Wizard ActiveX Controls for Y Y Vi
104. rves 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 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 modific
105. se Response Function Network Functions avg Power and Frequency Estimate Scaled Time Domain Window Spectrum Unit Conversion Transfer Function QISFNTS INSISTS GESTS National Instruments Corporation 2 3 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 Signal Generation Arbitrary Wave Vv Chirp Pattern Vv Gaussian White Noise Impulse Pattern Pulse Pattern Ramp Pattern Sawtooth Wave Sinc Pattern Sine Pattern Sine Wave Square Wave Triangle Wave Uniform White Noise NSISENSYSUS QISPSIESESTSESTNYSESITSYSYS Windowing Blackman Window 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 Hamming Window QVISPNIESESYESESENRYSESISYS QINSPSESERYTSESESYSESISYS 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
106. se the scatter graph to display data that is arbitrarily spaced in two dimensions Measurement Studio User Manual 2 16 ni com Chapter 2 Measurement Studio NET Class Libraries Waveform and Scatter Graph controls Figure 2 1 Waveform Graph with Cursors and Scatter Graph 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 Plot Operations National Instruments Corporation Plot and chart data Configure a graph to contain multiple plots to show separate but related data on the same graph 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 2 17 Measurement Studio User Manual Chapter 2 Measurement Studio NET Class Libraries Axis Operations e Configure a graph to include multiple axes or independent ranges so that plot data fits the graph plot area e Configure the axis modes to fi
107. senberg Decomposition s Complex Inverse Matrix Complex Linear Equations Complex LU Factorization Complex Matrix Balance Complex Matrix Condition Number KISIRI SIS Complex Matrix Norm S Measurement Studio User Manual 3 8 ni com Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Complex Matrix Rank Vv Vv Complex Outer Product Y Y Complex Pseudo Inverse Matrix Y Y Complex QR Factorization Complex QR Factorization with Pivot Matrix 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 NS 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 Condition Number QINTSESPNYENSENSYSYESIENYSYS National Instruments Corporation 3 9 Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 A
108. sis 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 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 e Adding user interface controls to the project Using the Toolbox and the Properties window you will add and configure user interface controls including a button waveform graph legend gauge and numeric edit National Instruments Corporation 4 5 Measurement Studio User Manual Chapter 4 Developing with Measurement Studio e 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 e 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 following components are required to complete this walkthroug
109. sual Basic 6 0 Measurement Studio User Manual 1 4 ni com Chapter 1 Introduction to Measurement Studio Table 1 1 Measurement Studio Package Comparison Chart Continued Feature Standard Edition Professional Edition Enterprise Edition MFC and ActiveX Vv Y Controls for Visual C 6 0 Professional Analysis Y Y Libraries 3D Graph for Visual Y Y C User Interface Y Y Y DataSocket Binding DataSocket Server Y Y DataSocket Library Y Y Parameter Assistant Y Y Instrument Y Y I O Assistant DAQ Assistant Vv Vv Enterprise Analysis Y Libraries NI Reports Vv NI TestStand Y Integration LabWindows CVI Y Full Development System FDS 1 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 2 Included with the Device Drivers CD 3 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 4 Refer to the Enterprise Analysis section of Chapter 2 Measurement Studio NET Class Libraries for a list of the functionality included in the Enterprise Analysis class library National Instruments Corporation 1 5 Measurement Studio User Manual Chapter 1 Introduction to Measurement Studio Measurement Studio Res
110. sual C or Microsoft Visual C How To Use this Manual Measurement Studio 8 0 includes two CDs one with support for Visual Studio NET 2003 and one with support for Visual Studio 6 0 This manual documents the Visual Studio NET 2003 CD For help with Visual Studio 6 0 refer to the Measurement Studio Support for Visual Studio 6 0 Readme located on the Measurement Studio for Visual Studio 6 0 CD The Measurement Studio User Manual is organized into four chapters Chapter 1 Introduction to Measurement Studio is an overview of Measurement Studio This chapter includes installation and distribution 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 Developing with Measurement Studio includes information on using Measurement Studio tools and walkthrough sections 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 NET environment for function reference and detailed information about the Measurement Studio class libraries wizards assistants and other features National Instruments Corporation ix M
111. surement Studio help including function reference walkthroughs and conceptual topic documentation on developing with Measurement Studio e Additional 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 e Additional Online Resources Measurement Encyclopedia Use the online NI Measurement Encyclopedia to find information on measurement principles standards organizations and a wide range of technology and measurement terms e Preferences Use the Measurement Studio Preferences dialog box to configure Measurement Studio settings such as conversion options and add in preferences e Patents Use the Patents dialog box to view information about NI patents About NI Measurement Studio Use the NI Measurement Studio About box to view version information 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 Visual Basic NET Visual C and Visual C Refer to the following section Walkthrough Creating an Application with Windows Forms Controls and Analysis for step by step instructions on how to create a Measurement
112. ter 4 Developing with Measurement Studio SY Measurement Studio New DAQmx Task NATIONAL Select what type of DAQms task you want to add to your project INSTRUMENTS New ltem Copy Global Task Finish Cancel Tip Ifyou are working with an existing project you can access the New DAQmx Task dialog box by selecting Project Add New Item 9 Review the information in the New DAQmx Task Summary dialog box and click Finish The DAQ Assistant launches starting with the Create New dialog box To configure your task 1 Inthe Create New dialog box of the DAQ Assistant you can begin to interactively define your DAQ task Select Analog Input as the measurement type for your task 2 Next select Voltage Measurement Studio User Manual 4 20 ni com Chapter 4 Developing with Measurement Studio Create New NI DAQ DAQ Assistant Select the measurement type for your g seek r Voltage To have multiple measurement types within a single task you must first create gt Temperature the task with one measurement type After 5 f you create the task click the Add button b Strain to add a new measurement type to the task Current fe Resistance PR Frequency P Position E Acceleration 2 Custom Voltage with Excitation Sound Pressure P Analog Output 3 In Supported Physical Channels select the physical channel such as ail on the DAQ device to which you connected the voltag
113. terface 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 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 e GPIB e PXI Measurement Studio User Manual 3 18 ni com Chapter 3 Measurement Studio Visual C Class Libraries 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 a Measurement Studio NI 488 2 or NI VISA Application or Walkthrough Creating a Measurement Studio Instrument I O Application sections of Chapter 4 Developing with Measurement Studio 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 e Button e Graph e Knob e Numeric edit e Slide
114. tiveX 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 National Instruments Corporation 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 21 Measurement Studio User Manual 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
115. ts section in the NI Measurement Studio Help Adding or Removing Measurement Studio Class Libraries To add or remove Measurement Studio class libraries from a project use the Measurement Studio Add Remove 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 class libraries you want to add to or remove from a project 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 User Manual 4 4 ni com Chapter 4 Developing with Measurement Studio gt Measurement Studio Visual C Windows Application Wizard Add Class Libraries Select the class libraries to add to the project Enterprise Analysis Measurement Studio Hardware Class Libraries DAQms Library NI 488 2 Library VisaNS Library DataSocket Communication Windows Forms User Interface Controls Help lt lt Back Finish Cancel Figure 4 2 Measurement Studio Add Remove Class Libraries Wizard 0 Tip For more information about using the Add Remove Class Libraries wizard to add or remove Measurement Studio class libraries refer to the Adding or Removing Measurement Studio Class Libraries section in the NI Measurement Studio Help Walkthrough Creating a Measurement Studio Application with Windows Forms Controls and Analy
116. ts 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 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 Measurement Studio User Manual Glossary slider switch synchronous tank task TCP IP TestStand thermometer U UI V vector virtual instrument YD Moveable part of a slide control A control used to receive and control Boolean input in an application user interface Property 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 Transmission Control Protocol Internet Protocol A standard format for transferring data in packets from one computer to another The two parts of TCP IP a
117. 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 NET 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 cards and DAQPad devices which connect to a computer USB or 1394 FireWire port SCXI modules are considered DAQ devices Technology that simplifies live data exchange between applications and HTTP
118. ual C class library 3 15 deployment requirements 1 2 developing with Measurement Studio 4 1 digital waveform graph control 2 18 documentation conventions used in the manual x how to use manual set ix G gauge control 2 22 graph control 3D 3 2 ActiveX 3 21 complex 2 20 digital waveform 2 18 scatter 2 16 waveform 2 16 H help NI Measurement Studio Help 1 6 how to use manual set ix installation optional 1 2 procedure 1 2 requirements 1 1 instrument driver wizard NET 4 38 Instrument Drivers Visual C class library 3 15 Instrument I O Assistant 4 28 Measurement Studio User Manual l 2 K knob NET control 2 22 Visual C control 3 22 L LabVIEW Real Time Interface Visual C class library 3 16 LED control 2 25 legend control 2 21 Measurement amp Automation Explorer MAX 4 2 Measurement Studio developing with 4 1 home page 4 3 Menu 4 2 overview 1 1 package comparison chart 1 4 Preferences 4 3 resources 1 6 meter control 2 23 Microsoft Excel Interface Visual C class library 3 16 Microsoft Word Interface Visual C class library 3 17 NET class libraries Analysis 2 2 Common 2 12 NI 488 2 2 13 NI DAQm x 2 14 NI VISA 2 15 overview 2 1 User Interface 2 15 deployment requirements 1 2 ni com NI DAQ Assistant 4 13 NI Discussion Forums 4 2 NI Instrument Driver Network 4 2 NI Measurement Encyclopedia 4 3 NI Spy 4 2 NI 488 2 creating a 4
119. upport include the following Self Help Resources For answers and solutions visit the award winning National Instruments Web site 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 Free Technical Support All registered users receive free Basic Service which includes access to hundreds of Application Engineers worldwide in the NI Developer Exchange at ni com exchange National Instruments Application Engineers make sure every question receives an answer For information about other technical support options in your area visit ni com services or contact your local office at ni com contact e 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 e 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 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 manua
120. wed IIR IIR Cascade Inverse Chebyshev Kaiser SISSIES ESUS KISIRI SISIA SISS Signal Processing Autocorrelation Convolution Cross Correlation Cross Power Decimate Deconvolution Derivative x t Discrete Cosine Transform Discrete Sine Transform Fast Hartley Transform Fast Hilbert Transform Integral x t Inverse Fast Hartley Transform Inverse Fast Hilbert Transform Inverse Real and Complex Fast Fourier Transform FFT KISIRI SIRIS IS ISIS IR ISIR SIAS KRISISSE SIRIS AIS National Instruments Corporation Measurement Studio User Manual Chapter 3 Measurement Studio Visual C Class Libraries Table 3 1 Analysis C Library Measurement Types included in the Professional and Enterprise Packages Continued Analysis Visual C Library Professional Package Enterprise Package Peak Detection Y Y Power Spectrum Pulse Parameters Real and Complex FFT Threshold Peak Detector Unwrap Phase SISTENT SES NSIS ESYSNUS Linear Algebra Back Transform Eigen Vectors Backward Substitution Cholesky Factorization Complex Back Transform Eigen Vectors QSISUSYUS Complex Cholesky Factorization S Complex Determinant Complex Dot Product Complex Eigen Vectors and Eigen Values Complex General Eigen AB S Complex Hes
121. xed exact autoscaling loose autoscaling strip chart or scope chart e Use logarithmic axes with configurable bases Cursor Operations e Use cursors to identify key points in plots and the plot area e Configure cursor snap modes to be fixed floating nearest point and to plot e 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 e Create custom point and line styles for cursors 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 Additional Operations e Pan and zoom interactively e Configure major minor and custom divisions and origin lines e Copy the graph as a BMP GIF JPEG or PNG image to the clipboard or a file Tip For more information about using the waveform and scatter graph controls refer to F the Using the Measurement Studio Graph NET Controls section in the NI Measurement Studio Help Digital Waveform Graph Control Use the Measurement Studio digital waveform graph control as shown in Figure 2 2 to display Digitalwaveform data on a Windows Forms user interface Measurement Studio User Manual 2 18 ni com Chapter 2 Measurement Studio NET Class Libraries Digital Waveform Graph Control 0 l Waveform Signal S
122. zard Measurement Studio User Manual 4 38 ni com Chapter 4 Developing with Measurement Studio The Measurement Studio NET Instrument Driver wizard as shown in Figure 4 6 generates a NET wrapper class for calling into IVI VXI plug 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 WindowsApplication Categories Templates 4 Measurement Studio Local Project Items NET DAQmx Task DAQmx User Instrument Control Driver Wrapper J m Ni488 2 Task VisaNS Task 4 wrapper class For instrument drivers Name NiScope Figure 4 6 Launching the Measurement Studio NET Instrument Driver Wizard from the Add New Item Wizard Tip For information about the NET instrument driver wizard refer to the Using Instrument Drivers in Measurement Studio Applications section in the NI Measurement Studio Help National Instruments Corporation 4 39 Measurement Studio User Manual Technical Support and Professional Services Visit the following sections of the National Instruments Web site at ni com for technical support and professional services e Support Online technical support resources at ni com s

Download Pdf Manuals

image

Related Search

Related Contents

Manuale ALFREDO  全国循環器撮影研究会 皮膚線量推定プログラム 取扱説明書      WH-7900-C50-CL  Nissin i40 FT · MFT Sony Manual dt 2.indd  APC NetBotz 200  MODE D`EMPLOI SALARIÉ  Commune de Bussigny-près  取扱説明書 - " お客さま用  

Copyright © All rights reserved.
Failed to retrieve file