National Instruments 374318A-01 manuel d'utilisation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109

Aller à la page of

Un bon manuel d’utilisation

Les règles imposent au revendeur l'obligation de fournir à l'acheteur, avec des marchandises, le manuel d’utilisation National Instruments 374318A-01. Le manque du manuel d’utilisation ou les informations incorrectes fournies au consommateur sont à la base d'une plainte pour non-conformité du dispositif avec le contrat. Conformément à la loi, l’inclusion du manuel d’utilisation sous une forme autre que le papier est autorisée, ce qui est souvent utilisé récemment, en incluant la forme graphique ou électronique du manuel National Instruments 374318A-01 ou les vidéos d'instruction pour les utilisateurs. La condition est son caractère lisible et compréhensible.

Qu'est ce que le manuel d’utilisation?

Le mot vient du latin "Instructio", à savoir organiser. Ainsi, le manuel d’utilisation National Instruments 374318A-01 décrit les étapes de la procédure. Le but du manuel d’utilisation est d’instruire, de faciliter le démarrage, l'utilisation de l'équipement ou l'exécution des actions spécifiques. Le manuel d’utilisation est une collection d'informations sur l'objet/service, une indice.

Malheureusement, peu d'utilisateurs prennent le temps de lire le manuel d’utilisation, et un bon manuel permet non seulement d’apprendre à connaître un certain nombre de fonctionnalités supplémentaires du dispositif acheté, mais aussi éviter la majorité des défaillances.

Donc, ce qui devrait contenir le manuel parfait?

Tout d'abord, le manuel d’utilisation National Instruments 374318A-01 devrait contenir:
- informations sur les caractéristiques techniques du dispositif National Instruments 374318A-01
- nom du fabricant et année de fabrication National Instruments 374318A-01
- instructions d'utilisation, de réglage et d’entretien de l'équipement National Instruments 374318A-01
- signes de sécurité et attestations confirmant la conformité avec les normes pertinentes

Pourquoi nous ne lisons pas les manuels d’utilisation?

Habituellement, cela est dû au manque de temps et de certitude quant à la fonctionnalité spécifique de l'équipement acheté. Malheureusement, la connexion et le démarrage National Instruments 374318A-01 ne suffisent pas. Le manuel d’utilisation contient un certain nombre de lignes directrices concernant les fonctionnalités spécifiques, la sécurité, les méthodes d'entretien (même les moyens qui doivent être utilisés), les défauts possibles National Instruments 374318A-01 et les moyens de résoudre des problèmes communs lors de l'utilisation. Enfin, le manuel contient les coordonnées du service National Instruments en l'absence de l'efficacité des solutions proposées. Actuellement, les manuels d’utilisation sous la forme d'animations intéressantes et de vidéos pédagogiques qui sont meilleurs que la brochure, sont très populaires. Ce type de manuel permet à l'utilisateur de voir toute la vidéo d'instruction sans sauter les spécifications et les descriptions techniques compliquées National Instruments 374318A-01, comme c’est le cas pour la version papier.

Pourquoi lire le manuel d’utilisation?

Tout d'abord, il contient la réponse sur la structure, les possibilités du dispositif National Instruments 374318A-01, l'utilisation de divers accessoires et une gamme d'informations pour profiter pleinement de toutes les fonctionnalités et commodités.

Après un achat réussi de l’équipement/dispositif, prenez un moment pour vous familiariser avec toutes les parties du manuel d'utilisation National Instruments 374318A-01. À l'heure actuelle, ils sont soigneusement préparés et traduits pour qu'ils soient non seulement compréhensibles pour les utilisateurs, mais pour qu’ils remplissent leur fonction de base de l'information et d’aide.

