SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Measurement Studio
Ashish Chandiok
Dayalbagh Educational Institute Agra
achandiok@gmail.com
Mob:09837761031
1-Sep-15
Ashish Chandiok
Dayalbagh Educational Institute
1
Table of Contents
‱ What is Measurement Studio
‱ Key Features of Measurement Studio
‱ Installation
‱ Getting Started with Measurement Studio
‱ Example
‱ Result
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
2
What is Measurement Studio
‱ Measurement Studio is the only suite of tools designed
for building professional engineering applications in
Microsoft Visual Studio 2010, 2012, and 2013
‱ It acquire, analyse, and display measurement data.
‱ It offers extensible measurement classes and user
interface (UI) controls for Windows Presentation
Foundation (WPF), Windows, and Web Forms to help
you design an end-to-end test or measurement system
in Visual Basic .NET and Visual C#.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
3
Key Features of Measurement
Studio
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
4
Engineering UI Controls
Present Data in an Intuitive and Impactful Format
Use graphs, charts, gauges, knobs, meters, and LEDs that are
designed for engineering applications and are compatible with
hardware-acquired data types.
Easily Create Professional UIs
Choose from a full suite of WPF controls to create a
sophisticated, resolution-independent user experience.
Support Tools in Visual Studio
Start With Integrated Examples, Templates, and Wizards
Get started faster with over 100 fully functional example
applications and built-in project templates.
Access Help and Technical Support
Receive personalized help from trained engineers to design, set up,
and troubleshoot your hardware and software.
Key Features of Measurement
Studio
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
5
Hardware Communication
Achieve Shorter Time to Meaningful Measurements
Remove the complexity of hardware communication
through high-level, intuitive, object-oriented hardware
class libraries.
Accelerate Development With Productivity Tools
Interactively configure and generate ready-to-use DAQ
code from within Visual Studio.
Advanced Analysis Libraries
Draw Meaningful Information From Your Data
Access over 500 engineering functions such as frequency
analysis, curve fitting, statistics, and advanced math.
Implement Inline Processing of Raw Data
Perform inline analysis in real time on acquired signals
without the difficult task of writing custom parsing algorithms.
Key Features of Measurement
Studio
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
6
Installer Builder
Ensure Proper Run-Time Behavior
Harness Microsoft Windows Installer distribution
technology to package built libraries, executables, drivers,
and dependencies into a single installer.
Stay in Your Native Environment
Launch the Installer Builder from within Visual Studio and
configure options in an intuitive user interface.
Compatibility With NI TestStand
Automate the Test Process
Use Measurement Studio to create the UI for your test
system.
Take Advantage of Flexible Debugging
Edit and debug .NET assemblies from NI TestStand using
Visual Studio with direct integration provided by Measurement
Studio.
Getting Started with
Measurement Studio
‱ Getting Started information—Refer to the installed NI Measurement Studio Help
topic to get started with Measurement Studio. For a list of Measurement
Studio resources, refer to the Using the Measurement Studio Help topic in
the NI Measurement Studio Help.
‱ Examples—Measurement Studio installs examples organized by class library,
depending on the component, the version of Visual Studio or the .NET
Framework that the example supports, the version of Measurement
Studio installed on the system, and the operating system. For more
information on example locations, refer to the Where to Find Examples
topic in the NI Measurement Studio Help.
‱ Measurement Studio website, ni.com/mstudio—Contains Measurement Studio
news, support, downloads, white papers, and product tutorials.
‱ NI Technical Support, ni.com/support—Provides access to online example
programs, tutorials, technical news, and Measurement Studio discussion
forums.
Review the information from the Microsoft website on using Visual Studio.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
7
Example:
Creating Measurement Studio App
‱ Setting up the project—Using the Measurement Studio Application Wizard, we will create a
new project that references the Measurement Studio Analysis class library and Windows
Forms controls.
‱ Adding user interface controls to the project—Using the Toolbox, smart tags, and the
Properties window, you will add and configure a button, waveform graph, legend, gauge, and
numeric edit user interface control.
‱ Generating, plotting, and analyzing the data—Using WhiteNoiseSignal and Mean, you will
generate data, plot the generated data on a waveform graph, and calculate the mean of the
data.
‱ Customizing the user interface—Using smart tags and the Collection Editor and Auto Format
dialog boxes, you will display the mean value on the gauge and the numeric edit, as well as
customize your user interface.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
8
Example:
Before Creating a project, Requirements
‱ Before you begin
The following components are required to complete a project in Measurement Studio:
‱ Microsoft Visual Studio 2010 or later
‱ Measurement Studio 2010 or later (Professional or Enterprise edition)
‱ NIDAQMX Software
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
9
Example:
Setting up of the Project
Step 1. Select
Start» All Programs» Microsoft Visual Studio» Microsoft Visual
Studio.
Step 2. Select
File» New» Project. The New Project dialog box launches.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
10
Example:
Setting up of the Project
Step 3
In the New Project window, in the pane on the left side, select
Installed Templates, then select Visual C# or Visual Basic,
depending on which language you want to create the project in.
You can then select Measurement Studio to see a list of
Measurement Studio project templates in the center pane.
Step 4
In the center pane, select NI Windows Application. Specify
MyMeasurementStudioProject for Name and specify a Location of
your choice.
Step 5
Click OK. The Measurement Studio Application Wizard launches.
Step 6
Select Analysis Library and Windows Forms User Interface Control
Library.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
11
Example:
Setting up of the Project
Step 7
Select Analysis Library and Windows Forms User Interface Control
Library.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
12
Example:
Adding User Interface Controls
Step 1
Select View» Toolbox to display the Toolbox. The Toolbox contains
components and controls that you can add to your project.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
13
Example:
Adding User Interface Control
Step 2
Expand the All Windows Forms group. The All Windows Forms group
contains controls and components included in the
System.Windows.Forms namespace.
Step 3
Select the Button control and drag and drop it onto the form.
Step 4
Right-click the button and select Properties to display the
Properties window. You configure the properties of the control in
the Properties window.
Step 5
The Text property will be highlighted. Type Start for the button
text.
Step 6
Expand the Measurement Studio group in the Toolbox.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
14
Example:
Adding User Interface Control
Step 7
Select the WaveformGraph control and drag and drop it onto the
form.
Step 8
Right-click the waveform graph and select Edit Plots to display
the WaveformPlot Collection Editor dialog box. You use the
WaveformPlot Collection Editor dialog box to add or remove plots
and to configure plot properties.
Step 9
Type Plot for the
Name. Click OK.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
15
Example:
Adding User Interface Control
Step 7
Select the Waveform Graph control and drag and drop it onto the
form.
Step 10
Select the Legend control and drag and drop it onto the form.
Step 11
Select the Numeric Edit control and drag and drop it onto the
form.
Step 12
Select the Gauge control and drag and drop it onto the form.
Step 13
Click the gauge smart tag to display the Gauge Tasks.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
16
Example:
Adding User Interface Control
Step 14
Type gauge for the name of the gauge.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
17
Example:
Adding User Interface Control
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
18
Example:
Generating Plotting and Analysing Data
C#
Step 1
Double-click the button control to display the Form1 code, with the cursor
inside the click event handler of the button control.
Step 2
Add the following code to generate random data, plot the data, calculate
the mean of the data, and display the mean on the gauge.
C# code
// Declare and initialize an instance of WhiteNoiseSignal.
WhiteNoiseSignal whiteNoise = new WhiteNoiseSignal();
// Store the generated data in a double array named data.
double[] data = whiteNoise.Generate(1000.0, 256);
// Use the PlotY method to plot the data.
Plot.PlotY(data);
// Use the Mean method to calculate the mean of the data.
double mean = Statistics.Mean(data);
// Display the mean on the gauge.
gauge.Value = mean;
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
19
Example:
Generating Plotting and Analysing Data
VB.Net
Step 1
Double-click the button control to display the Form1 code, with the cursor inside the
click event handler of the button control.
Step 2
Add the following code to generate random data, plot the data, calculate the mean of
the data, and display the mean on the gauge.
VB code
' Declare and initialize an instance of WhiteNoiseSignal.
Dim whiteNoise As New WhiteNoiseSignal()
' Store the generated data in a double array named data.
Dim data As Double() = whiteNoise.Generate(1000.0, 256)
' Use the PlotY method to plot the data.
Plot.PlotY(data)
' Use the Mean method to calculate the mean of the data.
Dim mean As Double = Statistics.Mean(data)
' Display the mean on the gauge.
gauge.Value = mean
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
20
Example:
Customizing user interface
Step 1
Right-click the legend and select Edit Items to display the
LegendItem Collection Editor dialog box. You use the LegendItem
Collection Editor dialog box to add or remove legend items and to
configure legend item properties.
Step 2
Select Plot in the Source drop-down list and enter Signal in the
Text box. Click OK. Now that you have specified a legend item for
the plot, changes you make to the plot will be reflected on the
legend.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
21
Example:
Customizing User Interface
Step 3
Right-click the legend and select Edit Items to display the
LegendItem Collection Editor dialog box. You use the LegendItem
Collection Editor dialog box to add or remove legend items and to
configure legend item properties.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
22
Example:
Customizing User Interface
Step 3
Right-click the graph and select Auto Format to display the Auto
Format dialog box. The Auto Format dialog box provides a set of
pre-configured control styles. When you select a style and click
OK, the Auto Format feature configures the appropriate control
properties to reflect the style you chose.
Step 4
Select Points Only. Click OK.
Notice that the legend
changed automatically to
match the formatting
of the graph.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
23
Example:
Customizing User Interface
Step 5
Click the gauge smart tag to display the Gauge Tasks.
Step 6
Select Auto Format to display the Auto Format dialog box.
Step 7
Select Dark and click OK.
Step 8
Right-click the gauge and select Properties to display the
Properties window.
Step 9
Set the Range property for the gauge with the drop-down Range
type editor. Type -0.2 for the minimum value and type 0.2 for the
maximum value.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
24
Example:
Customizing User Interface
Step 10
Click the numeric edit smart tag to display the NumericEdit
Tasks.
Step 11
Select Gauge in the Source drop-down list. Setting the Source
property to the gauge allows two-way binding between the
controls.
Step 12
Deselect ArrowKeys, Buttons, and Text for the InteractionMode
property of the numeric edit control. Deselecting these
interaction modes makes the numeric edit an indicator. The
numeric edit control only displays the calculated mean.
Step 13
Select the Format Mode property and in the Numeric Edit Format
Mode Editor dialog box, change the Precision to 4 to show four
decimal places of precision. Click OK.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
25
Example:
Customizing User Interface
Step 14
Select File » Save Form1.cs to save your application.
Step 15
Select Debug » Start Without Debugging to run the application.
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
26
Example:
Result
1-Sep-15
Ashish Chandiok,
Dayalbagh Engineering Institute
27

