Documentation

National Instruments PCI-6259 Analog Input

Analog Input block for PCI-6259, PCIe-6259, PXI-6259, and PXIe-6259 boards

Library

Simulink® Real-Time™ Library for National Instruments®

Scaling of Input to Output

I/O Module Input

Block Output Data Type

Scaling

Volts

Double

1

Block Parameters

Channel vector

Enter numbers between 1 and 32. This driver allows you to enter channel numbers in arbitrary order.

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

[1,2,5]

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

Range vector

Enter a range code for each of the channels in the channel vector. You can specify one value to replicate over the channel vector, or specify one for each channel. This driver allows each channel to be different. This board works only in bipolar mode.

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

-2 to +2

2

-1 to +1

1

-0.5 to +0.5

0.5

-0.2 to +0.2

0.2

-0.1 to +0.1

0.1

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

[10,1,1]
Input coupling vector

Enter a coupling code for each of the channels in the channel vector. You can replicate one value over the channel vector, or specify one for each channel. This driver allows a different coupling for each channel.

The following table is a list of the couplings for this driver and the corresponding coupling codes.

Coupling

Coupling Code

Description

RSE

0

Analog input line connected to the positive input of the PGIA. Analog input ground (AIGND) internally connected to the negative input of the PGIA. See the National Instruments user manual.

NRSE

1

Analog input line connected to the positive input of the PGIA. Analog input sense (AISENSE) connected to the negative input of the PGIA. See the National Instruments user manual.

DIFF

2

First analog input line connected to the positive input of the PGIA. Second analog input line connected to the negative input of the PGIA. See the National Instruments user manual.

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

[0,0,2]

National Instruments boards use a zero-based number scheme for differential mode channel pairs. Simulink Real-Time drivers use a one-based number scheme that adds a 1 to the channel number, as shown in the following table:

Zero-Based Channel NumberOne-Based Channel Number

+

-

+

-

0

8

1

9

1

9

2

10

2

10

3

11

3

11

4

12

4

12

5

13

5

13

6

14

6

14

7

15

7

15

8

16

16

24

17

25

17

25

18

26

18

26

19

27

19

27

20

28

20

28

21

29

21

29

22

30

22

30

23

31

23

31

24

32

The I/O module uses a second input 8 channels higher than the first channel as the negative input of the pair. In the example above, the I/O module would use the 13th channel as a differential input with the fifth channel.

If the module is set up for differential mode, you can read the data from either of the channels in the differential pair. For example, if you have a differential pair of 1 and 9, you can read the data from channel 1 or channel 9. However, you might want to read the lower channel number of the pair because it remains unchanged when you switch the input mode between single-ended and differential.

Scan interval

If Channel vector has more than one channel in it, enter the time between sampling different channels. Because execution waits for data to be available, this value increases the time to execute the block. If you enter a shorter time, you get the minimum 1e-6. If you enter a time smaller than this value, the time will still be 4e-6, which is the fastest this board can acquire data. See the National Instruments user manual for a discussion about settling time and the need to control the time between sampling different channels depending on the impedance of the signal source.

Sample time

Enter the base sample time or a multiple of the base sample time (-1 means sample time is inherited).

PCI slot (-1:autosearch)

If only one board of this type is in the target computer, enter -1 to locate the board.

If two or more boards of this type are in the target computer, enter the bus number and the PCI slot number of the board associated with this driver block. Use the format [BusNumber,SlotNumber].

To determine the bus number and the PCI slot number, type:

tg = slrt;
getPCIInfo(tg, 'installed')

Was this topic helpful?