Skip to Main Content Skip to Search
Product Documentation

Real Time Devices DM6420 Analog Input (A/D) - DM6420 Analog Input block

Library

xPC Target Library for Real Time Devices

Scaling Input to Output

Hardware Input

Block Output Data Type

Scaling

Volts

Double

1

Block Parameters

Channel vector

Enter numbers between 1 and 16. This driver allows the selection of individual A/D channels in any order. The number of elements defines the number of A/D channels used.

For example, to use the first, second and fifth channels, enter

[1,2,5]

Number the channels beginning with 1 even if the board manufacturer starts numbering the channels with 0.

Input coupling vector

Enter either 1 (single-ended) or 2 (differential) for each of the channels in the channel vector to choose the coupling code. The coupling vector must be the same length as the channel vector. This driver allows the coupling of each channel to be different.

For example, if the first and second channels are single-ended and the fifth channel is a differential input, enter

[1,1,2]

The driver selects a second differential input 8 channels higher than the first channel. In the example above, the driver would select the thirteenth channel as a differential input with the fifth channel.

Range vector

Enter a range code for each of the channels entered in the channel vector. The range vector must be the same length as the channel vector. This driver allows a different range for each channel.

The following table is a list of the ranges for this driver and the corresponding range codes.

Input Range (V)

Range Code

-10 to +10

-10

-5 to +5

-5

0 to +10

10

For example, if the first channel is -10 to + 10 volts and the second and fifth channels are –5 to +5 volts, enter

[-10,-5,-5]
Gain vector

Enter 1, 2, 4, or 8 for each of the channels in the channel vector to choose the gain code of that channel. The gain vector must be the same length as the channel vector. This driver allows the gain of each channel to be different.

    Note   While this board has programmable input ranges of ±5, ±10 and 0 to 10, this driver sets the input range to +10, and then lets you select different input ranges by choosing different gains.

The following table is a list of the ranges for this driver given the gain entered in the gain vector.

Gain

Range (V)

1

-10 to 10

2

-5 to +5

4

-2.5 to 2.5

8

-1.25 to 1.25

Notice that by increasing the gain code the voltage range is decreased. The gain divides the input voltage range.

For example, if the first channel has a gain code of 1 (10 volt range) and the second and fifth channels have a gain code of 2 (5 volt range), enter

[1,2,2]
Sample time

Base sample time or a multiple of the base sample time.

Base address

Enter the base address of the board. It is important that this entry corresponds to the DIP-switch settings on the board. For example, if the base address is 300 (hexadecimal), enter

0x300
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS