National Instruments none 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179

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 none. 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 none 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 none 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 none devrait contenir:
- informations sur les caractéristiques techniques du dispositif National Instruments none
- nom du fabricant et année de fabrication National Instruments none
- instructions d'utilisation, de réglage et d’entretien de l'équipement National Instruments none
- 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 none 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 none 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 none, 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 none, 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 none. À 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 User Manual Subtitle Measurement Studio User Manual April 2008 3 7 3392 C -01[...]

  • Page 2

    Support 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 662 457990-0, Belgium 32 (0) 2 757 0020, Brazil 55 11 3262 3599, Canada 800 433 3488, China 86 21 5050 9800,[...]

  • Page 3

    Important Information Warranty The media on which you receive National In struments software are warranted not to fail to execute p rogramming 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, repair[...]

  • Page 4

    © National Instruments Corporatio n v Measurement Studio User Manual Contents About This Manual How To Use This Manual ................... .............. ........... ............... .............. ........... .......... ix Conventions ............ ........... .............. .............. ............ .............. .............. ........... ....[...]

  • Page 5

    Contents Measurement Studio User Manual vi ni.com Numeric Controls ....... .............. .............. ........... ............... .............. ........... ...... 2-27 Numeric Edit Control ..................... ........... .............. .............. .............. ............ 2-29 Switch and LED Controls ................... .............. .[...]

  • Page 6

    Contents © National Instruments Corporation v ii Measurement Studio User Manual Additional Operations ................... .............. .............. ........... ............. 3-21 Knob Control ................ ........... .............. .............. ........... ............... .............. .... 3-21 Numeric Edit Control ................. ..[...]

  • Page 7

    © National Instruments Corporation i x Measurement Studio User Manual About This Manual The Measur ement Studio User Manual introduces the co ncepts associated with the Measurement Studio class li braries and de velopment tools. This manual assumes that you hav e a general working knowledge of Microsoft V isual Studio and the .NET Framework for .N[...]

  • Page 8

    About This Manual Measurement Studio User Manual x ni.com Use this manual as a starting point to learn about M easurement Studio. Refer to the NI Measur ement Studio Help within the V isu al Studio en vironment for function reference and detailed informat ion about the Measurement Studio class libraries, wi zards, assistants, and other features. Co[...]

  • Page 9

    © National Instruments Corporation 1 -1 Measurement Studio User Manual 1 Introduction to Measurement Studio Measurement Studio is an integrated su ite of tools and class libraries that are designed for developers using Microsoft V isual Basic .NET , V isual C#, ASP .NET , and V isual C++ to de velop measurement and automation applications. Measure[...]

  • Page 10

    Chapter 1 Introduction to M easurement Studio Measurement Studio User Manual 1-2 ni.com This manual documents Measurement Studio for V i sual Studio 2005 and V isual Studio 2008. For help with V isual Studio 6.0 suppo rt, refer to the Measur ement Studio Support for V isual Studio 6.0 Readme located on the Measurement Studio for V isual Studio 6. 0[...]

  • Page 11

    Chapter 1 Introduction to Measurement Studio © National Instruments Corporation 1 -3 Measurement Studio User Manual • Microsoft-compatible mouse • Microsoft Internet Explorer 6.0 or later Optional Installation —In order for links from Measurem ent Studio help topics to .NET Framework help topics to work, you must install th e Microsoft .NET [...]

  • Page 12

    Chapter 1 Introduction to M easurement Studio Measurement Studio User Manual 1-4 ni.com Note There are separate installers for Measurem ent Studio suppo rt for V isu al Studio 2005 and Measurement Studio support for V isual Studio 200 8. Repeat the installation instructions to install supp ort for both. When installing support for more th an one ve[...]

  • Page 13

    Chapter 1 Introduction to Measurement Studio © National Instruments Corporation 1 -5 Measurement Studio User Manual T o install support for NI-D A Q mx: 1. In the NI Measurement Studi o 8.5 installer , enable the VS2008 Driver Support».NET Framework 3.5 Languages Support for NI-D A Qmx feature. 2. In the NI De vice Dri v ers installer , enable th[...]

  • Page 14

    Chapter 1 Introduction to M easurement Studio Measurement Studio User Manual 1-6 ni.com Installing the Current V ersion of M easurement Studio over Previous V ersions of Measurement Studio Note Y ou can hav e only one version of Measurem ent Studio installed on a system for each versi on of V isual Studio or the . NET Fram e work installed on the s[...]

  • Page 15

    Chapter 1 Introduction to Measurement Studio © National Instruments Corporation 1 -7 Measurement Studio User Manual Table 1-1. Measurement Studio P ackage Comparison Chart for Visual C# and Visual Basi c .NET F eature St andard Edition Professional Edition Enterprise Edition Project W izards ✔ ✔ ✔ W indo ws F orms User Interface Controls ✔[...]

  • Page 16

    Chapter 1 Introduction to M easurement Studio Measurement Studio User Manual 1-8 ni.com DataSocket Serv er ✔ ✔ DataSocket Library ✔ ✔ Paramete r Assistant ✔ ✔ Instrument I/O Assistant 2 ✔ ✔ D A Q Assistant 2 ✔ ✔ Enterprise Analysis Libraries 4 ✔ NI T estStand Integration ✔ LabW indo ws ™ /CVI ™ Full Development System (F[...]

  • Page 17

    Chapter 1 Introduction to Measurement Studio © National Instruments Corporation 1 -9 Measurement Studio User Manual Learning Measurement Studio As you work with Measurement Studio, you might need to con sult additional resources. For detailed Measuremen t Studio h elp, including function reference and in-depth do cumentation on developi ng with Me[...]

  • Page 18

    Chapter 1 Introduction to M easurement Studio Measurement Studio User Manual 1-10 ni.com For more information on example locations, refer to Wher e T o F ind Examples . • NI T echnical Support—Refer to Appendix A, Technical Support and Professional Services , for more infor mation. • Measurement Studio W eb site, ni.com/mstudio —Contains Me[...]

  • Page 19

    © National Instruments Corporation 2 -1 Measurement Studio User Manual 2 Measurement Studio .NET Class Libraries This chapter provides o vervie w inform ation about the .NET class libraries included with Measurement Studio support for V isual Studio 2005 and V isual Stu dio 2008. Refer to the Using the Measur ement Studio .NET Class Libraries sect[...]

  • Page 20

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio 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 digital signal processing, signal filtering, signal generation, peak detection[...]

  • Page 21

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -3 Measurement Studio User Manual Enterprise Analysis The Enterprise Analysis class library, which ships with Measurement Studio Enterprise Edition, incl udes the Standard and Professional Analysis functionality as well as the followi ng advanced functionality: [...]

  • Page 22

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-4 ni.com Po wer and Frequency Estimate ✔ Pulse Measurements ✔ Scaled T ime Domain W indow ✔ Single T one Informatio n ✔ Spectrum Unit Con version ✔ State Lev els ✔ T ransfer Function ✔ T ransition Measurements ✔ Signal Generation Arbitrary W a ve ?[...]

  • Page 23

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -5 Measurement Studio User Manual Blackman-Nut tall W indow ✔ ✔ Cosine T apered W indo w ✔ ✔ Dolph-Cheb yshe v Wi ndo w ✔ ✔ Exact Blackman W indo w ✔ ✔ Exponential W indow ✔ ✔ Flat T o p W indo w ✔ ✔ Force W indow ✔ ✔ Gauss W indo w ?[...]

  • Page 24

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-6 ni.com IIR Cascade ✔ ✔ IIR ✔ ✔ In v erse Chebyshe v ✔ ✔ Kaiser ✔ ✔ Signal Processing Autocorrelation ✔ ✔ Con v olution ✔ ✔ Cross Po wer ✔ ✔ Cross Correlation ✔ ✔ Decimate ✔ ✔ Decon v olution ✔ ✔ Deriv ati ve x(t) ✔ ✔ Di[...]

  • Page 25

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -7 Measurement Studio User Manual Threshold Peak Detector ✔ ✔ Unwrap Phase ✔ ✔ Linear Algebra Back T ransform Eigen V ectors ✔ Backward Substitu tion ✔ Cholesky F actorization ✔ Complex Back T ransform Eigen V ectors ✔ Complex Cholesky Factorizat[...]

  • Page 26

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-8 ni.com Complex Pseudo In v erse Matrix ✔ ✔ Complex QR F actorization ✔ Complex QR F actorization with Piv ot Matrix ✔ Complex QR F actorization with Piv ot V ector ✔ Complex QZ Decomposition ✔ Complex Schur Decomposition ✔ Complex Solv e Linear Equa[...]

  • Page 27

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -9 Measurement Studio User Manual Matrix Norm ✔ ✔ Matrix Rank ✔ ✔ Outer Product ✔ ✔ Pseudo In verse Matrix ✔ ✔ QR Factorization ✔ QR Factorization with P i vot Matrix ✔ QR Factorization with P i vot V ector ✔ QZ Decomposition ✔ Schur Deco[...]

  • Page 28

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-10 ni.com Complex Number Arithmetic ✔ ✔ Find Polynomial Ro ots ✔ ✔ Scale 1D and 2D ✔ ✔ Curve Fitting Cubic Spline Fit ✔ Exponential Fit ✔ ✔ Exponential Fit Interval ✔ Gauss Fit ✔ Gauss Fit Interval ✔ General Least Squares Linear Fit ✔ Gene[...]

  • Page 29

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -11 Measurement Studio User Manual F-Distrib ution ✔ Histogram ✔ ✔ In v erse Chi-Square Distribution ✔ In verse F-Distribution ✔ In v erse Normal Dist rib ution ✔ In verse T -Distribution ✔ Mean ✔ ✔ Median and Mode ✔ ✔ Moment about Mean ✔[...]

  • Page 30

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-12 ni.com Dawson’ s Integral ✔ Dilogarithm ✔ Elliptic 1s t ✔ Elliptic 2nd ✔ Exponential Integral ✔ Factorial ✔ Fresnel Integrals ✔ Gamma ✔ Gauss Hypergeometric ✔ Hyperbolic Cosi ne Integral ✔ Hyperbolic Sine Integral ✔ Incomplete Beta ✔ In[...]

  • Page 31

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -13 Measurement Studio User Manual Tip For more information about analyzing or generating data with the Analysis class library , refer t o the Using the Mea sur ement Studio Analysis .NET Library topic in the NI Measur ement Studio Help . For more inf ormation a[...]

  • Page 32

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-14 ni.com •A n EngineeringFormatInfo class that def ines a custom formatter to format numeric values as strings with engineering notation and International Syst em of Units (SI) prefixes and symbols. •A PrecisionWaveformTiming class that you can use to represen[...]

  • Page 33

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -15 Measurement Studio User Manual Use the features in the Network V ari able class library to perform the following operations: • Exchange different types of data between Measurem ent Studio, LabVIEW , LabWindo ws/CVI, and other applications that support NI-P[...]

  • Page 34

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-16 ni.com transfer protocol servers ( ftp: ), f ile systems ( file: ), and OLE for Process Control ( opc: ) servers. • Specify data sources and targets using a URL, the same way you access W eb pages in a W eb browser . • Use DataSocket T r ansfer Protocol (DST[...]

  • Page 35

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -17 Measurement Studio User Manual Use the NI-D A Qmx class li brary to perform the following types of tasks: • Analog signal measurement • Analog signal generation • Digital I/O • Counting and timing • Pulse generation • Signal switch ing Tip For mo[...]

  • Page 36

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-18 ni.com •P X I • Serial (RS-232 and RS-485) •T C P / I P •U S B • VXI Tip For information about creating a Measurem ent Studio NI-VISA ap plication using th e Instrument I/O A ssistant, refer to the Creatin g an Instrument Control Application section in[...]

  • Page 37

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -19 Measurement Studio User Manual Windows Forms Controls The Windows Forms .NET class library is in the NationalInstruments.UI.Windo wsForms namespace. The Windows Forms class library encapsulates the following Measurement Studio user interface controls: • W [...]

  • Page 38

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-20 ni.com Use this class library to add measur ement-specif ic user interface controls to your application. Y ou can configure the controls programmatically at design time, through the Prop erties window in the W indo ws Forms Designer , or at run time with the pro[...]

  • Page 39

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -21 Measurement Studio User Manual W ith the wa veform graph and scatter graph controls and the classes that interface with the controls, you can perform the follo wing operations: Plot Operations • Plot and chart arrays of double-precision floating point valu[...]

  • Page 40

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-22 ni.com Cursor Operations • Use cursors to identify key po ints in plots and the plot area. • Configure cursor snap modes to be f ixed, floating, nearest point, or to plot. • Use cursor labels to display X an d Y data coordinates in a customized format that[...]

  • Page 41

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -23 Measurement Studio User Manual Digital W aveform Graph Control Use the Measurement Studio digital wav eform graph control, as shown in Figure 2-2, to displ ay DigitalWaveform data on a W indo ws F orms user interface. Figure 2-2. Digital Graph Windows Forms [...]

  • Page 42

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-24 ni.com Waveform Sample and Signal State Operations • Simultaneously display waveforms and signals or display signals on ly . • Create custom wa veform sa mp le and signal state styles. • Configure the appearance of sample and state labels . • Create cust[...]

  • Page 43

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -25 Measurement Studio User Manual Complex Graph Control Use the Measurement Studio comple x graph control, as shown in Figure 2-3, to disp lay ComplexDouble data on a Windo ws F orms user interface. A ComplexDouble consists of a real part and an imaginary part.[...]

  • Page 44

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-26 ni.com Axis Operations • Confi gure a graph to include multip le axes or independent ranges so that plot data f its the graph plot area. • Configure the axis modes to: fixed; autoscaling, including autoscaling based on the visibl e data only; strip chart; or[...]

  • Page 45

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -27 Measurement Studio User Manual Additional Operations • Pan and zoom interacti v ely . • Copy the graph as a BMP , GIF , JPEG, or PNG image to th e clipboard or a file. Tip For more information about using the co mplex graph control, refer t o the Using t[...]

  • Page 46

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-28 ni.com • Configure the format of value labels to engineering or date/time. • Display tooltips reflect ing the current value of the pointer . • Interacti vely change the value of th e control b y clicking or dragging and moving the pointer with the mouse. ?[...]

  • Page 47

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -29 Measurement Studio User Manual Use the Measurement Studio slide, tank, and thermometer con trols, as sho wn in Figure 2-5, to input and display numeric data on your interf ace. Figure 2-5. .NET Slide, T ank, and Thermometer Controls W ith the slide, tank, an[...]

  • Page 48

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-30 ni.com W ith the numeric edit control and the classes that interf ace with the control you can perform t he following operations: • Use up and do wn buttons for easy incrementing and decrementing. • Perform range checking. • Set the minimum range value to [...]

  • Page 49

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -31 Measurement Studio User Manual Y ou ty pically use an LED control, as shown in Figure 2-8, to indicate a Boolean v alue on an ap plication user interf ace. Figure 2-8. LED Windows Forms Control in Square 3D Style W ith the switch and LED controls and the cla[...]

  • Page 50

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-32 ni.com Property Editor Control Use the Measurement Studio propert y editor control, as shown in Figure 2-9, to configure properties for Win dows Forms controls at run time. Figure 2-9. Property Editor Windows Forms Control for the Knob Control Scale Arc Proper t[...]

  • Page 51

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -33 Measurement Studio User Manual Tip For more information about using the propert y editor control, refer to the Using the Measur ement Studio Pr operty Editor Contr ol topic in the NI Measurement Studio Help . Windows Forms Array Controls You can create an ar[...]

  • Page 52

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-34 ni.com • Make the control background transparent. • Configure the LED controls to blink while they are on or of f and configure the rate at which the LED controls blink. • Configure the layout of the control to be hori zontal or vertical. • Bind the v al[...]

  • Page 53

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -35 Measurement Studio User Manual • Set the interaction mode to keyboard and mouse, ke yboard only , mouse only , or none. • Use the edit box to select text programmatically and to validate text va lu e s . • Configure the layout of the control to be hori[...]

  • Page 54

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-36 ni.com Figure 2-12. InstrumentControlStrip Control Tip For more information about the Inst rumentControlStrip control, refer to Using the Measur ement Studio W in dows F orms In strument Contr ol Strip .NET Contr ol topic in the NI Measur ement Studio Help .[...]

  • Page 55

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -37 Measurement Studio User Manual ASP .NET W eb Forms Controls The Measurement Studio ASP.NET user interface controls are in the Web Forms .NET class library. The Web Fo rms .NET class library is in the NationalInstruments.UI.WebFo rms namespace. The Web Forms [...]

  • Page 56

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-38 ni.com W aveform Graph and Scatter Graph Controls Use the Measurement Studio waveform graph and scatter graph controls, as shown in Figure 2-13, to display two-di mensional data on a Web-based user interface. Use the waveform gra ph to display two-dimensional li[...]

  • Page 57

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -39 Measurement Studio User Manual • 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 wa veform graph control as X or Y data and optionally with date a[...]

  • Page 58

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-40 ni.com Additional Operations • Zoom interacti vely as well as programatically . • Specify the image format of the c ontrol as BMP , GIF , JPEG, or PNG. Tip For more information about using the wa veform and scatter graph controls, refer to the Using the Meas[...]

  • Page 59

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -41 Measurement Studio User Manual W ith the digital wa veform graph control and the classes that interf ace with the control, you can perfor m the following operations: Plot Operations • Plot digital wav eform data, including digital signal state data and tim[...]

  • Page 60

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-42 ni.com Tip For more information about using the d igital wav eform graph co ntrol, refer to the Using the Measur ement Studio W eb F orms Digital W aveform Graph .NET Contr ol section in the NI Measur ement Studio Help . Complex Graph Control Use the Measurement[...]

  • Page 61

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -43 Measurement Studio User Manual • Create custom point an d line styles for plots. • Specify anti-aliased plots for plot lines. • Calculate and display error bands. • Configure plot to specify how data is sa v ed and restored across HTTP requests. Axis[...]

  • Page 62

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-44 ni.com • Annotate and label a magnitude value. • Annotate and label a range of magnitu de values for a particular phase. Additional Operations • Zoom interacti vely as well as programmatically . • Specify the image format of the c ontrol as BMP , GIF , J[...]

  • Page 63

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -45 Measurement Studio User Manual • Customize the appearance of the control using 3D lab styles or classic 2D styles and change the color and le ngth of ticks and labels. • Configure the format of value labels to engineering or date/time. • Specify the im[...]

  • Page 64

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-46 ni.com Use the Measurement Studio slide, tank, and thermometer con trols, as shown in Figure 2-17, to input an d display numeric dat a on your interface. Figure 2-17. Slide, T ank, and Thermom eter Web Forms C ontrols W ith the slide, tank, and thermometer contr[...]

  • Page 65

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -47 Measurement Studio User Manual Numeric Edit Control Use the Measurement Studio numer ic edit control, as shown in Figure 2 -18, to display numeric values and to provide a way by which end users can edit numeric values. Typica lly, you use a numeric edit con [...]

  • Page 66

    Chapter 2 M easurement Studio .NET Class Libr aries Measurement Studio User Manual 2-48 ni.com Switch and LED Controls Use the Measurement Studio switch an d LED control s as Boolean controls in an ASP.NET Web application. You typically use a switch control to receive and control Bool ean input in an ASP.NE T Web application. You typically use an L[...]

  • Page 67

    Chapter 2 Measurement Studio .NET Class Libraries © National Instruments Corporation 2 -49 Measurement Studio User Manual AutoRefresh Control Use the AutoRefresh control to update a Web control or a group of Web controls on the cli ent at a specified interval. The AutoRefresh control uses the ASP . NET client callback architecture to update a cont[...]

  • Page 68

    © National Instruments Corporation 3 -1 Measurement Studio User Manual 3 Measurement Studio Visual C++ Class Libraries This chapter provides ov erview info rmation about the V isual C++ class libraries that are av ailable with M easurement Studio. Measurement Studio V isual C++ support for V isual Studio .N ET 2003 and V isual Studio 2005 is the s[...]

  • Page 69

    Chapter 3 Measurement Studio User Manual 3-2 ni.com Refer to the following sections for information about each Measurement Studio V isual C++ class library . ActiveX Controls in Visual C++ ActiveX controls are specialized COM servers that implement a specific set of interfaces. The Measurement Studio Visual C++ butto n, graph, knob, numeric edit, s[...]

  • Page 70

    Chapter 3 © National Instruments Corporation 3 -3 Measurement Studio User Manual Plot Operations • Plot three-dimensional data, including curves and surfaces. • Use multiple plot styles—poin t-line, line-point, hidden-lin e, contour , surface, surface-line, surf ace- contour , and surface-normal. • Create multiple plots with individual pro[...]

  • Page 71

    Chapter 3 Measurement Studio User Manual 3-4 ni.com Standard Analysis The Standard Analysis class library, which ships with M easurement Stud io Standard Edition, includes the sawtooth, sine, square, triangle, and basic function wave generators. Professional Analysis The Professional Analysis class libr ary, which ships with Measurement Studio Prof[...]

  • Page 72

    Chapter 3 © National Instruments Corporation 3 -5 Measurement Studio User Manual Refer to T able 3-1 to determine the t ype of measurements av ailable in the Professional and Enterprise Analysis V isual C++ libraries. Table 3-1. Analys is Visual C++ Library Me asuremen t T ypes Included in the Professional an d Enterprise Packa ges Analysis V isua[...]

  • Page 73

    Chapter 3 Measurement Studio User Manual 3-6 ni.com Square W av e ✔ ✔ T riangle W av e ✔ ✔ Uniform Whit e Noise ✔ ✔ Win dow in g Blackman W indo w ✔ ✔ Blackman-Harris W indo w ✔ ✔ Blackman-N uttall W indo w ✔ ✔ Cosine T apered W indo w ✔ ✔ Dolph-Cheb yshe v Wi ndo w ✔ ✔ Exact Blackman W indo w ✔ ✔ Exponential W i[...]

  • Page 74

    Chapter 3 © National Instruments Corporation 3 -7 Measurement Studio User Manual Cascade ✔ ✔ Cheb yshe v ✔ ✔ Elliptic ✔ ✔ Equiripple ✔ FIR ✔ ✔ FIR W indo wed ✔ ✔ IIR Cascade ✔ ✔ IIR ✔ ✔ In v erse Chebyshe v ✔ ✔ Kaiser ✔ ✔ Signal Processing Autocorrelation ✔ ✔ Con v olution ✔ ✔ Cross Po wer ✔ ✔ Cros[...]

  • Page 75

    Chapter 3 Measurement Studio User Manual 3-8 ni.com In v erse Fast Hilbert T ransform ✔ ✔ In v erse Fast Hartle y T ransform ✔ ✔ Peak Detection ✔ ✔ Po wer Spectrum ✔ ✔ Pulse Parameters ✔ ✔ Real and Complex FFT ✔ ✔ Threshold Peak Detector ✔ ✔ Unwrap Phase ✔ ✔ Linear Algebra Back T ransform Eigen V ectors ✔ Backward [...]

  • Page 76

    Chapter 3 © National Instruments Corporation 3 -9 Measurement Studio User Manual Complex Matrix Condition Number ✔ ✔ Complex Matrix Norm ✔ ✔ Complex Matrix Rank ✔ ✔ Complex Outer Product ✔ ✔ Complex Pseudo In v erse Matrix ✔ ✔ Complex QR F actorization ✔ Complex QR F actorization with Piv ot Matrix ✔ Complex QR F actorizati[...]

  • Page 77

    Chapter 3 Measurement Studio User Manual 3-10 ni.com Linear Equations ✔ LU Factorization ✔ Matrix Balance ✔ Matrix Condition N umber ✔ ✔ Matrix Multiplicat ion ✔ ✔ Matrix Norm ✔ ✔ Matrix Rank ✔ ✔ Outer Product ✔ ✔ Pseudo Inv erse Matrix ✔ ✔ QR Factorization ✔ QR Factorization with Piv ot Matrix ✔ QR Factorization w[...]

  • Page 78

    Chapter 3 © National Instruments Corporation 3 -11 Measurement Studio User Manual 1D and 2D Linear Ev aluation ✔ ✔ 1D and 2D Polynomial Evaluation ✔ ✔ 1D Polar to Rectangular ✔ ✔ 1D Rectangular to Polar ✔ ✔ Complex Number Arithmetic ✔ ✔ Find Polynomial Roots ✔ ✔ Scale 1D and 2D ✔ ✔ Curve Fitting Cubic Spline Fit ✔ Exp[...]

  • Page 79

    Chapter 3 Measurement Studio User Manual 3-12 ni.com Remov e Outliers ✔ Statistics 1D, 2D, and 3D AN O V A ✔ Chi-Square Distrib ution ✔ erf(x) and erfc(x) ✔ F-Distrib ution ✔ Histogram ✔ ✔ In v erse Chi-Square Distribution ✔ In verse F-Distribution ✔ In v erse Normal Dist rib ution ✔ In v erse T -Distrib ution ✔ Mean ✔ ✔ M[...]

  • Page 80

    Chapter 3 © National Instruments Corporation 3 -13 Measurement Studio User Manual Bessel 1st ✔ Bessel 2nd ✔ Beta ✔ Complimentary Gamma ✔ Cosine Integral ✔ Dawson’ s Integral ✔ Dilogarithm ✔ Elliptic 1s t ✔ Elliptic 2nd ✔ Exponential Integral ✔ Factorial ✔ Fresnel Integrals ✔ Gamma ✔ Gauss HyperGeometric ✔ Hyperbolic C[...]

  • Page 81

    Chapter 3 Measurement Studio User Manual 3-14 ni.com Tip For more information about analyzing or generating data with the Analysis class library , refer to the Analysis V isual C+ + Class Library Overvie w topic in the NI Measur ement Studio Help . For more inf ormation about the functi onality included in the Analysis class library , visit ni.com/[...]

  • Page 82

    Chapter 3 © National Instruments Corporation 3 -15 Measurement Studio User Manual Common The Measurement Studio Common Visual C++ class library provides data types and classes that other Measurem ent Studio Visual C++ class libraries use. The classes that are implemented natively in Visual C++ include the CNiVector and CNiMatrix classes. The Commo[...]

  • Page 83

    Chapter 3 Measurement Studio User Manual 3-16 ni.com transfer protocol servers ( ftp: ), f ile systems ( file: ), and OLE for Process Control ( opc: ) servers. • Specify data sources and targets using a URL, the same way you access W eb pages in a W eb browser . • Use DataSocket T r ansfer Protocol (DSTP) to exchange dif ferent types of data. ?[...]

  • Page 84

    Chapter 3 © National Instruments Corporation 3 -17 Measurement Studio User Manual NI-488.2 Use the Measurement Studio NI-488.2 Visual C++ class library to communicate with and control instrume nts on a GPIB interface. This class library is included when you instal l the NI-488.2 driver. Use this class library to configure and commu ni cate with GP[...]

  • Page 85

    Chapter 3 Measurement Studio User Manual 3-18 ni.com NI-Reports Use the Measurement Studio NI-Repor ts Visual C++ class library to generate printed reports from Measurement Studio Visual C++ applications. This class li brary is included onl y in the Measurement Studio Enterprise package. Tip For information about generating printed reports using th[...]

  • Page 86

    Chapter 3 © National Instruments Corporation 3 -19 Measurement Studio User Manual User Interface Use the Measurement Studio User Inte rface Visual C++ class library to add user interface controls to your app lication. You can c onfigure the user interface controls programmatically or through the property pages in the Visual C++ resource editor. Me[...]

  • Page 87

    Chapter 3 Measurement Studio User Manual 3-20 ni.com Tip For more information about using the button control, refer to th e Using the Measur ement Studio Button V isual C++ Contr ol section in the NI Measurement Studio Help . Graph Control Use the Measurement Studio ActiveX graph control, as shown in Figure 3-3, to plot and chart two-dimen sional d[...]

  • Page 88

    Chapter 3 © National Instruments Corporation 3 -21 Measurement Studio User Manual Axis Operations •U s e t h e 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 in verted numeric scales. • Configure the axis modes f[...]

  • Page 89

    Chapter 3 Measurement Studio User Manual 3-22 ni.com W ith the knob control and the classes that interf ace with the control, you can perform the foll o wing operations: • Use dif ferent display styles—knobs, dial s, and meters. • Use multiple control pointers, each representing one scalar v alue. A control pointer indicates the current value[...]

  • Page 90

    Chapter 3 © National Instruments Corporation 3 -23 Measurement Studio User Manual Tip For more information about easily using the numeric edit cont rol, refer to the Using the Measur ement Studio Numeric Edit V isual C++ Contr ol section in the NI Measur ement Studio Hel p . Slide Control Use the Measurement Studio Active X slide control, as shown[...]

  • Page 91

    Chapter 3 Measurement Studio User Manual 3-24 ni.com Utility Use the Measurement Stud io Utility Visual C++ class library to easily access Windows operating system function ality . Table 3-2 lists classes in the Utility class library and their functionality . Table 3-2. Utility C lass Name s and Functionalities Utility Class Function ality CNiFile [...]

  • Page 92

    Chapter 3 © National Instruments Corporation 3 -25 Measurement Studio User Manual Tip For more information about using the U tility class lib rary , refer t o the Utility V isual C++ Class Library Overvie w section in the NI Measur ement Studio Help . CNiTempFile CNiTempFile extends the functionality of CNiFile to add temporary file creation and m[...]

  • Page 93

    © National Instruments Corporation 4 -1 Measurement Studio User Manual 4 Measurement Studio Integrated T ools and Features When you use Measurement Studio in the V isual St udio en vironment, you hav e access to measurement and automa tion tools and features for V isual Basic .NET , V isual C#, ASP .NET , and V isual C++. These inte grated tools a[...]

  • Page 94

    Chapter 4 M easurement Studio Integrated T ools and Features Measurement Studio User Manual 4-2 ni.com • Add/Remove .N ET Class Libraries Wizard —Use the Measurement Studio Add/Remove Class Libraries wizard to add or remove Measurement Studio class libraries or assemblies in existing V isual Basic .NET , V i sual C#, or V isual C++ projects. ?[...]

  • Page 95

    Chapter 4 Measurement Studio Integrated T ools and Features © National Instruments Corporation 4 -3 Measurement Studio User Manual that the communication with an instrument is correct. Select NI T ools»NI Spy to access this menu item. The NI Spy menu item is av ailable only if you have NI Spy installed. • NI T ools»V ariable Manager —Use V a[...]

  • Page 96

    Chapter 4 M easurement Studio Integrated T ools and Features Measurement Studio User Manual 4-4 ni.com • Measureme nt Studio Online Resour ces»NI Dev eloper Zone —NI Dev eloper Zone, zone.ni.com , provides access to online example programs, tutorials, te chnical ne ws, and a Measurement Studio Discussion Forum where you can participate in disc[...]

  • Page 97

    Chapter 4 Measurement Studio Integrated T ools and Features © National Instruments Corporation 4 -5 Measurement Studio User Manual Figure 4-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 Studi o Pr oject se[...]

  • Page 98

    Chapter 4 M easurement Studio Integrated T ools and Features Measurement Studio User Manual 4-6 ni.com When you exit the wizard, the wizard adds or remo ves the appropriate references to or from the project, thus adding or removing the functionality associated with the class library . Figure 4-2. Measurement St udio Add/Remove Clas s Libraries Wiza[...]

  • Page 99

    Chapter 4 Measurement Studio Integrated T ools and Features © National Instruments Corporation 4 -7 Measurement Studio User Manual Note The D A Q Assistant is available only if you ha ve installed NI-D A Qmx and either the Measurement Studio Professional or M easurement Studio En terprise package. Refer to Chapter 5, the Walkthrough: Creating a Me[...]

  • Page 100

    Chapter 4 M easurement Studio Integrated T ools and Features Measurement Studio User Manual 4-8 ni.com The D A Q Assistant interactiv ely assi sts you in performing the follo wing operations: • Creating an NI-D A Qmx task class • Configuring an NI-D A Qmx task class • Generating a V isual Basic .NET , V isual C#, or V isual C++ class that inc[...]

  • Page 101

    Chapter 4 Measurement Studio Integrated T ools and Features © National Instruments Corporation 4 -9 Measurement Studio User Manual Tip For more information on ho w to create an NI-D A Qmx user interface, refer to the Using a .NET DA Q Comp onent in a Project topic in the NI Measur ement Studio He lp . Creating NI-DAQmx User Code in Visual C++ Note[...]

  • Page 102

    Chapter 4 M easurement Studio Integrated T ools and Features Measurement Studio User Manual 4-10 ni.com Refer to Chapter 5, the Walkthrough: Creating a Measurem ent Studio Instrument I/O App lication section, fo r step-by-step instructions on how to use the Instrument I/O Assistant. Figure 4-5. Instrument I/O Assist ant The Instrument I/O Assistant[...]

  • Page 103

    Chapter 4 Measurement Studio Integrated T ools and Features © National Instruments Corporation 4 -11 Measurement Studio User Manual Selecting a Measurement Studio Parameter V alue To access I/O devices or resources, y ou must specify string constants or scalar values for many method para meters and property values. Use the Measurement Studio Param[...]

  • Page 104

    Chapter 4 M easurement Studio Integrated T ools and Features Measurement Studio User Manual 4-12 ni.com Using the Instrument Driver Wizard To use an IVI or VXI plug&play instrumen t driver with a C DLL in a Measurement Studio .NET application, use the Measurement Studio .NET Instrument Driver wizard to creat e .NET entry points to the C DLL fun[...]

  • Page 105

    © National Instruments Corporation 5 -1 Measurement Studio User Manual 5 Getting Started with Measurement Studio The following sections include ov erv iew information and step-by-step instructions on dev eloping applications with Measurement Studio tools and features. Refer to the Developing with Measur ement Studio section and the Getting Started[...]

  • Page 106

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-2 ni.com W alkthrough: Creating a Measurement Studio Application with Windows Forms Controls and Analysis Note T o complete this walkthrough, you must hav e either the Measurement Studio Professional or Measurement Studio En terprise package installed for V isual St[...]

  • Page 107

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -3 Measurement Studio User Manual Setting up the project 1. Select Start»All Programs»Microsoft V isual Studio 2005» Microsoft V i sual Studio 2005 or Start»All Programs»Microsoft V isual Studio 2008»Microsoft V isua l Studio 2008 . 2. Select File»New»P[...]

  • Page 108

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-4 ni.com Tip If you are working with an existing project, you can access the A dd/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 . Adding user in[...]

  • Page 109

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -5 Measurement Studio User Manual 6. Expand the Measurement Studio group in the T oolbox. 7. Select the W av efo rmGraph control and drag and drop it onto the form. 8. Right-click the wav eform graph and select Edit Plots to display the W av eformPlot Collectio[...]

  • Page 110

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-6 ni.com Note Y ou can also access the W av eformPlot Collec tion Editor dialog box by clicking the wa veform graph smart tag. T o access the smart tag, left click on the control to select it and then left click on the arro w b utton in the upper right corn er of th[...]

  • Page 111

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -7 Measurement Studio User Manual 15. T y pe gauge for the name of the gauge. The follo wing screenshot sho ws Form1 with the user controls.[...]

  • Page 112

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-8 ni.com 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 random data, plot the data, calculate t[...]

  • Page 113

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -9 Measurement Studio User Manual Customizing y our 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 dialog box to add or remove le gend items and t[...]

  • Page 114

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-10 ni.com 4. Select Po ints Only . Click OK . Notice that the legend changed automatically to match the format ting of the graph. 5. Click the gauge smart tag to display the Gauge T asks. 6. Select Au t o Fo r m a t to display the Au to Format dialog box. 7. Select [...]

  • Page 115

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -11 Measurement Studio User Manual 15. Select Debug»Start Without Deb ugging to run the application. 16. After your program builds, click Start . Notice the graph sho ws the data plot, and the gauge and the numeric edit disp lay the mean of the data. W alkthro[...]

  • Page 116

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-12 ni.com • Generating, plotting, and analyzing the data —Using NationalInstruments.Analysis .SignalGeneration.White NoiseSignal and NationalInstruments.Analysis.Mat h. Statistics.Mean , you will generate data, plot t he generated data on a wa veform graph, and [...]

  • Page 117

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -13 Measurement Studio User Manual 3. In the T emplates p ane, select NI ASP .NET W eb Site . Select File System and specify a f ile path of your choice. 4. Use the drop-down box to select Vi s u a l C # or Visual Basic , depending on which language you want to[...]

  • Page 118

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-14 ni.com Tip If you are working with an existing project, you can access the A dd/Remov e Class Libraries dialog box by selecting Measur ement Studio»Add/Rem ove .NET Class Libraries Wizard . 7. Click Finish to display Default.aspx in the W e b Forms Designer . 8.[...]

  • Page 119

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -15 Measurement Studio User Manual Adding user interface controls to the pr oject In this section, you will build a Web page that looks like the followin g screenshot. 1. Click Design in the lower left corner to switch from So urce V iew to Design V ie w . 2. S[...]

  • Page 120

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-16 ni.com 7. Select the Button control and drag and drop it into the lower right table cell. 8. Right-click the button and select Properties to display the Properties window . Y ou configure the properties of the contr ol in the Properties window . 9. Scroll to the [...]

  • Page 121

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -17 Measurement Studio User Manual 13. Select the Legend control and drag and drop it into the bottom left table cell. 14. Select the NumericEdit control and drag and drop it into the bottom center table cell. 15. On the numeric edit smart tag, type numericedit[...]

  • Page 122

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-18 ni.com The follo wing screenshot sho ws Default.aspx with the user controls. 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 contr[...]

  • Page 123

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -19 Measurement Studio User Manual [C#] // Declare and initialize a n instance of WhiteNoiseSignal. WhiteNoiseSignal whiteNoise = new WhiteNoiseSignal(); // Store the generated data in a double array named data. double[] data = whiteNoise. Generate(1000.0, 256)[...]

  • Page 124

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-20 ni.com 3. Select Plots[0] in t he Source drop-down list and enter Signal in the Te x t box. Click OK . No w that you have specified a le gend item for th e plot, changes you make to the plot will be reflected on the legend. 4. Right-click the g raph and select Au[...]

  • Page 125

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -21 Measurement Studio User Manual 11. Select File»Sa ve Defaul t.aspx to sa v e your application. 12. Select Debug»Start Without Deb ugging to run the application. 13. After your program builds, click Start . Notice the graph sho ws the data plot, and the ga[...]

  • Page 126

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-22 ni.com W alkthrough: Creating a Measurement Studio Application with Windows Forms Controls and Network V ariable Note T o complete this walkthrough, you must hav e either the Measurement Studio Professional or Measurement Studio En terprise package installed for [...]

  • Page 127

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -23 Measurement Studio User Manual Writing an array of data to the server 1. Select Start»All Programs»Microsoft V isual Studio 2005» Microsoft V i sual Studio 2005 or Start»All Programs»Microsoft V isual Studio 2008»Microsoft V isua l Studio 2008 . 2. Se[...]

  • Page 128

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-24 ni.com 7. Select NetworkV ariable Communi cation Library . Click Finish . 8. In Program.cs , add the foll o wing code to write an array of d ata to the server: Note Y ou should choose the appropriate code depending on whether you created a VB or C# project. [VB.N[...]

  • Page 129

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -25 Measurement Studio User Manual Return values End Function Sub Main() Const location As String = " localhostsystemdouble" Dim bufferedWriter As Networ kVariableBufferedWriter(Of Double()) = New NetworkVariableBufferedWrite r(Of Double())(locati[...]

  • Page 130

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-26 ni.com bufferedWrite.W riteValue(value); Thread.Sleep(50 0); phase++; } } } } 9. Select Debug»Start W ithout Debugging to run the applicati on. 10. Minimize the console, but keep the application running.[...]

  • Page 131

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -27 Measurement Studio User Manual Setting up a Windo ws F orms project 1. Select Start»All Programs»Microsoft V isual Studio 2005» Microsoft V i sual Studio 2005 . 2. Select File»New»Project . The Ne w Project dialog box launches. 3. In the Project types [...]

  • Page 132

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-28 ni.com 6. Select Network V ariable Communication Library and Windows F orms User Interface Control Library . Tip If you are working with an existing project, you can access the A dd/Remov e Class Libraries dialog box by selecting Measur ement Studio»Add/Rem ove [...]

  • Page 133

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -29 Measurement Studio User Manual Conf iguring the network v ariable data sour ce contr ol 1. Select V iew»T oolbox to display t he T oolbox. The too lbox contains components and controls that you can add to your project. 2. Expand the Measurement Studio grou[...]

  • Page 134

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-30 ni.com 6. For the Location , bro wse to the local hostSystemdouble location in the Select Ne twork Item d ialog box. 7. Click OK to return to the NetworkV ariableBind ing Collection Edit or dialog box. 8. After you configure the binding properties, click OK t[...]

  • Page 135

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -31 Measurement Studio User Manual W alkthrough: Creating a Measurement Studio Application with W eb Forms Controls and Network V ariable Note T o complete this walkthrough, you must hav e either the Measurement Studio Professional or Measurement Studio En terp[...]

  • Page 136

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-32 ni.com • Displaying the array of data on a W eb page —Using the T oolbox, you will add an d configure an NationalInstruments.UI. WebForms.AutoRefresh control and a NationalInstrume nts. UI.WebForms.WaveformGraph control to display the d ata. Bef ore y ou begi[...]

  • Page 137

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -33 Measurement Studio User Manual 3. In the Project T ypes pane, select Vi s u a l C # or V isual Basic , depending on which language you want to create the project in. 4. In the T emplates p ane, select Console Application . Specify NetworkVariableWriter for [...]

  • Page 138

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-34 ni.com 8. In Pr ogram.cs , add the following code to write an array of data to the server: [VB.NET] Imports NationalInstruments .NetworkVariable Imports System.Threading Imports System Module Module1 Private Function GenerateDo ubleArray(ByVal phase As Double) As[...]

  • Page 139

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -35 Measurement Studio User Manual } static void Main(string[ ] args) { const string Locatio n = @"localhostsystemdouble"; NetworkVariableBuffe redWriter<double[]> bufferedWriter = new NetworkVariableBufferedWrit er<double[]>(Location)[...]

  • Page 140

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-36 ni.com Setting up a W eb Forms pr oject 1. Select Start»All Programs»Microsoft V isual Studio 2005» Microsoft V i sual Studio 2005 or Start»All Programs»Microsoft V isual Studio 2008»Microsoft V isua l Studio 2008 . 2. Select File»New»W eb Site . The Ne w[...]

  • Page 141

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -37 Measurement Studio User Manual 6. Select Network V ariable Communication Library and We b F o r m s User Interface Control Library . Tip If you are working with an existing project, you can access the A dd/Remov e Class Libraries dialog box by selecting Mea[...]

  • Page 142

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-38 ni.com Conf iguring the network v ariable data sour ce contr ol 1. Click Design in the lo wer left corner to switch fro m Source V i e w to Design V ie w . 2. Select V iew»T oolbox to display t he T oolbox. The too lbox contains components and controls that you [...]

  • Page 143

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -39 Measurement Studio User Manual 6. Select Add . Y ou add a bind ing to cr eate a connection with the underlying network variable, and you use the NetworkV ariableBinding Collection Editor to con figure the binding properties. Select Obj ect for the BindingT [...]

  • Page 144

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-40 ni.com 8. Click OK to return to the NetworkV ariableBind ing Collection Edit or dialog box. 9. After you configure the binding properties, click OK to return to the ASP .NET Desig ner . Displaying the array of data on a W eb page 1. Select W avef o rmGraph in the[...]

  • Page 145

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -41 Measurement Studio User Manual 4. Select Add . Select Wa v e f o r m G r a p h 1 for the ItemID and click OK . 5. Double-click the AutoRefr esh control. Add the following code to the AutoRefresh ev ent handler to bind the wa veform graph control to the netw[...]

  • Page 146

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-42 ni.com 6. Select File»Sa ve Def ault.aspx to sav e your application. 7. Select Debug»Start W ithout Debugging to run the application. The wa vef orm graph displ ays the array of data . Note Y ou can also use the System.Web.UI.Web Controls.FormView control to bi[...]

  • Page 147

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -43 Measurement Studio User Manual • Conf iguring y our task —Using the D A Q Assistant, you will interactiv ely configure and sa v e you r task. The wizard then generates code to reflect your co nfiguration settings. The wizard also generates a component t[...]

  • Page 148

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-44 ni.com 3. In the Project types p ane, expand the Vi s u a l C # or V isual Basic node, depending on which language you want to create the project in, and select Measureme nt Studio . Code generation works in both languages. 4. In the T emplates pane, select NI DA[...]

  • Page 149

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -45 Measurement Studio User Manual 5. In the Add D A Q Componen t dialog box, you can choose to create a new project task, crea te a ne w MAX task, create a reference to a MAX task, copy a MAX task to a project tas k, or copy an ex isting .mxb . F or this walkt[...]

  • Page 150

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-46 ni.com T o configur e your task 1. In the Create New dialog box of the D A Q Assistant, you can begin to interactiv ely def ine your D A Q task. Select Acquir e Signals , and then Analog Input as the measurement type for your task. 2. Next, select V oltag e .[...]

  • Page 151

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -47 Measurement Studio User Manual 3. From the Supported Physical Channels tree in the Physical tab, select the physical channel, such as ai1 , on t he D A Q device to which you connected the voltage signal. Click Finish . Note Y ou can also use a simulated de [...]

  • Page 152

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-48 ni.com 4. In the Edit D A Q T ask dialog box, you can edit the configuration of your D A Q task. If the embedded D A Q Assi stant help is not open by default, click the Show Help button in the upper -right corner of the windo w to displ ay the help.[...]

  • Page 153

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -49 Measurement Studio User Manual 5. T o complete the D A Q configuration, select the N Samples Acquisition Mode in the Timing S ettings section. For more information on timing, refer t o T iming in the NI-D A Qmx Help . 6. Next, click the Run b utton in the t[...]

  • Page 154

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-50 ni.com T o create a custom user interface f or the tas k 1. In the Configure D A Q Co mponent UI wizard, you can customize and pre view a user interf ace and code for your task. 2. Click Finish to generate the task user interf ace in your project form.[...]

  • Page 155

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -51 Measurement Studio User Manual The wizard also generates e v ent handlers and code to acquire data and present it on your generated user interface.[...]

  • Page 156

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-52 ni.com 3. Press <F5> to run the application. 4. After you have started th e application, click the Read button to begin acquiring data from your D A Q device. What’ s next To learn more about tasks, channels, and other NI-DAQm x concepts, refer to the NI-[...]

  • Page 157

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -53 Measurement Studio User Manual The National Instrument s Instrument I/O Assistant organizes instrum ent communication for a serial, Ethernet, or GPIB instrument into ordered steps. This walkthrough is designed to help you learn how to b uild an instrument I[...]

  • Page 158

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-54 ni.com 3. In the Project T ypes pane, select M easurement Studio un der V isu al C# or V isual Basic, depending on which language yo u want to create the project in. This walkthrough refers to V isual C#, but you can follo w the same process if you use V isual Ba[...]

  • Page 159

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -55 Measurement Studio User Manual Perf orming a query on the instrument Note This walkthrough was created using the NI Instrument S imulator . An y identification information or sample code generated for this device will be dif ferent depending on the instrume[...]

  • Page 160

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-56 ni.com 5. If there are more th an two tokens in the token list, remove them for this example. T o remove a token, right-click on it in the response w indow and select Remove . The response windo w displays data in binary form, ASCII form, or binary form and ASCII[...]

  • Page 161

    Chapter 5 Ge tting Started with Measurement Studio © National Instruments Corporation 5 -57 Measurement Studio User Manual 10. Click the Show All Files icon and expand the VisaTask.mxb node. 11. Double-click the VisaNSTask1 file to vie w the code that the Instrument I/O Assistant generat ed for you. Displaying Instrument I/O Assistant data on y ou[...]

  • Page 162

    Chapter 5 G etting Started with Measurement Studio Measurement Studio User Manual 5-58 ni.com 7. Add the following code to display the vendor and model nam e of your instrument in t he text boxes. [VB.NET] ' Declare an instance of Vi saTask Dim myTask As New VisaTask( ) Dim results As VisaTaskResu lts 'Display the data in the te xt boxes [...]

  • Page 163

    © National Instruments Corporation A -1 Measurement Studio User Manual A T echnical Support and Professional Ser vices Visit the following sections of the award-winning National Instruments Web site at ni.com for technical support and professional services: • Support —T echni cal support resources at ni.com/support include the following: – S[...]

  • Page 164

    Appendix A T echnical Support and Professional Services Measurement Studio User Manual A- 2 ni.com If you searched ni.com and could not find the answers you need, contact your local off ice or NI corporate h eadquarters. Phone numbers for our worldwide of f ices are listed at the front of this manual. Y ou also can visit the W orldwide Off ices sec[...]

  • Page 165

    © National Instruments Corporation G -1 Measurement Studio User Manual Glossar y A Acti veX Set of Microsoft technologies for reusable software components. Formerly called OLE. Acti veX control Reusable software component that adds functionality t o any Acti veX control container through exposed properties, methods, and events. The Measurement Stu[...]

  • Page 166

    Glossary Measurement Studio User Manual G-2 ni.com B button A control used to input or display Boolean informat ion or to initiate an action in a program. C channel 1. Physical—a terminal or pin at wh ich you can measure or generate an analog or digital signal. A single physical channel can incl ude more than one terminal, as in the case of a dif[...]

  • Page 167

    Glossary © National Instruments Corporation G -3 Measurement Studio User Manual coercion Automatic con version that Measurem ent Studio controls perform to change the numeric representation of a data element. COM Component Object Model. Microsof t specification for architecting and dev eloping reusable software components. complex graph A control [...]

  • Page 168

    Glossary Measurement Studio User Manual G-4 ni.com DataSocket T echnology that simplifies li ve data e xchange between applications and HTTP , FTP , OPC, logos (Lookout objects) and file serv ers o ver the Internet. It provides one common API to a number of dif ferent communication protocols. device An instrument or cont roller you can access as a [...]

  • Page 169

    Glossary © National Instruments Corporation G -5 Measurement Studio User Manual E Ethernet Standard connection type for netw orks, where computer s are connected by coaxial or twisted-pair cable. ev ent Object-generated respon se to some action or chan ge in state, such as a mouse click or a completed acquisition. The ev ent calls an e vent proced[...]

  • Page 170

    Glossary Measurement Studio User Manual G-6 ni.com I IEEE 488 Shortened notation for ANSI/IEEE Standards 488-1978, 488.1-1987, and 488.2-1987. See also GPIB . IMA Q V ision Nati onal Instruments i mage acquisi tion and analysis software that you can use to acquire images from Nati onal Instruments image acquisiti on (IMA Q) boards, display th em in[...]

  • Page 171

    Glossary © National Instruments Corporation G -7 Measurement Studio User Manual L LabVIEW Laboratory V irtual Instrument Engin eering W orkbench. Graphical dev elopment en vironment used for de v eloping test and measurement applications. LabW indo ws/CVI ANSI C dev elopment en vironm ent for building test and measurement applications. LED Light-E[...]

  • Page 172

    Glossary Measurement Studio User Manual G-8 ni.com N NI-488.2 Driv er-le vel softw are to control and comm uni cate with National Instrument s GPIB hardware. NI-D A Q Driv er-le vel softw are to cont rol and communicate with DA Q hardware. NI-D A Q is an extensiv e library of VI s and functions you can call from an application development en viron [...]

  • Page 173

    Glossary © National Instruments Corporation G -9 Measurement Studio User Manual P PCI Peripheral Component Interconnect . High-performance expansion bus architecture commonly found in PCs. PID Proportional-Integral-Deri v ati ve. A three-term control mechanism combining proportional, integral, and deriv ati ve control. Y ou might use a PID algorit[...]

  • Page 174

    Glossary Measurement Studio User Manual G-10 ni.com R range Region between the limits within wh ich a quantity is measured, recei v ed, or transmitted. The range is expressed by stating the lo wer and upper range va lu e s . S scalar Number that a point on a scale can represent. The number is a single value as opposed to an array . scale Part of gr[...]

  • Page 175

    Glossary © National Instruments Corporation G -11 Measur ement Studio User Manual TCP/IP T ransmission Control Protocol/Internet Protocol. A standard format for transferring data in pack ets from one computer to another . The two parts of TCP/IP are TCP , which deals with the co nstruction of data pockets, and IP , which routes them from computer [...]

  • Page 176

    © National Instruments Corporation I -1 Measur ement Studio User Manual Index A Acti veX controls in V isual C++, 3-2 Add/Remov e Class Li braries wizard, 4-5 adding or removing Measurement Studio class libraries, 4-5 Analysis .NET class library, 2-2 Array and Numeric Operations (table), 2-9 Curve Fitting (table), 2-10 Enterprise Analysis, 2-3 Fil[...]

  • Page 177

    Index Measurement Studio User Manual I -2 ni.com D D A Q Assista nt, 4-6 data acquisition (DA Q), 2-16, 3-17 DataSocket, .NET class library, 2-15 deployment requirements, 1-3 dev eloping with Measurement Studio, 4-1 diagnostic tools (NI resources), A-1 digital wa veform graph control, 2-23, 2-40 documentation con v entions used in the manual, x how[...]

  • Page 178

    Index © National Instruments Corporation I -3 Measur ement Studio User Manual Common, 2-13 NI-488.2, 2-16 NI-D A Qmx, 2-16 NI-SCOPE, 2-17 NI-VISA, 2-17 ov ervie w, 2-1 User Interface, 2-18, 2-37 deployment requirements, 1-3 Network V ariable .NET class library, 2-14 NI D A Q Assistant, 4-6 NI De veloper Zone, 4-4 NI Discussion Forums, 4-3 NI Instr[...]

  • Page 179

    Index Measurement Studio User Manual I -4 ni.com gauge, 2-27, 2-44 knob, 2-27, 2-44 LED, 2-30, 2-48 legend, 2-27, 2-44 meter, 2-27, 2-44 numeric edit, 2-29, 2-47 property editor, 2-32 scatter grap h, 2-20, 2- 38 slide, 2-29, 2-46 switch, 2-30, 2-48 tank, 2-29, 2-46 thermometer, 2-29 , 2-46 wa veform graph, 2-20, 2-38 V isual C++ class library, 3-19[...]