64
DT-Display for .NET UM-22287-D User’s Manual

DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

DT-Display for .NET

UM-22287-D

User’s Manual

Page 2: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Fourth EditionDecember, 2008

Data Translation, Inc.100 Locke DriveMarlboro, MA 01752-1192(508) 481-3700www.datatranslation.comFax: (508) 481-8620E-mail: [email protected]

Copyright © 2006 - 2008 by Data Translation, Inc.

All rights reserved.

Information furnished by Data Translation, Inc. is believed to be accurate and reliable; however, no responsibility is assumed by Data Translation, Inc. for its use; nor for any infringements of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent rights of Data Translation, Inc.

Use, duplication, or disclosure by the United States Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer software clause at 48 C.F.R, 252.227-7013, or in subparagraph (c)(2) of the Commercial computer Software - Registered Rights clause at 48 C.F.R., 52-227-19 as applicable. Data Translation, Inc., 100 Locke Drive, Marlboro, MA 01752

Data Translation® is a registered trademark of Data Translation, Inc. DT-Open LayersTM, DT-Open Layers for .NET Class LibraryTM, DT-Display for .NETTM, and Data Acquisition OMNI CDTM are trademarks of Data Translation, Inc.

All other brand and product names are trademarks or registered trademarks of their respective companies.

Page 3: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Table of Contents

About this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Intended Audience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

What You Should Learn from this Manual. . . . . . . . . . . . . . . . . . . 5

Organization of this Manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Conventions Used in this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Related Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Where to Get Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Chapter 1: Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

What’s Included . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

What is DT-Display for .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

What You Need. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Installing the Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Using the Online Help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Using the Example Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Creating Your Own Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Distributing Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Chapter 2: Control Summary . . . . . . . . . . . . . . . . . . . . . . . . 23

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Display Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

MemorySignalList Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

MemorySignal Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Chapter 3: Using DT-Display for .NET . . . . . . . . . . . . . . . . . 33

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Setting Up the Signals to Display. . . . . . . . . . . . . . . . . . . . . . . . . . 35

Managing the MemorySignalList Collection . . . . . . . . . . . . 35

3

Page 4: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Contents

4

Adding a Signal to the MemorySignalList . . . . . . . . . . 36

Removing a Signal from the MemorySignalList . . . . . 38

Inserting a Signal into the MemorySignalList . . . . . . . 38

Accessing a Signal in the MemorySignalList . . . . . . . . 39

Assigning Data to a Signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Setting Up the Appearance of a Signal . . . . . . . . . . . . . . . . . 42

Rendering a Signal on the Display . . . . . . . . . . . . . . . . . . . . . 42

Setting Up the Background Appearance . . . . . . . . . . . . . . . . . . . 43

Setting Up the Title and Footer. . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Setting Up the X-Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Setting Up the Y-Axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Printing the Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Zooming and Panning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Chapter 4: Programming Flowcharts. . . . . . . . . . . . . . . . . . 49

Setting Up Signals to Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Setting Up the Background Appearance . . . . . . . . . . . . . . . . . . . 53

Setting Up the Titles and Footers . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Setting Up the X-Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Setting Up the Y-Axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Printing the Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Chapter 5: Product Support . . . . . . . . . . . . . . . . . . . . . . . . . 59

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Page 5: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

About this ManualThis manual describes how to write an application program that uses DT-Display for .NET to display signals.

Intended Audience

This document is intended for engineers, scientists, technicians, OEMs, system integrators, or others responsible for developing application programs using Microsoft® Visual Studio .NET 2003 or Visual Studio .NET 2005.

It is assumed that you are a proficient programmer in Visual C# or Visual Basic .NET, and that you have familiarity your application.

What You Should Learn from this Manual

This manual provides installation instructions, summarizes the properties and methods of the DT-Display control, and describes how to develop a program using this control. Using this manual, you should be able to successfully install and use DT-Display for .NET.

This manual is intended to be used with the online help for DT-Display for .NET, which is an integrated part of the software.

5

Page 6: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

About this Manual

6

Note: This manual describes only those properties and methods that are specific to the DT-Display control. Refer to your Microsoft Visual Studio .NET documentation for information about inherited properties and methods.

Organization of this Manual

This manual is organized as follows:

• Chapter 1, “Getting Started,” describes what you need to use DT-Display for .NET, how to install the software, how to access the online help, and how to use the example programs.

• Chapter 2, “Control Summary,” summarizes the properties and methods provided by the DT-Display control.

• Chapter 3, “Using DT-Display for .NET,” describes how to use the DT-Display control to display data.

• Chapter 4, “Programming Flowcharts,” provides programming flowcharts for using the properties and methods provided by the DT-Display control.

• Chapter 5, “Product Support,” describes how to get help if you have trouble using the DT-Display control.

• An index completes this manual.

Page 7: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

About this Manual

Conventions Used in this Manual

The following conventions are used in this manual:

• Notes provide useful information that requires special emphasis, cautions provide information to help you avoid losing data or damaging your equipment, and warnings provide information to help you avoid catastrophic damage to yourself or your equipment.

• Items that you select or type are shown in bold. Function names also appear in bold.

• Code fragments are shown in courier font.

• Methods and properties may be shown to indicate the class to which they belong, as follows: Display.Signals property means that this is the Signals property of the Display class.

Related Information

Refer to the following documentation for more information on using the DT-Display control:

• DT-Display for .NET Online Help. This help file is integrated as part of the software. Refer to page 14 for information on how to open this help file.

• Microsoft Visual Studio .NET documentation.

Where to Get Help

