Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
What is Developer Zone?
United States

Document TypeTutorial
NI Supported: Yes
Publish Date: Sep 10, 2009


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Creating a Custom Sample Label Format for the Measurement Studio Windows Forms Digital Waveform Plot

0 Ratings | 0.00 out of 5
 Print |  PDF

Overview

With the Measurement Studio DigitalWaveformPlot, you can create a custom sample label format to display on the DigitalWaveformGraph. To create a custom sample label format, create a class that derives from DigitalWaveformSampleFormat and override FormatSample.

The attached example creates a DigitalWaveformSampleFormat named CustomLabelFormat, which maps sample values to custom labels.

You use the CustomLabelFormat class to add sample-value label pairs and then assign the instance to the SampleLabelFormat property of the digital waveform plot. To create a digital waveform plot in the Windows Forms Designer, right-click the digital waveform graph and select Edit Plots. In the DigitalWaveformPlot Collection Editor dialog box, click Add. Click OK to return to the Windows Forms Designer. The attached example, customlabel, includes this code.

The following image shows the DigitalWaveformGraph using the CustomLabelFormat:

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).