Weitere Àhnliche Inhalte

Was ist angesagt?

Biodata_VishweshBehere
Biodata_VishweshBehereBiodata_VishweshBehere
Biodata_VishweshBehere
Vishwesh Behere
 
Testlink_Version 0.3
Testlink_Version 0.3Testlink_Version 0.3
Testlink_Version 0.3
surbhi saxena
 

Was ist angesagt? (6)

Vsts 2
Vsts 2Vsts 2
Vsts 2
 
Visual Studio 2010: A Perspective - David Chappell
Visual Studio 2010: A Perspective - David ChappellVisual Studio 2010: A Perspective - David Chappell
Visual Studio 2010: A Perspective - David Chappell
 
Code in the Cloud - December 8th 2014
Code in the Cloud - December 8th 2014Code in the Cloud - December 8th 2014
Code in the Cloud - December 8th 2014
 
Biodata_VishweshBehere
Biodata_VishweshBehereBiodata_VishweshBehere
Biodata_VishweshBehere
 
Testlink_Version 0.3
Testlink_Version 0.3Testlink_Version 0.3
Testlink_Version 0.3
 
Katalon Studio integrated with modeling tools like Microsoft Visio, Sparx Sys...
Katalon Studio integrated with modeling tools like Microsoft Visio, Sparx Sys...Katalon Studio integrated with modeling tools like Microsoft Visio, Sparx Sys...
Katalon Studio integrated with modeling tools like Microsoft Visio, Sparx Sys...
 