Should you run into problems installing or using DT-Display for .NET, our Technical Support Department is available to provide prompt, technical assistance. Refer to Chapter 5 for more information. If you are outside the U.S. or Canada, call your local distributor; see our web site (www.datatranslation.com) for the name and telephone number of your nearest distributor.

7

Page 8: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

About this Manual

8

Page 9: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

1Getting Started

What’s Included . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

What is DT-Display for .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11

What You Need. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Installing the Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Using the Online Help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Using the Example Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Creating Your Own Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Distributing Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

9

Page 10: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 1

10

What’s IncludedThe following software is provided on the Data Acquisition OMNI CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET:

• DT-Display for .NET – Provides a control for plotting data at high speed. You can use this control to plot data that was acquired from the DT-Open Layers for .NET Class Library.

• DT-Open Layers for .NET Class Library – Provides properties, methods, and events for performing data acquisition operations.

This document describes the DT-Display for .NET. For more information on the Class Library, refer to the DT-Open Layers for .NET Class Library User’s Manual on the Data Acquisition OMNI CD.

Page 11: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Getting Started

1

1

1

1

1

1

1

1

1

What is DT-Display for .NETDT-Display for .NET is a general-purpose, high-performance .NET control for displaying signals. It can be programmed interactively at design time or programatically at run-time. Here are some of the major features of this control:

• The DT-Display control works directly with the DT-Open Layers for .NET Class Library, allowing you to plot data that was acquired from a Data Translation device.

• The number of signals is limited only by the display size.

• Signals can either be overlaid or displayed independently.

• The display supports interactive zooming and panning.

• Autoscale and Capture Scale are supported.

• All user- interface elements, including colors and styles, are completely configurable.

11

Page 12: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 1

12

What You NeedTo use DT-Display for .NET, ensure that your system meets the following minimum requirements:

• PC with a Pentium II 450 MHz minimum processor (Pentium II 600 MHz recommended)

• Microsoft Windows® Vista™, Windows 2000 Professional, Windows 2000 Server, Windows XP Professional, Windows XP Home Edition (does not support creating Web applications or XML Web servers in .NET Professional), or Windows Server™ 2003.

• Minimum RAM requirements depend on the operating system you are using; consult your operating system documentation for details

• CD-ROM or DVD drive.

• Super VGA (1024 x 768) or higher resolution display with 256 colors.

• Microsoft mouse or compatible pointing device.

• Microsoft Visual Studio .NET 2003 or Visual Studio .NET 2005.

Note: You can deploy applications on the following operating systems: Windows 98, Microsoft Windows NT® 4.0 with Service Pack 6a or later, Microsoft Millennium Edition, Windows 2000 with Service Pack 2 or later, Windows Vista, Windows XP Professional, Windows XP Home Edition, and Windows Server 2003.

Page 13: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Getting Started

1

1

1

1

1

1

1

1

1

Installing the Software

Note: Ensure that you install Microsoft Visual Studio .NET before installing the DT-Open Layers for .NET Class Library.

The DT-Display for .NET is installed automatically when you install the device driver for your device. Refer to your documentation for your device for more information.

13

Page 14: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 1

14

Using the Online HelpThe online help for DT-Display for .NET is an integrated part of the software.

You can access the help file in one of the following ways:

• From the Task Bar, select Start |Programs | Data Translation, Inc | DT-Open Layers for .NET | DT-Open Layers Class Library | DT-Open Layers for .NET API Help.The stand-alone HTML help file is displayed. Click on OpenLayers.Controls and OpenLayers.Signals for information on the DT-Display control.

• Using the Visual Studio .NET IDE, press F1 on any property or method for context-sensitive help.

The online help contains all of the specific reference information for each of the properties and methods of the DT-Display control.

Page 15: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Getting Started

1

1

1

1

1

1

1

1

1

Using the Example Programs To help you understand more about using the DT-Display control, the example programs, listed in Table 1, are provided.

For detailed information on the example programs, refer to the SamplesHelp help file provided with the DT-Display for .NET.

To open and run these examples, do the following:

1. Start Microsoft Visual Studio .NET.

2. Click File, click Open, and then click Project.

3. Select the example you want to open from the C:\Program Files\DataTranslation\DotNet\OLClassLib\Examples folder (if you installed the software using the default destination location).

4. From the main menu of Microsoft Visual Studio .NET, click Build, and then click Build Solution to build the project.

Table 1: Example Programs

Example Type Example Name Example Description

Analog Input ReadBufferedDataIntoDtDisplay

Shows how to use the DT-Open Layers for .NET Class Library to acquire samples from an analog input channel continuously. When each buffer is completed, the data is converted to voltage and plotted to a display using DT-Display for .NET.

DtDisplay DtDisplay Demonstrates how to use DT-Display for .NET to continuously plot data.

15

Page 16: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 1

16

5. To run the example, click Debug from the main menu, and then click Start.The example program is now running.

6. Use the capabilities of the example program to see how it operates.

7. When you are finished using the example program, click Debug from the main menu, then click Stop Debugging.

8. View the user interface of the example program by clicking the appropriate [Design] tab on the main window.

9. View the source code for the example program by clicking the appropriate tab (such as example.cs) on the main window.

10. Repeat steps 2 through 9 for each example program you want to open, run, and view.

Page 17: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Getting Started

1

1

1

1

1

1

1

1

1

Creating Your Own ProgramTo create your own application program, do the following:

1. Start Microsoft Visual Studio .NET.

2. Click File, click New, and then click Project.