Table des matières du manuel d’utilisation

  • Page 1

    Measurement Studio TM Measurement Computing TM Edition User Manual Measurement Studio for MCC User Manual Mar ch 2006 374318A-01[...]

  • Page 2

    Worldwide Technical Support and Product Info rmation ni.com National Instruments Corporate Headquarters 11500 North Mopac Expressway Aust in, 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, Czec[...]

  • Page 3

    Important Information Warranty The media on which you receive Natio nal In struments software are warranted not t o fail to execute pr ogramming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as eviden ced by receipt s or other documentation. N ational Instruments will , at its option, repa[...]

  • Page 4

    WARNING REGARDING USE OF MEA SUREME NT COMPUTING CORPORATION PRODUCTS MEASUREMENT COMPUTING CORPORATION DOES NOT AU THORIZE ANY MEASUREM ENT COMPUTING CORPORATION PRODUCT FOR USE IN LIFE SUPPORT SYST EMS AND/OR DEVICES WITH OUT WRITTEN APPROVAL OF TH E CEO OF MEASUREMENT COMPUTING CORPORATION. LIFE SUPPORT DEVICES/SY STEMS ARE DEVICES OR SYSTEM S W[...]

  • Page 5

    © National Instruments Corporation v M easurement Studio for MCC User Manual Contents About This Manual How To Use this Manual .............. ............ .............. ........... .............. ............ .............. .... ix Conventions ............ ........... .............. ............ .............. ........... .............. .........[...]

  • Page 6

    Contents Measurement Studio for MCC User Manual vi ni.com Numeric Edit Control ..................... ........... .............. .............. ............ .............. 2-17 Switch and LED Controls ........ ........... .............. ............ .............. ........... ......... 2-18 Property Editor Control .................. ........... ....[...]

  • Page 7

    Contents © National Instruments Co rporation vii Measurement St udio for MCC User Manual Appendix A Contacting Measurement Computing Corp. Glossary Index[...]

  • Page 8

    © National Instruments Corporation ix M easurement Studio for MCC User Manual About This Manual The Measur ement Studio Measur ement Computing Ed ition User Manual introduces the concepts associated with the Measurement Studio class libraries and development tools. This manual assumes th at you have a general working knowledge of Microsoft V isual[...]

  • Page 9

    About This Manual Measurement Studio for MCC User Manual x ni.com Conventions The following con v entions appear in this manual: <> T ext enclosed in angle brackets repr esents directory names and parts of paths that may v ary on dif ferent computers , such as < WindowsSystem >. » The » symbol leads you through nested menu items and [...]

  • Page 10

    © National Instruments Corporation 1-1 Measurement Studio for MCC User Manual 1 Introduction to Measurement Studio Measurement Computing Edition Measurement Studio Measurement Co mputing Edition is an integrated suite of tools and class libraries that are designed for developers using .NET W indo ws and ASP .NET to develop meas urement and automat[...]

  • Page 11

    Chapter 1 Introduction to Measurement Studio Measurement Computing Edition Measurement Studio for MCC User Manual 1-2 ni.com integrated tools) or V i sual C#, V isual Basic, or V isual C++ Expre ss Editions of Microsoft V i sual Studio 2005 Measurement Studio integration tools are not supported in the V isual Studio 2005 Exp ress Editions. • Inte[...]

  • Page 12

    Chapter 1 Introduction to Measurement Studio Measurement Computing Edition © National Instruments Corporation 1-3 Measurement Studio for MCC User Manual 2. Click Install NI Measurement Studio for Visual Studio .NET 2003 or click Install NI Measurement Stud io for Visual Studio 2005 . 3. Click Next to install all NI sof tware to the default install[...]

  • Page 13

    Chapter 1 Introduction to Measurement Studio Measurement Computing Edition Measurement Studio for MCC User Manual 1-4 ni.com Measurement Studio Features The following list contains features included in Measurem ent Studio . Refer to mccdaq.com/mstudio for more information about the features and functionality in cluded in M easurement Studi o. • W[...]

  • Page 14

    Chapter 1 Introduction to Measurement Studio Measurement Computing Edition © National Instruments Corporation 1-5 Measurement Studio for MCC User Manual The following resources also are av ailable to provide you with information about Measurement Studio. • Examples—Measurem ent Studio installs examples to the following paths: – V isual Basic[...]

  • Page 15

    © National Instruments Corporation 2-1 Measurement Studio for MCC User Manual 2 Measurement Studio Measurement Computing Edition .NET Class Libraries This chapter provides overview information about the .NET class libraries included with Measurement Studio Measurement Computing Edition support for Visual Studio .NET 2003 and Visual Studio 2005. Re[...]

  • Page 16

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-2 ni.com Analysis The Measurement Studio Analysis .NET class library is in the NationalInstruments.Analysis namespace. The Analysis c lass library includes a set of classes that provides vario us digital signal processing, sign[...]

  • Page 17

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-3 Measurement Studio for MCC User Manual •S i n e W a v e •S q u a r e W a v e • T riangle W av e • Uniform White Noise Windowing • Blackman W indow • Blackman-Harris W indo w • Blackman-Nuttall W indo w • Cosine T [...]

  • Page 18

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-4 ni.com • IIR Cascade • In v erse Chebyshe v •K a i s e r Signal Processing • Autocorrelation • Con volution •C r o s s P o w e r • Cross Correlation • Decimate • Decon v olution • Deri v ati ve x(t) • Di[...]

  • Page 19

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-5 Measurement Studio for MCC User Manual • Determinant • Dot Product • In v erse Matrix • Matrix Condition Number • Matrix Multiplication •M a t r i x N o r m • Matrix Rank • Outer Product • Pseudo In verse Matrix[...]

  • Page 20

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-6 ni.com Statistics • Histogram • Mean • Median and Mode • Moment about Mean Tip For more information about analyzing or generating data with the Analysis class library , refer to the Using th e Measur ement Studio Anal[...]

  • Page 21

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-7 Measurement Studio for MCC User Manual MCC-488.2 The Measurement Studio MCC-488.2 .NET class library is in the MccDaq.Mcc4882 namespace. This class library is included when you install the MCC-488.2 driver . The MCC-488.2 class l[...]

  • Page 22

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-8 ni.com User Interface The Measurement Studio user interface controls are in the Windo ws F orms and W eb Forms .NET class libraries. Refe r to T able 2-1 for the UI controls provided b y Measurement Studio. Table 2-1. Measure[...]

  • Page 23

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-9 Measurement Studio for MCC User Manual Windows Forms Controls The Measurement Studio user interface controls are in the Windows Forms .NET class library. The Windows Forms .NET cla ss library is in the NationalInstruments.UI.Wind[...]

  • Page 24

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-10 ni.com W aveform Graph and Scatter Graph Controls Use the Measurement Studio wa veform graph and scatter graph controls, as shown in Figure 2-1, to display two-dimensional data on a Windo ws F orms user interface. Use the w [...]

  • Page 25

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-1 1 Measurement Studio for MCC User Manual • Specify plots in the scatter graph control as X and Y data. Specify plots in the wa veform graph control as X or Y data and optionally with date and time scaling. • Use the extensibl[...]

  • Page 26

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-12 ni.com • Copy the graph as a BMP , GIF , JPEG, or PNG image to the clipboard or a file. Tip For more information about using the wa veform and scatter graph controls, refer to the Using the Measur ement Studio W i ndows F [...]

  • Page 27

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-1 3 Measurement Studio for MCC User Manual • Specify anti-aliased di gital plots. • Expand and collapse signal plots interactiv ely . Waveform Sample and Signal State Operations • Simultaneously display waveforms and signals [...]

  • Page 28

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-14 ni.com Figure 2-3. Windows Forms Comp lex Graph Control W ith the comple x graph control and the classes that interface with the control, you can perform the fo llo wing operations: Plot Operations • Plot and chart Complex[...]

  • Page 29

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-1 5 Measurement Studio for MCC User Manual Additional Operations • Pan and zoom interacti v ely . • Configure major , minor , an d custom divisions and origin lines. • Copy the graph as a BMP , GIF , JPEG, or PNG image to the[...]

  • Page 30

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-16 ni.com • Customize the appearance of the control using 3D lab styles or classic 2D styles and change the color and leng th of ticks and labels. • Configure the format of value labels to engineering or date/time. Use the [...]

  • Page 31

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-1 7 Measurement Studio for MCC User Manual W ith the slide, tank, and thermometer controls and the cla sses that interface with them, you can perform the fo llo wing operations: • Fill to the minimum or maxi mum value of the scal[...]

  • Page 32

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-18 ni.com Tip For more information abou t using the W indows F orms numeric edit control, refer to the NumericEdit Class section in the NI Measur ement Studio Help . Switch and LED Controls Use the Measurement Studio switch an [...]

  • Page 33

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-1 9 Measurement Studio for MCC User Manual Property Editor Control Use the Measurement Studio propert y editor control, as shown in Figure 2-9, to configure properties for Windo ws Forms controls at run time. Figure 2-9. Windows Fo[...]

  • Page 34

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-20 ni.com Tip For more information about using the prop erty editor control, refe r to the Using the Measur ement Studio W i ndows F orms Property Editor Contr ol topic in the NI Measur ement Studio Hel p . Measurement Studio S[...]

  • Page 35

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-2 1 Measurement Studio for MCC User Manual Switch and LED Array Controls Use the Measurement Studio switch and LED array controls as an array of Boolean controls on a W indo ws F orms user interf ace. Y ou typically use a switch ar[...]

  • Page 36

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-22 ni.com Numeric Edit Array Control Use the Measurement Studio numeric edit array control, as shown in Figure 2-11, to con trol and visu alize values of an array of double va lu es . Figure 2-11. Numeric Edit Array control W i[...]

  • Page 37

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-2 3 Measurement Studio for MCC User Manual ASP .NET W eb Forms Controls The Measurement Studio ASP .NET user interface controls are in the W eb Forms .NET class library . The W eb Forms .NET class library is in the NationalInstrume[...]

  • Page 38

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-24 ni.com W aveform Graph and Scatter Graph Controls Use the Measurement Studio wa veform graph and scatter graph controls, as shown in Figure 2-12, to display two-dimensional data on a W eb-based user interface. Use the w av e[...]

  • Page 39

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-2 5 Measurement Studio for MCC User Manual • Specify plots in the scatter graph control as X and Y data. Specify plots in the wa veform graph control as X or Y data and optionally with date and time scaling. • Use the extensibl[...]

  • Page 40

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-26 ni.com Tip For more information about using the wa veform and scatter graph controls, refer to the Using the Measurement Studio W eb F orms Scatter and W aveform Graph .NET Contr ols section in the NI Measurement Studio Help[...]

  • Page 41

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-2 7 Measurement Studio for MCC User Manual W ith the digital wa v eform graph control and the classes that interface with the control, you can perfor m the following operations: Plot Operations • Plot digital wav eform data, incl[...]

  • Page 42

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-28 ni.com Complex Graph Control Use the Measurement Studio comple x graph control, as shown in Figure 2-14, to display ComplexDouble data on a ASP .NET W eb application. A ComplexDouble consists of a real part and an imaginary [...]

  • Page 43

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-2 9 Measurement Studio for MCC User Manual Axis Operations • Configure a graph to include multip le ax es or independent ranges so that plot data f its the graph plot area. • Configure the axis modes to f ixed, e xact autoscali[...]

  • Page 44

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-30 ni.com W ith all of the numeric controls and the classes that interface with them, you can perform t he following operations: • Configure the scale to be linear or logarithmic and toggle the visibility of the scale. • Fi[...]

  • Page 45

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-3 1 Measurement Studio for MCC User Manual W ith the knob, gauge, and meter contro ls and the cla sses that interface with the controls, you can perform the fo llowing operations: • Specify the start and sweep angle of the arc pr[...]

  • Page 46

    Chapter 2 Measurement Studio Mea suremen t Computing Edition .NET Class Libraries Measurement Studio for MCC User Manual 2-32 ni.com Numeric Edit Control Use the Measurement Studio numeric edit control, as shown in Figure 2-1 7, to display numeric values and to prov ide a way b y which end users can edit numeric values. T ypically , you u se a nume[...]

  • Page 47

    Chapter 2 Measurement Studio Measurement Computing Edi tion .NET Class Libraries © National Instruments Corporation 2-3 3 Measurement Studio for MCC User Manual Switch and LED Controls Use the Measurement Studio switch an d LED controls as Boolean control s in an ASP.NET Web application. You typically use a switch control to receive and control Bo[...]

  • Page 48

    © National Instruments Corporation 3-1 Measurement Studio for MCC User Manual 3 Measurement Studio Integrated T ools and Features When you use Measurement Studio in the V isu al Studio en vironment, you hav e access to measurement and auto mation tools and features for . NET W indo ws and ASP .NET . These integrated tools and features are designed[...]

  • Page 49

    Chapter 3 Measureme nt Studio Integrated T ools and Features Measurement Studio for MCC User Manual 3-2 ni.com • Instrument Driver Netw ork —Use the NI Instrument Dri v er Network at ni.com/i dnet as a central resource for do wnloading, dev eloping, and submitting instrument driv ers. Select Measureme nt Studio Online Resources»Instrument Dri [...]

  • Page 50

    Chapter 3 Measurement Studio Integrated T ools and Features © National Instruments Corporation 3-3 Measurement Studio for MCC User Manual Figure 3-1. New Project dialog box in Visual Studio 2005 Tip For more information about using project templates to create a ne w Measurement Studio project, refer to the Cr eating a New Measur ement Studio Pr oj[...]

  • Page 51

    Chapter 3 Measureme nt Studio Integrated T ools and Features Measurement Studio for MCC User Manual 3-4 ni.com Figure 3-2. Measurement Studio Add/Remo ve Class Librarie s Wizard for Visual Studio 2005 Tip For more information about using the Add/Remove Class Libraries wizard to add or remov e Measurement Studio cl ass libraries, refer to the Adding[...]

  • Page 52

    © National Instruments Corporation 4-1 Measurement Studio for MCC User Manual 4 Getting Started with Measurement Studio The following sections include over view information and step-by-step instructions on developing applicat ions with Measurement Studio tools and features. Refer to the Developing with Measurement Studio section and the Getting St[...]

  • Page 53

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-2 ni.com W alkthrough: Creating a Measurement Studio Application with Windows Forms Controls and Analysis in Visual Studio .NET 2003 Measurement Studio includes user inte rface controls, such as a waveform graph control and a gauge control, and analysis func[...]

  • Page 54

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-3 Measurement Studio for MCC User Manual 4. In the T empl ates pane, select Windows A p plication . Specify MyMeasurementStudioProject for Name and specify a Location of your choice. 5. Click OK . The Measurement Studio Application Wi zard launches. 6. Select A[...]

  • Page 55

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-4 ni.com Adding user interface controls to the project In this section, you will build a user in terface that looks like Form1 in the following screen shot. 1. Select V iew»T oolbox to display the T oolbox. The T oolbox contains components and controls that[...]

  • Page 56

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-5 Measurement Studio for MCC User Manual 9. T ype 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 arro w to resize it. 11. Select the Legen[...]

  • Page 57

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-6 ni.com The follo wing screenshot sho ws Form1 with the u ser controls. Generating, plotting, and analyzing the data 1. Double-click the button contr ol to display t he Form1 code, with the cursor inside the click ev ent handler of the button control. 2. Ad[...]

  • Page 58

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-7 Measurement Studio for MCC User Manual // Use the PlotY method to plot the data. Plot.PlotY(data); // Use the Mean method to calculate the mean of the data. double mean = Statistics.Mean(data); // Display the mean on the gauge. gauge.Value = mean; Customizing[...]

  • Page 59

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-8 ni.com the Auto Format feature configures the appropriate co ntrol properties to reflect the style you chose. 4. Select Po ints Only . Click OK . Notice that the legend changed automatically to match the format ting of the graph. 5. Right-click the gauge a[...]

  • Page 60

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-9 Measurement Studio for MCC User Manual 12. Select the Format Mode property and in the Numeric Edit F ormat Mode Editor dialog box, change the Precisi on to 4 . 13. Select File»Save F orm1.cs to sa v e your application. 14. Select Debug»Start Without Deb ugg[...]

  • Page 61

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-10 ni.com functionality to a Windo ws F orms application by taking you through the following steps: • Setting up the project —Using the V isu al Studio New Project dialog box, you will create a ne w project that references the Measurement Studio Measurem[...]

  • Page 62

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-1 1 Measurement Studio for MCC User Manual Application W izard automatically adds references to the appropriate class libraries. Tip If you are working with an existing proj ect, you can access the Add Class Libraries dialog box by selecting Measurement Studio?[...]

  • Page 63

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-12 ni.com 7. Select the Meter control and drag and drop it on to the form. 8. Right-click the m eter and select Properties to display the Properties window . 9. Set the CoercionIntervalBa se property for the meter to –10 . 10. Set the Range property for th[...]

  • Page 64

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-1 3 Measurement Studio for MCC User Manual private System.ComponentModel.Cont ainer components = null; public Form1() { // Required for Windows Form Desig ner support InitializeComponent(); daqBoard =new MccDaq.MccBoard(0); 3. Scroll down to move the cursor ins[...]

  • Page 65

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-14 ni.com The follo wing screenshot sho ws Form1 with th e meter disp laying the acquired value. W alkthrough: Creating a Measurement Studio MCCDaq Scan Components Application in Visual Studio .NET 2003 Measurement Studio includes a co mponent library and ap[...]

  • Page 66

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-1 5 Measurement Studio for MCC User Manual • Generating and displa ying the data —Using the MccDaq.Scan components, you will read data fr om a channel on an Measurement Computing de vice, con v ert the data object to an array , and show the v alue on a wa v[...]

  • Page 67

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-16 ni.com 3. In the Project T ypes pa ne, expand the Measurement Studio Projects folder . Select V isual Basic Pr ojects or V isual C# Projects , depe nding on which language you want to create the project in. 4. In the T empl ates pane, select Windows A p p[...]

  • Page 68

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-1 7 Measurement Studio for MCC User Manual Adding user interface controls to the project 1. Select V iew»T oolbox to display the T oolbox. The T oolbox contains components and controls that you can add to your project. 2. Select the Win d ow s Fo rm s tab . Th[...]

  • Page 69

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-18 ni.com The follo wing screenshot shows Form1 with the us er controls. The AIScan component is shown in the component tray . Generating and disp laying the data 1. Double-click the Start b utton to display the Form1 code. 2. Add the following line of code [...]

  • Page 70

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-1 9 Measurement Studio for MCC User Manual [C#] // This stops the scan private void button2_Click(object se nder, System.EventArgs e) { aiScan1.Stop(); } 5. Double-click the AIScan component to open the code window . 6. Add the following lines of code to the Da[...]

  • Page 71

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-20 ni.com 8. Select File»Sav e F orm1.cs to sav e your application. 9. Select Debug»Start W ithout Debugging to run the applicati on. 10. After your program builds and runs, click Start Scan . The follo wing screenshot sho ws Form1 with the wa veform graph[...]

  • Page 72

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-2 1 Measurement Studio for MCC User Manual • MCC-488.2 Library • Measurement Computing GPIB De vice Setting up the project 1. Open V isual Studi o .NET from Start»All Programs»Microsoft V isual Studio .NET 2003»Microsoft V i sual Studio .NET 2003 . 2. Se[...]

  • Page 73

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-22 ni.com 7. Click Finish to display Form1 in the W indows Forms Designer . Adding user interface controls to the pr oject 1. Select V iew»T oolbox to display the T oolbox. The T oolbox contains components and controls that you can add to your project. 2. S[...]

  • Page 74

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-2 3 Measurement Studio for MCC User Manual Generating and displa ying the data 1. Double-click the button control to display the Form1 code, with the cursor inside the click ev ent handler of the button control. 2. Add the following code to read a ra w data poi[...]

  • Page 75

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-24 ni.com ' convert the string to a double Dim D As Double = Convert.ToDouble(S .Replace(NlChar, NullChar)) 'Plot the point WaveformGraph1.PlotYAppend(D, 1) Next System.Runtime.InteropServices.Marsh al.FreeHGlobal(Buffer) [C#] stringwrtString = &qu[...]

  • Page 76

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-2 5 Measurement Studio for MCC User Manual The follo wing screenshot sho ws Form1 with the graph displaying the acquired value. Measurement Studio W alkthroughs for Visual Studio 2005 Use the following walkthroughs to help you dev elop Measurement Studio applic[...]

  • Page 77

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-26 ni.com W alkthrough: Creating a Measurement Studio Application with Windows Forms Controls and Analysis in Visual Studio 2005 Measurement Studio includes user inte rface controls, s uch as a wa veform graph control and a gauge control, and analysis funct [...]

  • Page 78

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-2 7 Measurement Studio for MCC User Manual 3. In the Project types pa ne, select Measurement S tudio under V isual C# or V isual Basic, depending on which language you want to create the project in. 4. In the T empl ates pane, select NI Windows A pplication . S[...]

  • Page 79

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-28 ni.com Tip IIf you are working with an existing pr oject, you can access the Add/Remov e Class Libraries dialog box by selecting Measure ment Studio»V iew .NET Class Library Wizard . 7. Click Finish to display Form1 in the W indows F orms Designer .[...]

  • Page 80

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-2 9 Measurement Studio for MCC User Manual Adding user interface controls to the project In this section, you will build a user in terface that looks like Form1 in the following screenshot. 1. Select V iew»T oolbox to display the T oolbox. The T oolbox contain[...]

  • Page 81

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-30 ni.com 7. Select the W av eformGraph control and drag and drop it onto the form. 8. Right-click the waveform graph and select Edit Plots to display the W av eformPlot Collection Editor dialog box. Y ou use the W av eformPlot Collection Editor to add or re[...]

  • Page 82

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-3 1 Measurement Studio for MCC User Manual Note Y ou can also access the W av eformPlot Collect ion Editor dialog box by clicking the wa veform graph smart tag. Y ou access the smar t tag by right-clicking the arro w b utton in the upper right corn er of the co[...]

  • Page 83

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-32 ni.com The follo wing screenshot sho ws Form1 with the u ser controls.[...]

  • Page 84

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-3 3 Measurement Studio for MCC User Manual Generating, plotting, and analyzing the data 1. Double-click the button contr ol to display t he Form1 code, with the cursor inside the click ev ent handler of the button control. 2. Add the following code to generate [...]

  • Page 85

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-34 ni.com Customizing your user interface 1. Right-click the legend and select Edit Items to display the LegendItem Collection Editor dial og box. Y ou use the LegendItem Collection Editor to add or remove legend items and to configure legend item properties[...]

  • Page 86

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-3 5 Measurement Studio for MCC User Manual 5. Click the gauge smart tag to displa y the Gauge T asks. 6. Select Au t o Fo r m a t to display the Au to Format dialog box. 7. Select Dark and click OK . 8. Right-click the gauge and select Properties to display the[...]

  • Page 87

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-36 ni.com 16. After your program builds and runs, click Start . Notice the graph shows the data plot, and the gauge and the numeric edit display the mean of the data. 17. The following screenshot sho ws Form1 with customization. W alkthrough: Creating a Meas[...]

  • Page 88

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-3 7 Measurement Studio for MCC User Manual • 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 interf ace. Before You B[...]

  • Page 89

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-38 ni.com 5. Click OK . The Measurement Studio ASP .NET W eb Site W izard launches. 6. Select Analysis and W eb Forms User Interface Controls . Tip If you are working with an existing project, you can access the Measurement Studio ASP .NET W eb Site Wizard d[...]

  • Page 90

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-3 9 Measurement Studio for MCC User Manual Adding user interface controls to the project In this section, you will build a Web page that looks like the foll owing screenshot. 1. Select V iew»T oolbox to display the T oolbox. The toolbox contai ns components an[...]

  • Page 91

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-40 ni.com 8. Scroll to the T ext property in the Properties window . T ype Start for the button text. 9. Select the Measurem ent Studio tab on the T ool box. 10. Select the WaveformGraph control and drag and drop it in to a table cell. 11. On the wav eform g[...]

  • Page 92

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-4 1 Measurement Studio for MCC User Manual 14. On the numeric edit smart tag, type numericedit for the Name of the numeric edit ID. 15. Select the Gauge control and drag and drop it into a table cell . 16. On the gauge smart tag, type gauge for the Name of the [...]

  • Page 93

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-42 ni.com Generating, plotting, and analyzing the data 1. Double-click the button contr ol to display t he Default.aspx.cs code, with the cursor inside the click event handler of the b utton control. 2. Add the following code to generate random data, plot th[...]

  • Page 94

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-4 3 Measurement Studio for MCC User Manual [C#] // Declare and initialize an instanc e of WhiteNoiseSignal. WhiteNoiseSignal whiteNoise = new Wh iteNoiseSignal(); // Store the generated data in a dou ble array named data. double[] data = whiteNoise.Generate( 10[...]

  • Page 95

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-44 ni.com 3. Select graph, Plots[0] in the Source drop-down list and enter Signal in the Te x t box. Click OK . Now that you hav e specified a le gend item for the plot, changes you make to the plot are reflected on the legend. 4. Right-click the g raph and [...]

  • Page 96

    Chapter 4 Getting Started with Measure ment Studio © National Instruments Corporation 4-4 5 Measurement Studio for MCC User Manual 7. Select Dark and click OK . 8. Right-click the gauge and select Properties to display the Properties window . 9. Set the Range property for the gauge with the drop-down Range type editor . T ype -0.2 for the minimum [...]

  • Page 97

    Chapter 4 Getting Started with Measur ement Studio Measurement Studio for MCC User Manual 4-46 ni.com The following screenshot sho ws the W eb page with customization.[...]

  • Page 98

    © National Instruments Corporation A-1 Measurement Studio for MCC User Manual A Contacting Measurement Computing Corp. You can reach Measurement Computing Corp. through the following ways: Mail Measurement Computing Corp. 16 Commerce Blvd. Middleboro, MA 02346 T elephone 508-946-5100 FAX 508-946-9500 Technical Support techsupport@MeasurementComput[...]

  • Page 99

    © National Instruments Corporation G-1 Measurement Studio for MCC User Manual Glossar y A analog I/O Reading or writing dat a in continuously variable physical quantities, such as voltage or current. annotate Adding text, arro ws, or shapes to describe or highlight a po int or region on a graph. API Application Programming Interface. A specificati[...]

  • Page 100

    Glossary Measurement Studio for M CC User Manual G-2 ni.com coercion Automatic con version that Measurem ent Studio controls perform to change the numeric representation of a data element. complex graph A control that displays a ComplexDouble data type; the ComplexDouble data type represents a complex number of type Double that is composed of a rea[...]

  • Page 101

    Glossary © National Instruments Corporation G-3 Measurement Studio for MCC User Manual distribution Ability to install programs you dev elop with Measurement Studio to others working on dif ferent computers. DLL Dynamic Link Library . A library of functions that link to a pro gram and load at run time rather than bein g compiled into the program. [...]

  • Page 102

    Glossary Measurement Studio for M CC User Manual G-4 ni.com G gauge A control used to input or display numerical data. GPIB General Purpose Interf ace Bus. The standard b us used for controlling electronic instruments with a computer . Also called IEEE 488 bus because it is defined b y ANSI/IEEE Standards 488-1978, 488.1-1987, and 488.2-1987. graph[...]

  • Page 103

    Glossary © National Instruments Corporation G-5 Measurement Studio for MCC User Manual L LED Light-Emitting Diode. An ind icator th at emits a light when current passes through it. For example, an LED sho ws if your computer or printer is turned on. legend A control that displays symbols and descriptions for a specific set of elements of another o[...]

  • Page 104

    Glossary Measurement Studio for M CC User Manual G-6 ni.com P PCI Peripheral Component Interconnect . High-performance expansion bus architecture commonly found in PCs. plot 1. T race (data line) on a graph repres enting the data in one ro w or column of an array . 2. T o display a ne w set of data while deleting any pre vious data on the graph. po[...]

  • Page 105

    Glossary © National Instruments Corporation G-7 Measurement Studio for MCC User Manual scatter graph A control that displ ays two-dimensional data on a Windo ws Forms or W eb Forms user interf ace; displays a graph of X and Y data pairs. scope See oscilloscope . serial Standard serial bus on a computer used to co mmunicate with ins truments. Also [...]

  • Page 106

    Glossary Measurement Studio for M CC User Manual G-8 ni.com V vector 1D array . VXI VME eXtension for Instrumentation. Instrumentation architecture and bus based on the VME standard. Used in high-end test applicati ons. W wa v eform grap h A control that displa ys tw o-dimensio nal data on a W indows F orms or W eb Forms user interf ace; displays d[...]

  • Page 107

    © National Instruments Corporation I-1 Measurement Studio for MCC User Manual Index A Add/Remov e Class Li braries wizard, 3-3 adding or removing Measurement Studio class libraries, 3-3 Analysis .NET class library Array and Numeric Operations (list), 2-5 Curve Fitting (list), 2-5 Filters (list), 2- 3 Linear Algebra (list), 2-4 Measurements (list),[...]

  • Page 108

    Index Measurement Studio for M CC User Manual I-2 ni.com I InstaCal, 3-1 installation optional, 1-2 requirements, 1-1 K knob .NET control, 2-16 .NET W eb Forms control, 2-30 L LED array control, 2-21 LED control, 2-1 8, 2-33 legend control, 2-15, 2-29 M MCC-488.2 .NET class library, 2-7 Measurement Studio dev eloping with, 3-1 Menu, 3-1 ov ervie w,[...]

  • Page 109

    Index © National Instruments Corporation I-3 Measurement Studio for MCC User Manual U User Interface .NET class library, 2-8, 2-23 AutoRefresh, 2-33 complex graph, 2-13, 2-28 digital wav eform graph, 2-12 , 2-26 gauge, 2-15, 2-29 knob, 2-15, 2-29 LED, 2-18, 2-33 legend, 2-15, 2-29 meter, 2-15, 2-29 numeric edit, 2-17, 2-32 property editor, 2-19 sc[...]