Ähnlich wie Measurement Studio by Mr. Ashish chandiok

Workshop using open source software for mobile data collection workshop - a...
Workshop   using open source software for mobile data collection workshop - a...Workshop   using open source software for mobile data collection workshop - a...
Workshop using open source software for mobile data collection workshop - a...
Wisconsin Land Information Association
 
ContentsTeam Work Schedule3Team Task Assignment3Project .docx
ContentsTeam Work Schedule3Team Task Assignment3Project .docxContentsTeam Work Schedule3Team Task Assignment3Project .docx
ContentsTeam Work Schedule3Team Task Assignment3Project .docx
bobbywlane695641
 
Pratk kambe rac
Pratk kambe racPratk kambe rac
Pratk kambe rac
Pratik Kambe
 
Tune Your ASP.NET Application Using Visual Studio 2010 Profiler
Tune Your ASP.NET Application Using Visual Studio 2010 ProfilerTune Your ASP.NET Application Using Visual Studio 2010 Profiler
Tune Your ASP.NET Application Using Visual Studio 2010 Profiler
Abhijit Jana
 
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
Aberla
 
Introduction to lab_view
Introduction to lab_viewIntroduction to lab_view
Introduction to lab_view
Sugeng Rianto
 

Ähnlich wie Measurement Studio by Mr. Ashish chandiok (20)