3. Select the project type (Visual Basic Projects or Visual C# Projects), and the template that you want to use (such as, Windows Application).

4. Enter the project name and where you want to save your project, and then click OK.The design environment is shown.

5. Select View > Toolbox.

6. Select the OpenLayers Controls tab.

7. Double-click DT-Display or drag the DT-Display control onto your form.The DT-Display control is added to your form.

8. Right-click on the control, and select Properties to see the property page, shown in Figure 1, for this control.

17

Page 18: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 1

18

Figure 1: Property Page of the DT-Display Control

Page 19: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Getting Started

1

1

1

1

1

1

1

1

1

9. Press F1 on any property to access the context-sensitive online help for that property.

10. To see the methods of this control, select the Object Browser, double-click openlayers.controls, double-click OpenLayers.Controls, and then double-click Display.All the methods and properties supported by the control are displayed, as shown in Figure 2.

Figure 2: Methods and Properties Shown in the Object Browser

19

Page 20: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 1

20

Note: If desired, you can also view the properties and methods of the Signals class that is used by this control, by double-clicking OpenLayers.Signals, and then double-clicking MemorySignal, MemorySignalList, and/or Signal.

11. Press F1 on any property or method to access the context-sensitive online help.

12. Develop your code, as appropriate, using the example programs and the information in this manual.

13. To build your program, click Build from the main menu, and then click Build Solution.

14. To run your program, click Debug from the main menu, and then click Start.

15. To save your program, click File, and then click Save All.

16. When you are finished, click File, and the click Close Solution before exiting from Microsoft Visual Studio .NET.

Page 21: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Getting Started

1

1

1

1

1

1

1

1

1

Distributing Your ProgramWhen you distribute your program, ensure that you also distribute the version of the OpenLayers.Controls assembly that was used to create your program.

One of the best ways to distribute your program is to create a Windows installation project that includes all the necessary files required to run your program. To create an installation project, do the following:

1. Open the program (solution) that you want to distribute within Visual Studio 2003 or Visual Studio 2005.

2. From the File menu, select Add Project, and then select New Project.The Add New Project dialog box appears.

3. Select Setup and Deployment Projects, and select the Setup Wizard template.

4. Specify a name, such as Setup, for the installation project, specify the location for the installation project on your development system, and then click OK.The Welcome screen of the Setup wizard appears.

5. Click Next.

6. Select "Create a setup for a Windows application," and then click Next.

7. Select "Primary output from <the project to be distributed>," and then click Finish.Your program and the file OpenLayers.Controls.dll are added to the Application Folder of the installation project automatically.

8. From the Solutions Explorer, right click on the installation project, and click Build.

9. To test that the setup program works properly, right click on the installation project, click Install, and follow the prompts.

21

Page 22: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 1

22

10. Verify that your program and the file OpenLayers.Controls.dll are installed in the directory that was specified by the setup program.

11. Distribute this setup program to your end users.

Page 23: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

2Control Summary

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Display Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

MemorySignalList Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

MemorySignal Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

23

Page 24: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 2

24

OverviewThe DT-Display control consists of the following classes:

• Display – The base class used by the control to plot data to a display.

• MemorySignalList – A collection of MemorySignal objects.

• MemorySignal – The base class of all memory-resident signal data. This class inherits members from the Signal class.

Each class contains the following members:

• Properties represent the variables that allow you to configure how signals are displayed. Many properties are accessible in the Properties window at design time or at run-time. Some properties can be accessed through the control’s property pages; other properties can be accessed only by writing code.

• Methods are used in code to perform specific operations, allowing you to control how signals are plotted.

• Fields represent information pertaining to a variable or operation.

This chapter summarizes each of the properties, methods, and fields provided by these classes. Refer to Chapter 3 for more information about how to use these properties, methods, and fields.

Page 25: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Control Summary

2

2

2

2

2

2

2

2

2

Display ClassThe Display class is the base class of the DT-Display control. Table 2 lists the properties of this class, and Table 3 lists the methods of this class.

Table 2: Properties Included in the Display Class

Operation Type Name Description

Appearance BackColor Gets or sets the background color when BackgroundStyle is set to Color, or the starting color of the background gradient when BackgroundStyle is set to Gradient.

BackGradientAngle Gets or sets the angle of the color gradient for the background when BackgroundStyle is set to Gradient.

BackGradientColor Gets or sets the ending color for the background gradient when BackgroundStyle is set to Gradient.

BackgroundImage Gets or sets the image to draw to the background when BackgroundStyle is set to Image.

25

Page 26: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 2

26

Appearance (cont.)

BackgroundStyle Gets or sets the style (Color, Gradient, or Image) of the background. When BackgroundStyle is set to Color, the background shows the color specified by BackColor. When BackgroundStyle is set to Gradient, the background shows a color gradient starting with the color specified by BackColor and ending with the color specified by BackGradientColor, at the angle specified by BackGradientAngle. When BackgroundStyle is set to Image, the image specified by BackgroundImage is drawn to the background.

ForeColor Gets or sets the color for the title and footer text of the display.

Misc. AutoScale Gets or sets the autoscale mode. If set to True, the scale of the y-axis is continually adjusted to the minimum and maximum values of the actual input signal(s). If set to False, the scale of the y-axis is set to the default range.

Signals AxesColor Gets or sets the color of the x- and y-axes.

BandModea Gets or sets the display mode (SingleBand or MultiBand) for the selected channels.

GridColor Gets or sets the color of all the gridlines on the display.

SignalBufferLength Gets or sets the length, in samples, of the data array (buffer) for each signal to be plotted.

Table 2: Properties Included in the Display Class (cont.)

Operation Type Name Description

Page 27: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Control Summary

2

2

2

2

2

2

2

2

2

Signals (cont.)

Signals Returns the MemorySignalList collection. You can use this property to add a signal to the display, remove a signal from the display, or access the properties of a signal.

Title/Footline Footer Gets or sets the text for the footer that appears in the center, bottom of the display.

FooterFont Gets or sets the font that is used to format the text in the footer, which appears in the center, bottom of the display.

Title Gets or sets the text for the title that appears in the center, top of the display.

TitleFont Gets or sets the font that is used to format the text in the title, which appears in the center, top of the display.

X-Data XDataCurrentRangeMax Gets or sets the upper limit of the x-axis range that is visible. Generally, this value should be less than or equal to the XDataRangeMax value.

XDataCurrentRangeMin Gets or sets the lower limit of the x-axis range that is visible. Generally, this value should be greater than or equal to the XDataRangeMin value.

XDataName Gets or sets the name for the x-axis.

XDataRangeMax Gets or sets the maximum value that can be displayed on the x-axis.

XDataRangeMin Gets or sets the minimum value that can be displayed on the x-axis.

XDataUnit Gets or sets the units for the x-axis.

Table 2: Properties Included in the Display Class (cont.)

Operation Type Name Description

27

Page 28: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 2

28

a. This property cannot be viewed from the property page; therefore, you can access it only by writing code.

Table 3: Methods Included in the Display Class

Operation Type a

a. The following methods are used in your program when you bring the DT-Display control onto your form. You do not need to explicitly call these methods: BeginInit, ChartBeginInit, ChartEndInit, and EndInit.

Name Description

Rendering DisableRendering Does not allow drawing to the display.

EnableRendering Allows drawing to the display.

Y-Axis Appearance

CaptureScale Sets the scale of the y-axis to the minimum and maximum values of the first input signal in the array.

Signal Color GetCurveColor Returns the color in which to plot a specified signal.

SetCurveColor Sets the color in which to plot a specified signal.

Signal Changes

SignalListUpdate Reinitializes the DT-Display control when the content or count of the MemorySIgnalList has changed.

SignalUpdate Refreshes the display with new signal data.

Printing Print Prints the currently displayed view to the default printer.

Page 29: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Control Summary

2

2

2

2

2

2

2

2

2

MemorySignalList ClassThe Signals property of the DT-Display control allows you to access a list of signals of type MemorySignalList. The MemorySignalList class is a collection of MemorySignal objects, described on page 30.

Table 4 lists the properties and methods included in the MemorySignalList class.

Table 4: Properties and Methods Included in the MemorySignalList Class

Member Type Name Description

Properties Item Returns or selects a MemorySignal object within the MemorySignalList collection.

Methods Add Adds a MemorySignal object to the MemorySignalList collection.

Contains Determines whether a MemorySignalList collection contains a specific MemorySignal object.

IndexOf Returns the index of a MemorySignal object in the MemorySignalList collection.

Insert Inserts a MemorySignal object into the MemorySignalList collection.

Remove Deletes a MemorySignal object from the MemorySignalList collection.

29

Page 30: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 2

30

MemorySignal ClassMemorySignal is the base class of all memory-resident signal data. You can access this class through the Signals property of the Display class. The MemorySignal constructor initializes a new instance of the MemorySignal class.

Table 5 lists the properties, methods, and fields included in the MemorySignalList class.

Note: This class inherits the members of the Signal class.

Table 5: Properties, Methods, and Fields Included in the MemorySignal Class

Member Type Name Description

Properties CurrentRangeMin Gets or sets the lower limit of the y-axis that is visible. In general, this value should be greater than or equal to the RangeMin value. By default, this value is 0.

CurrentRangeMax Gets or sets the upper limit of the y-axis that is visible. In general, this value should be less than or equal to the RangeMax value. By default, this value is 100.

Length Returns the number of elements in the Data field.

Name Gets or sets the name of the signal. By default, this value is SignalName.

RangeMin Gets or sets the minimum value that can be displayed on the y-axis. By default, this value is 0.

Page 31: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Control Summary

2

2

2

2

2

2

2

2

2

Properties (cont.) RangeMax Gets or sets the maximum value that can be displayed on the y-axis. By default, this value is 100.

Unit Gets or sets the engineering units (such as Volts or Ampere) for the y-axis. By default, this value is SignalUnit.

Fields Data Contains the signal data as a memory-resident array of doubles.

Table 5: Properties, Methods, and Fields Included in the MemorySignal Class (cont.)

Member Type Name Description

31

Page 32: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 2

32

Page 33: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

3Using DT-Display

for .NETOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Setting Up the Signals to Display. . . . . . . . . . . . . . . . . . . . . . . . . . 35

Setting Up the Background Appearance . . . . . . . . . . . . . . . . . . . 43

Setting Up the Title and Footer. . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Setting Up the X-Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Setting Up the Y-Axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Printing the Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Zooming and Panning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

33

Page 34: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 3

34

OverviewYou can do the following to set up and use the DT-Display control:

1. Set up the signals to be displayed.

2. Set up the background appearance of the display.

3. Set up the title and footers.

4. Set up the x-axis.

5. Set up the y-axis.

6. Print the display.

The following subsections describe these steps in more detail.

Page 35: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Using DT-Display for .NET

3

3

3

3

3

3

3

3

3

Setting Up the Signals to DisplayThis section describes the following aspects of setting up signals:

• Managing the MemorySignalList, described below

• Assigning data to a signal, described on page 40

• Setting up the appearance of a signal, described on page 42

• Rendering a signal on the display, described on page 42

Managing the MemorySignalList Collection

Use the Signals property of the DT-Display control to access a list of signals, called a MemorySignalList collection, to be displayed. The MemorySignalList class provides properties and methods that allow you to manage the signals that are displayed.

This section describes the following aspects of managing a MemorySignalList collection:

• Adding a signal to the MemorySignalList collection

• Removing a signal from the MemorySignalList collection

• Inserting a signal into the MemorySignalList collection

• Accessing a signal in the MemorySignalList collection

• Getting information about a signal in the MemorySignalList collection

35

Page 36: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 3

36

Adding a Signal to the MemorySignalList

To add a signal to the MemorySignalList collection, select the Signals property from the property pages of the DT-Display control. The MemorySignalCollection editor, shown inFigure 3, appears.

Figure 3: MemorySignal Collection Editor

Select the Add button to add a signal, known as a MemorySignal object, to the MemorySignalList collection. In code, the Add button creates a new instance of a MemorySignal object and invokes the Add method of the MemorySignalList class.

Page 37: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Using DT-Display for .NET

3

3

3

3

3

3

3

3

3

The following properties, shown on the right side of the window, are applied to the MemorySignal object that was added; you can change the values of these properties if you wish:

• CurrentRangeMin – Gets or sets the minimum value that is visible on the y-axis. In general, this value should be greater than or equal to the value of the RangeMin property. By default, this value is 0.

• CurrentRangeMax – Gets or sets the maximum value that is visible on the y-axis. In general, this value should be less than or equal to the value of the RangeMax property. By default, this value is 100.

• Name – Gets or sets the name of the signal. By default, this value is SignalName.

• RangeMax – Gets or sets the maximum value that can be displayed on the y-axis. By default, this value is 100.

• RangeMin – Gets or sets the minimum value that can be displayed on the y-axis. By default, this value is 0.

• Unit – Gets or sets the engineering units (such as Volts or Ampere) for the y-axis. By default, this value is SignalUnit.

Select OK to apply the settings. In code, this appears as follows:

In Visual C#OpenLayers.Signals.MemorySignal memorySignal1 =

new OpenLayers.Signals.MemorySignal();memorySignal1.CurrentRangeMax = 100;memorySignal1.CurrentRangeMin = 0;memorySignal1.Name = "SignalName";memorySignal1.RangeMax = 100;memorySignal1.RangeMin = 0;memorySignal1.Unit = "SignalUnit";this.display1.Signals.Add(memorySignal1);

37

Page 38: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 3

38

In Visual BasicDim MemorySignal1 As OpenLayers.Signals.

MemorySignal = New OpenLayers.Signals.MemorySignal

MemorySignal1.CurrentRangeMax = 100MemorySignal1.CurrentRangeMin = 0MemorySignal1.Name = "SignalName"MemorySignal1.RangeMax = 100MemorySignal1.RangeMin = 0MemorySignal1.Unit = "SignalUnit"Me.Display1.Signals.Add(MemorySignal1)

Removing a Signal from the MemorySignalList

To remove a signal from the MemorySignalList collection, select the Signals property from the property page of the DT-Display control. The MemorySignalCollection editor, shown inFigure 3 on page 36, appears.

Select the signal to remove, and then click the Remove button; this button invokes the Remove method of the MemorySignalList class. In code, this appears as follows:

In Visual C#this.display1.Signals.Remove(memorySignal1);

In Visual BasicMe.Display1.Signals.Remove(MemorySignal1)

Inserting a Signal into the MemorySignalList

To insert a signal into a specified index of the MemorySignalList collection, use the Insert method of the MemorySignalList class in code. All higher index entries are incremented by 1. The following example inserts memorySignal3 into index 0 of the MemorySignalList collection; the signal that was formally at index 0 is now at index 1.

Page 39: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Using DT-Display for .NET

3

3

3

3

3

3

3

3

3

In Visual C#this.display1.Signals.Insert(0, memorySignal3);

In Visual BasicMe.Display1.Signals.Insert(0, MemorySignal3)

Accessing a Signal in the MemorySignalList

You can use the Item ([]) property in code to access a signal at the specified index of the MemorySignalList. The following example shows how to use the Item ([]) property to replace the signal at index 1 of the MemorySignalList with memorySignal4:

Visual C#this.display1.Signals[1] = memorySignal4;

Visual BasicMe.Display1.Signals(1) = memorySignal4

Getting Information About a Signal in the MemorySignalList Collection

To determine whether a specific signal is included in the MemorySignalList collection, use the Contains method of the MemorySignalList class. If the signal is in the list, a value of True is returned; otherwise, a value of False is returned.

To return the index of a MemorySignal object in the MemorySignalList collection, use the IndexOf method of the MemorySignalList class.

The following example shows how to get information related to a signal called memorySignal1:

39

Page 40: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 3

40

In Visual C#://Check if memorySignal1 is in listFlag = this.display1.Signals.Contains(

memorySignal1);//Return the index of memorySignal1 in the listValue = this.display1.Signals.IndexOf(

memorySignal1);

In Visual Basic'Check if MemorySignal1 is in listDim bFlag As Boolean = Me.Display1.Signals.

Contains(MemorySignal1)'Return the index of MemorySignal1 in the listDim Value As Int32 = Me.Display1.Signals.IndexOf(

MemorySignal1)

Assigning Data to a Signal

Each signal (MemorySignal) in the MemorySignalList collection must have the same number of samples. You set the number of samples using the SignalBufferLength property of the DT-Display control. By default, the value of the SignalBufferLength property is 0.

To assign data to a signal, use the Data field of the MemorySignal class, specifying an array of doubles. You can access the Data field using the Signals property of the DT-Display control. For example, Signals[0].Data[15] accesses the data value at index 15 of the data array for the first MemorySignal object in the MemorySignalList collection.

The following example shows how to assign data to a MemorySignal object using the Signals property of the DT-Display control. In this example, each channel in a buffer of analog input data (collected using the DT-Open Layers for .NET Class Library) is assigned to a MemorySignal object in the MemorySignalList collection:

Page 41: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Using DT-Display for .NET

3

3

3

3

3

3

3

3

3

Visual C#//Get voltage data from an analog input channeldouble[] voltagedata = buffer.GetDataAsVolts (

ainSS.ChannelList[channel]);//Assign this data to a MemorySignal objectdisplay1.Signals[channel].Data = voltagedata;