Database development with visual studio 2010
Database development with visual studio 2010Database development with visual studio 2010
Database development with visual studio 2010
 
Resume
ResumeResume
Resume
 
Better User Experience with .NET
Better User Experience with .NETBetter User Experience with .NET
Better User Experience with .NET
 
Visual studio Team system 2012
Visual studio Team system 2012Visual studio Team system 2012
Visual studio Team system 2012
 
Inventory management system report for the
Inventory management system report for theInventory management system report for the
Inventory management system report for the
 
Workshop using open source software for mobile data collection workshop - a...
Workshop   using open source software for mobile data collection workshop - a...Workshop   using open source software for mobile data collection workshop - a...
Workshop using open source software for mobile data collection workshop - a...
 
RESUME BUILDER WEB APPLICATION
RESUME BUILDER WEB APPLICATIONRESUME BUILDER WEB APPLICATION
RESUME BUILDER WEB APPLICATION
 
Coded ui test
Coded ui testCoded ui test
Coded ui test
 
Virtual instrumentation (LabVIEW)
Virtual instrumentation (LabVIEW)Virtual instrumentation (LabVIEW)
Virtual instrumentation (LabVIEW)
 
ContentsTeam Work Schedule3Team Task Assignment3Project .docx
ContentsTeam Work Schedule3Team Task Assignment3Project .docxContentsTeam Work Schedule3Team Task Assignment3Project .docx
ContentsTeam Work Schedule3Team Task Assignment3Project .docx
 
Ooad
OoadOoad
Ooad
 
Devry cis 321 week 7 milestone 5 and milestone 6
Devry cis 321 week 7 milestone 5 and milestone 6Devry cis 321 week 7 milestone 5 and milestone 6
Devry cis 321 week 7 milestone 5 and milestone 6
 
IBM Cognos 10 Framework Manager Metadata Modeling: Tips and Tricks
IBM Cognos 10 Framework Manager Metadata Modeling: Tips and TricksIBM Cognos 10 Framework Manager Metadata Modeling: Tips and Tricks
IBM Cognos 10 Framework Manager Metadata Modeling: Tips and Tricks
 