Visual Basic'Get voltage data from an analog input channelDim voltagedata As Double() = buffer.

GetDataAsVolts(ainSS.ChannelList(channel))'Assign this data to a MemorySignal objectdisplay1.Signals(channel).Data = voltagedata

You can also assign data to a MemorySignal object explicitly, without using the Signals property of the DT-Display control. This example shows how to assign an array of linear data to a MemorySignal object explicitly using the MemorySignal class.

Visual C#for (int i = 0; i < display1.SignalBufferLength;

i++){

memorySignal1.Data[i] = i;}

Visual BasicWhile i < display1.SignalBufferLength

MemorySignal1.Data(i) = iSystem.Math.Min(System.Threading.Interlocked.

Increment(i), i - 1)End While

Once you have assigned data to a signal, you can determine the number of elements that are contained in the Data field for that signal using the Length property of the MemorySignal class.

41

Page 42: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 3

42

Setting Up the Appearance of a Signal

You can specify the color in which to plot a specified signal by using the SetCurveColor method of the DT-Display control. You can determine what color was specified for a given signal using the GetCurveColor method.

You can also specify how signals are displayed using the BandMode property of the DT-Display control. Set the BandMode property to SingleBand to overlay the signals in a single band on the display. To display the signals independently from one another, set the BandMode property to MultiBand. Note that the BandMode property is not accessible through the property page of the control; it is accessible only by writing code.

To set the color of the x- and y-axes of the display, use the AxesColor property. You can also set the color of the gridlines on the display using the GridColor property.

Rendering a Signal on the Display

When you do not want your signal to be drawn to the display, use the DisableRendering method of the DT-Display control. Typically, you disable rendering when you are creating or modifying signal data. When you do want your signal to be drawn to the display, use the EnableRendering method.

Call the SignalListUpdate method to reinitialize the DT-Display control when the content or count of the MemorySignalList collection has changed.

Call the SignalUpdate method to refresh the display with new signal data.

Page 43: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Using DT-Display for .NET

3

3

3

3

3

3

3

3

3

Setting Up the Background AppearanceYou can specify how the background of your display looks by setting the Appearance properties of the DT-Display control.

Use the BackgroundStyle property to specify whether you want to change the Color, Gradient, or Image used by the background of the display.

If you set the BackgroundStyle property to Color (the default value), the background is set to the color specified by the BackColor property.

If you set the BackgroundStyle property to Gradient, the background shows a color gradient starting with the color specified by BackColor and ending with the color specified by BackGradientColor. Use the BackGradientAngle property to change how the gradient is applied to the display.

If you set the BackgroundStyle to Image, the image specified by the BackgroundImage property is drawn to the background.

43

Page 44: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 3

44

Setting Up the Title and FooterYou can specify the text for the title and footer as well as how they appear on your display by setting the Title/Footline properties of the DT-Display control.

Use the Title property to specify the text for the title that appears in the center, top of the display. By default, the value of this property is Chart. Use the TitleFont property to specify the font that is used to format the title. By default, the font is Arial, 10 pt, Bold, Underline.

Use the Footer property to specify the text for the footer that appears in the center, bottom of the display. By default, no footer text is specified. Use the FooterFont property to specify the font that is used to format the footer. By default, the font is Arial, 8 pt.

Use the ForeColor property to set the color for the title and the footer text on the display.

Page 45: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Using DT-Display for .NET

3

3

3

3

3

3

3

3

3

Setting Up the X-AxisYou can specify how the x-axis appears on the display by setting the X-Data properties of the DT-Display control.

Use the XDataName property to set the name for the x-axis. By default, the value of this property is Time.

Use the XDataUnit property to set the units for the x-axis. By default, the value of this property is sec.

Use the XDataRangeMin and XDataRangeMax properties to specify the entire range that can be displayed on the x-axis, where XDataRangeMin corresponds to the minimum value in the range and XDataRangeMax corresponds to the maximum value in the range. By default, the value of XDataRangeMin is 0, and the value of XDataRangeMax is 1000.

By setting the XDataCurrentRangeMin and XDataCurrentRangeMax properties, you can define a subset of the range (called that current visible range) that will be displayed on the x-axis, where XDataCurrentRangeMin corresponds to the minimum value that you want to display and XDataCurrentRangeMax corresponds to the maximum value that you want display. For example, if your entire range for the x-axis is 0 to 1000, but you only want to display a range of 50 to 100 on the x-axis, set XDataCurrentRangeMin to 50 and XDataCurrentRangeMax to 100. By default, the value of XDataCurrentRangeMin is 0, and the value of XDataCurrentRangeMax is 1000.

45

Page 46: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 3

46

Setting Up the Y-AxisYou can determine how the y-axis appears on your display using the AutoScale property or the CaptureScale method of the DT-Display control, as follows:

• If you want to set the scale of the y-axis to the default range (using linear scaling), set the AutoScale property to False (the default setting).