Susan windsor soft test 16th november 2005
Susan windsor soft test   16th november 2005Susan windsor soft test   16th november 2005
Susan windsor soft test 16th november 2005
 
Pratk kambe rac
Pratk kambe racPratk kambe rac
Pratk kambe rac
 
Tune Your ASP.NET Application Using Visual Studio 2010 Profiler
Tune Your ASP.NET Application Using Visual Studio 2010 ProfilerTune Your ASP.NET Application Using Visual Studio 2010 Profiler
Tune Your ASP.NET Application Using Visual Studio 2010 Profiler
 
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
 
Dashboard Factory - most efficient way to develop with SAP Design Studio
Dashboard Factory - most efficient way to develop with SAP Design Studio Dashboard Factory - most efficient way to develop with SAP Design Studio
Dashboard Factory - most efficient way to develop with SAP Design Studio
 
Introduction to lab_view
Introduction to lab_viewIntroduction to lab_view
Introduction to lab_view
 
Tutorial test driven development with Visual Studio 2012
Tutorial test driven development with Visual Studio 2012Tutorial test driven development with Visual Studio 2012
Tutorial test driven development with Visual Studio 2012
 

KĂŒrzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

KĂŒrzlich hochgeladen (20)

Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 

Measurement Studio by Mr. Ashish chandiok

  • 1. Measurement Studio Ashish Chandiok Dayalbagh Educational Institute Agra achandiok@gmail.com Mob:09837761031 1-Sep-15 Ashish Chandiok Dayalbagh Educational Institute 1
  • 2. Table of Contents ‱ What is Measurement Studio ‱ Key Features of Measurement Studio ‱ Installation ‱ Getting Started with Measurement Studio ‱ Example ‱ Result 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 2
  • 3. What is Measurement Studio ‱ Measurement Studio is the only suite of tools designed for building professional engineering applications in Microsoft Visual Studio 2010, 2012, and 2013 ‱ It acquire, analyse, and display measurement data. ‱ It offers extensible measurement classes and user interface (UI) controls for Windows Presentation Foundation (WPF), Windows, and Web Forms to help you design an end-to-end test or measurement system in Visual Basic .NET and Visual C#. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 3
  • 4. Key Features of Measurement Studio 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 4 Engineering UI Controls Present Data in an Intuitive and Impactful Format Use graphs, charts, gauges, knobs, meters, and LEDs that are designed for engineering applications and are compatible with hardware-acquired data types. Easily Create Professional UIs Choose from a full suite of WPF controls to create a sophisticated, resolution-independent user experience. Support Tools in Visual Studio Start With Integrated Examples, Templates, and Wizards Get started faster with over 100 fully functional example applications and built-in project templates. Access Help and Technical Support Receive personalized help from trained engineers to design, set up, and troubleshoot your hardware and software.
  • 5. Key Features of Measurement Studio 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 5 Hardware Communication Achieve Shorter Time to Meaningful Measurements Remove the complexity of hardware communication through high-level, intuitive, object-oriented hardware class libraries. Accelerate Development With Productivity Tools Interactively configure and generate ready-to-use DAQ code from within Visual Studio. Advanced Analysis Libraries Draw Meaningful Information From Your Data Access over 500 engineering functions such as frequency analysis, curve fitting, statistics, and advanced math. Implement Inline Processing of Raw Data Perform inline analysis in real time on acquired signals without the difficult task of writing custom parsing algorithms.
  • 6. Key Features of Measurement Studio 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 6 Installer Builder Ensure Proper Run-Time Behavior Harness Microsoft Windows Installer distribution technology to package built libraries, executables, drivers, and dependencies into a single installer. Stay in Your Native Environment Launch the Installer Builder from within Visual Studio and configure options in an intuitive user interface. Compatibility With NI TestStand Automate the Test Process Use Measurement Studio to create the UI for your test system. Take Advantage of Flexible Debugging Edit and debug .NET assemblies from NI TestStand using Visual Studio with direct integration provided by Measurement Studio.
  • 7. Getting Started with Measurement Studio ‱ Getting Started information—Refer to the installed NI Measurement Studio Help topic to get started with Measurement Studio. For a list of Measurement Studio resources, refer to the Using the Measurement Studio Help topic in the NI Measurement Studio Help. ‱ Examples—Measurement Studio installs examples organized by class library, depending on the component, the version of Visual Studio or the .NET Framework that the example supports, the version of Measurement Studio installed on the system, and the operating system. For more information on example locations, refer to the Where to Find Examples topic in the NI Measurement Studio Help. ‱ Measurement Studio website, ni.com/mstudio—Contains Measurement Studio news, support, downloads, white papers, and product tutorials. ‱ NI Technical Support, ni.com/support—Provides access to online example programs, tutorials, technical news, and Measurement Studio discussion forums. Review the information from the Microsoft website on using Visual Studio. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 7
  • 8. Example: Creating Measurement Studio App ‱ Setting up the project—Using the Measurement Studio Application Wizard, we will create a new project that references the Measurement Studio Analysis class library and Windows Forms controls. ‱ Adding user interface controls to the project—Using the Toolbox, smart tags, and the Properties window, you will add and configure a button, waveform graph, legend, gauge, and numeric edit user interface control. ‱ Generating, plotting, and analyzing the data—Using WhiteNoiseSignal and Mean, you will generate data, plot the generated data on a waveform graph, and calculate the mean of the data. ‱ Customizing the user interface—Using smart tags and the Collection Editor and Auto Format dialog boxes, you will display the mean value on the gauge and the numeric edit, as well as customize your user interface. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 8
  • 9. Example: Before Creating a project, Requirements ‱ Before you begin The following components are required to complete a project in Measurement Studio: ‱ Microsoft Visual Studio 2010 or later ‱ Measurement Studio 2010 or later (Professional or Enterprise edition) ‱ NIDAQMX Software 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 9
  • 10. Example: Setting up of the Project Step 1. Select Start» All Programs» Microsoft Visual Studio» Microsoft Visual Studio. Step 2. Select File» New» Project. The New Project dialog box launches. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 10
  • 11. Example: Setting up of the Project Step 3 In the New Project window, in the pane on the left side, select Installed Templates, then select Visual C# or Visual Basic, depending on which language you want to create the project in. You can then select Measurement Studio to see a list of Measurement Studio project templates in the center pane. Step 4 In the center pane, select NI Windows Application. Specify MyMeasurementStudioProject for Name and specify a Location of your choice. Step 5 Click OK. The Measurement Studio Application Wizard launches. Step 6 Select Analysis Library and Windows Forms User Interface Control Library. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 11
  • 12. Example: Setting up of the Project Step 7 Select Analysis Library and Windows Forms User Interface Control Library. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 12
  • 13. Example: Adding User Interface Controls Step 1 Select View» Toolbox to display the Toolbox. The Toolbox contains components and controls that you can add to your project. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 13
  • 14. Example: Adding User Interface Control Step 2 Expand the All Windows Forms group. The All Windows Forms group contains controls and components included in the System.Windows.Forms namespace. Step 3 Select the Button control and drag and drop it onto the form. Step 4 Right-click the button and select Properties to display the Properties window. You configure the properties of the control in the Properties window. Step 5 The Text property will be highlighted. Type Start for the button text. Step 6 Expand the Measurement Studio group in the Toolbox. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 14
  • 15. Example: Adding User Interface Control Step 7 Select the WaveformGraph control and drag and drop it onto the form. Step 8 Right-click the waveform graph and select Edit Plots to display the WaveformPlot Collection Editor dialog box. You use the WaveformPlot Collection Editor dialog box to add or remove plots and to configure plot properties. Step 9 Type Plot for the Name. Click OK. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 15
  • 16. Example: Adding User Interface Control Step 7 Select the Waveform Graph control and drag and drop it onto the form. Step 10 Select the Legend control and drag and drop it onto the form. Step 11 Select the Numeric Edit control and drag and drop it onto the form. Step 12 Select the Gauge control and drag and drop it onto the form. Step 13 Click the gauge smart tag to display the Gauge Tasks. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 16
  • 17. Example: Adding User Interface Control Step 14 Type gauge for the name of the gauge. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 17
  • 18. Example: Adding User Interface Control 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 18
  • 19. Example: Generating Plotting and Analysing Data C# Step 1 Double-click the button control to display the Form1 code, with the cursor inside the click event handler of the button control. Step 2 Add the following code to generate random data, plot the data, calculate the mean of the data, and display the mean on the gauge. C# code // Declare and initialize an instance of WhiteNoiseSignal. WhiteNoiseSignal whiteNoise = new WhiteNoiseSignal(); // Store the generated data in a double array named data. double[] data = whiteNoise.Generate(1000.0, 256); // Use the PlotY method to plot the data. Plot.PlotY(data); // Use the Mean method to calculate the mean of the data. double mean = Statistics.Mean(data); // Display the mean on the gauge. gauge.Value = mean; 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 19
  • 20. Example: Generating Plotting and Analysing Data VB.Net Step 1 Double-click the button control to display the Form1 code, with the cursor inside the click event handler of the button control. Step 2 Add the following code to generate random data, plot the data, calculate the mean of the data, and display the mean on the gauge. VB code ' Declare and initialize an instance of WhiteNoiseSignal. Dim whiteNoise As New WhiteNoiseSignal() ' Store the generated data in a double array named data. Dim data As Double() = whiteNoise.Generate(1000.0, 256) ' Use the PlotY method to plot the data. Plot.PlotY(data) ' Use the Mean method to calculate the mean of the data. Dim mean As Double = Statistics.Mean(data) ' Display the mean on the gauge. gauge.Value = mean 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 20
  • 21. Example: Customizing user interface Step 1 Right-click the legend and select Edit Items to display the LegendItem Collection Editor dialog box. You use the LegendItem Collection Editor dialog box to add or remove legend items and to configure legend item properties. Step 2 Select Plot in the Source drop-down list and enter Signal in the Text box. Click OK. Now that you have specified a legend item for the plot, changes you make to the plot will be reflected on the legend. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 21
  • 22. Example: Customizing User Interface Step 3 Right-click the legend and select Edit Items to display the LegendItem Collection Editor dialog box. You use the LegendItem Collection Editor dialog box to add or remove legend items and to configure legend item properties. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 22
  • 23. Example: Customizing User Interface Step 3 Right-click the graph and select Auto Format to display the Auto Format dialog box. The Auto Format dialog box provides a set of pre-configured control styles. When you select a style and click OK, the Auto Format feature configures the appropriate control properties to reflect the style you chose. Step 4 Select Points Only. Click OK. Notice that the legend changed automatically to match the formatting of the graph. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 23
  • 24. Example: Customizing User Interface Step 5 Click the gauge smart tag to display the Gauge Tasks. Step 6 Select Auto Format to display the Auto Format dialog box. Step 7 Select Dark and click OK. Step 8 Right-click the gauge and select Properties to display the Properties window. Step 9 Set the Range property for the gauge with the drop-down Range type editor. Type -0.2 for the minimum value and type 0.2 for the maximum value. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 24
  • 25. Example: Customizing User Interface Step 10 Click the numeric edit smart tag to display the NumericEdit Tasks. Step 11 Select Gauge in the Source drop-down list. Setting the Source property to the gauge allows two-way binding between the controls. Step 12 Deselect ArrowKeys, Buttons, and Text for the InteractionMode property of the numeric edit control. Deselecting these interaction modes makes the numeric edit an indicator. The numeric edit control only displays the calculated mean. Step 13 Select the Format Mode property and in the Numeric Edit Format Mode Editor dialog box, change the Precision to 4 to show four decimal places of precision. Click OK. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 25
  • 26. Example: Customizing User Interface Step 14 Select File » Save Form1.cs to save your application. Step 15 Select Debug » Start Without Debugging to run the application. 1-Sep-15 Ashish Chandiok, Dayalbagh Engineering Institute 26