• If you want the scale of the y-axis to be continually adjusted to the minimum and maximum values of the signal data (using logarithmic scaling), set the AutoScale property to True.

• If you want to set the scale of the y-axis to the minimum and maximum values of the first signal in the MemorySignalList collection, use the CaptureScale method.

Note: You determine the default range for the y-axis by setting the properties of the MemorySignal class. Refer to page 37 for more information.

Page 47: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Using DT-Display for .NET

3

3

3

3

3

3

3

3

3

Printing the DisplayIf you want to print the currently displayed view to the default printer, use the Print method of the DT-Display control.

47

Page 48: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 3

48

Zooming and PanningDuring runtime, you can zoom in on the data to rescale or magnify the data that you want to view. To zoom in on the data, create a rectangle around the region you are interested in with your left mouse button. Click the right mouse button to undo the zoom.

Note: When you zoom in on data, AutoScale mode is automatically disabled. When you undo the zoom, AutoScale mode is reenabled if you previously set it to True.

You can also pan, or move, the view. To pan the view, hold the Ctrl button down while you click on the DT-Display control with your left mouse button. Click the right mouse button to undo the panning.

Page 49: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

4Programming FlowchartsSetting Up Signals to Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Setting Up the Background Appearance . . . . . . . . . . . . . . . . . . . 53

Setting Up the Titles and Footers . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Setting Up the X-Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Setting Up the Y-Axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Printing the Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

49

Page 50: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 4

50

The flowcharts presented in the remainder of this chapter show how to use the properties and methods of the DT-Display control to plot data.

Page 51: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Programming Flowcharts

4

4

4

4

4

4

4

4

4

Setting Up Signals to Display

Add another signal to the list?

Select the Signals property from the property page of the DT-Display control, then click Add to add a

signal to the MemorySignalList collection.

For the signal that was added, set up values for the y-axis using the following properties:

CurrentRangeMax, CurrentRangeMin, Name, RangeMax, RangeMin, Unit, and then click OK.

Yes

No

Write code to assign data to each MemorySignal object using the Data field of the MemorySignal

class, which is also accessible through the Signals property of the Display class.

Go to the next page.

Disable drawing to the display by calling the DisableRendering method in code.

Set the number of samples for all signals using the SignalBufferLength property

51

Page 52: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 4

52

Go to page 58.

Set up the

appearance of the

signal?

Yes

No

Continued from previous page.

Enable drawing to the display by calling the EnableRendering method in code.

If desired, refresh the display by calling the SignalUpdate method.

Page 53: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Programming Flowcharts

4

4

4

4

4

4

4

4

4

Setting Up the Background Appearance

Is BackgroundStyle set to

Image?

Is BackgroundStyle set to

Color?

Use the BackgroundStyle property to specify whether you want to change the Color, Gradient, or

Image used by the background of the display.

Specify the color of the background using the BackColor property.

Yes

No

Is BackgroundStyle set to Gradient?

Yes

No

Specify the starting color of the gradient using the BackColor property.

Specify the ending color of the gradient using the BackGradientColor property.

Specify the angle of the gradient using the BackGradientAngle property.

Yes Specify the image for the background using the BackgroundImage property.

53

Page 54: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 4

54

Setting Up the Titles and Footers

Specify the text for the title using the Title property.

Specify the font that is used to format the title using the TitleFont property.

Specify the text for the footer using the Footer property.

Specify the font that is used to format the footer using the FooterFont property.

Specify the color for the title and the footer text using the ForeColor property.

Page 55: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Programming Flowcharts

4

4

4

4

4

4

4

4

4

Setting Up the X-Axis

Specify the name for the x-axis using the XDataName property.

Specify the units for the x-axis using the XDataUnit property.

Specify the minimum value in the range for the x-axis using the XDataRangeMin property.

Specify the maximum value in the range for the x-axis using the XDataRangeMax property.

Specify the first visible value to display on the x-axis using the XDataCurrentRangeMin property.

Specify the last visible value to display on the x-axis using the XDataCurrentRangeMax property.

55

Page 56: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 4

56

Setting Up the Y-Axis

Adjust y-axis to min.

and max. values of the

signal?

Set the AutoScale property to True to continually adjust the y-axis to the minimum and maximum values of the

signal data for each signal in the MemorySignalList collection.

Yes

No

Adjustonly for the

first signal in the list?

No

Yes

Use the CaptureScale method to adjust the y-axis

to the minimum and maximum values of the first

signal in the MemorySignalList collection.

Set the AutoScale property to False to set the scale of the y-axis to the default range.

Page 57: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Programming Flowcharts

4

4

4

4

4

4

4

4

4

Printing the Display

Use the Print method of the DT-Display control to print the currently displayed view.

57

Page 58: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 4

58

Setting up the Appearance of a Signal

Specify the color of the signal using the SetCurveColor method of the Display class.

To overlay signals in a signal band, set the BandMode property to SingleBand. To display the

signals independently from one another, set the BandMode property to MultiBand.

Set the color of the gridlines on the display using the GridColor property.

Set the color of the x- and y-axes of the display using the AxesColor property.

Page 59: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

5Product Support

59

Page 60: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Chapter 5

60

Should you experience problems using DT-Display for .NET, follow these steps:

1. Read all the appropriate sections of this manual. Make sure that you have added any “Read This First” information to your manual and that you have used this information.

2. Check for a README file on the Data Acquisition CD. If present, read this file for the latest installation and usage information.

3. Check that you have installed your hardware devices properly. For information, refer to the documentation supplied with your devices.

4. Check that you have installed the device drivers for your hardware devices properly. For information, refer to the documentation supplied with your devices.

5. Check that you have installed your software properly. For information, refer to page 13.

If you are still having problems, Data Translation’s Technical Support Department is available to provide technical assistance. To request technical support, go to our web site at http://www.datatranslation.com and click on the Support link.

When requesting technical support, be prepared to provide the following information:

• Your product serial number

• The hardware/software product you need help on

• The version of the CD you are using

• Your contract number, if applicable

If you are located outside the USA, contact your local distributor; see our web site (www.datatranslation.com) for the name and telephone number of your nearest distributor.

Page 61: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Index

Aaccessing signals in the

MemorySignalList 39Add method 29, 36adding signals to the

MemorySignalList 36assigning data to a signal 40AutoScale property 26, 46, 56AxesColor property 26, 42, 58

BBackColor property 25, 43, 53BackGradientAngle property 25, 43,

53BackGradientColor property 25, 43,

53background settings 43BackgroundImage property 25, 43, 53BackgroundStyle property 26, 43, 53BandMode property 26, 42, 58BeginInit method 28

CCaptureScale method 28, 46, 56ChartBeginInit method 28ChartEndInit method 28Contains method 29, 39conventions used 7CurrentRangeMax property 30, 37, 51CurrentRangeMin property 30, 37, 51

DData field 31, 40, 51data for a signal 40DisableRendering method 28, 42, 51Display class

AutoScale property 26, 46, 56AxesColor property 26, 42, 58BackColor property 25, 43, 53BackGradientAngle property 25, 43,

53BackGradientColor property 25, 43,

53BackgroundImage property 25, 43,

53BackgroundStyle property 26, 43, 53BandMode property 26, 42, 58BeginInit method 28CaptureScale method 28, 46, 56ChartBeginInit method 28ChartEndInit method 28DisableRendering method 28, 42, 51EnableRendering method 28, 42, 52EndInit method 28Footer property 27, 44, 54FooterFont property 27, 44, 54ForeColor property 26, 44, 54GetCurveColor method 28, 42GridColor property 26, 42, 58Print method 28, 47, 57SetCurveColor method 28, 42, 58SignalBufferLength property 26, 40,

51

61

Page 62: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Index

62

SignalListUpdate method 28, 42Signals property 27, 29, 35, 51SignalUpdate method 28, 42, 52Title property 27, 44, 54TitleFont property 27, 44, 54XDataCurrentRangeMax property

27, 45, 55XDataCurrentRangeMin property

27, 45, 55XDataName property 27, 45, 55XDataRangeMax property 27, 45, 55XDataRangeMin property 27, 45, 55XDataUnit property 27, 45, 55

distributing your program 21

EEnableRendering method 28, 42, 52EndInit method 28example programs 15

Ffields 24flowcharts 49

print the display 57setting up signals to display 51setting up the appearance of a signal

58setting up the background

appearance 53setting up the x-axis 55setting up the y-axis 56setting up titles and footers 54

Footer property 27, 44, 54footer settings 44, 54FooterFont property 27, 44, 54

ForeColor property 26, 44, 54

GGetCurveColor method 28, 42getting information about the

MemorySignalList 39GridColor property 26, 42, 58

Hhelp 14

IIndexOf method 29, 39Insert method 29, 38inserting signals into the

MemorySignalList 38installation program 21Item property 29, 39

LLength property 30, 41

Mmanaging the MemorySignalList

collection 35MemorySignal class

CurrentRangeMax property 30, 37, 51

CurrentRangeMin property 30, 37, 51

Data field 31, 40, 51Length property 30, 41Name property 30, 37, 51

Page 63: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Index

RangeMax property 31, 37, 51RangeMin property 30, 37, 51Unit property 31, 37, 51

MemorySignalListaccessing signals in 39adding signals to 36getting information about 39inserting signals into 38removing signals from 38

MemorySignalList classAdd method 29, 36Contains method 29, 39IndexOf method 29, 39Insert method 29, 38Item property 29, 39Remove method 29, 38

method 24

NName property 30, 37, 51

Oonline help 14overview 11

Ppanning 48Print method 28, 47, 57printing the display 47, 57programming flowcharts 49property 24

RRangeMax property 31, 37, 51RangeMin property 30, 37, 51Remove method 29, 38removing signals from the

MemorySignalList 38rendering a signal 42requirements 12

Sservice and support procedure 60SetCurveColor method 28, 42, 58setting the background appearance 53setting up signals to display 35, 51setting up the appearance of a signal

42, 58setting up the background appearance

43setting up the footer 44, 54setting up the title 44, 54setting up the x-axis 45, 55setting up the y-axis 46, 56setup program 21signal appearance 42, 58signal data 40SignalBufferLength property 26, 40,

51SignalListUpdate method 28, 42Signals property 27, 29, 35, 51SignalUpdate method 28, 42, 52summary of library 23system requirements 12

Ttechnical support 60

63

Page 64: DT-Display for .NET User’s Manual · 2012. 4. 10. · CD for programming DT-Open Layers-compliant devices in Visual C# or Visual Basic .NET: † DT-Display for .NET – Provides

Index

64

Title property 27, 44, 54title settings 44, 54TitleFont property 27, 44, 54troubleshooting checklist 60

UUnit property 31, 37, 51

Xx-axis settings 45, 55XDataCurrentRangeMax property 27,

45, 55XDataCurrentRangeMin property 27,

45, 55XDataName property 27, 45, 55XDataRangeMax property 27, 45, 55XDataRangeMin property 27, 45, 55XDataUnit property 27, 45, 55

Yy-axis settings 46, 56

Zzooming 48