DataqSdk Control >Methods > ADDiffList

Previous | Next

ADDiffList

Applies to:

DATAQSDK Active X Control

Description:

This command calls the Differential Settings list as specified by the programmer. If not specified all channels will be set as single-ended. Based on the channel list, each channel can be specified as either differential (1) or single ended (0).

A differential channel requires a pair of channel input terminals (+ and -). Designating a channel as differential automatically designates its corresponding input channel as the negative input. It is not possible to enable a differential channel numbered higher than one-half the total number of channels provided by the hardware. Channels 1 through 8 on your hardware device correspond with Channels 9 through 16; Channels 17 through 24 correspond with channels 25 through 32; etc. For example, if you designate channel 2 on your hardware device as differential, channel 2 will be the positive input terminal and channel 10 will be the negative input terminal.

Note: If you attempt to set what is a designated negative input terminal (i.e., channels 9 through 16) as a positive terminal, that channel will be designated as digital. For example, designating ChannelList(0) = 8 and DiffList(0) = -1 would make ChannelList(0) digital.

By using 1 instead of 0 in an element of the array passed to ADDiffList, a DI-245 channel becomes a thermocouple, and the gain index specifies thermocouple type in alphabetical order starting with 0 for B (see index).

For DI-2108 series rate channel 9, the upper byte of the ADDiffList table entry specifies a moving-window filter length for rate computation, from 0 for noisy and responsive to 63 for smooth and delayed (resulting in filter lengths 1 through 64).

Syntax:      

DataqSdk1.ADDiffList (variant) (where variant is the name given to the differential settings list as specified by the programmer - in the example below, it is DiffList)

Example:

Dim ChannelList(32) As Integer

Dim DiffList(32) As Integer

 

Private Sub Form_Load()

ChannelList(0)=0

ChannelList(1)=1

ChannelList(2)=2

ChannelList(3)=13

ChannelList(4)=14

ChannelList(5)=15

 

'Will set up the first and second channels (channels 1 and 2 as the positive input terminals, channels 9 and 10 as the negative input terminals, as labelled on your hardware device) as being differential. All other channels are single-ended (channels 3, 14, 15, and 16 as labelled on your hardware device).

DiffList(0)=1

DiffList(1)=1

DiffList(2)=0

DiffList(3)=0

DiffList(4)=0

DiffList(5)=0

End Sub

 

Private Sub DataqSdk1_ NewData(ByVal Count As Integer)

DQChart1. Chart (DataqSdk1. GetData)

End Sub

 

Private Sub Start_Click()

DataqSdk1. ADChannelCount = 6

DataqSdk1. EventPoint = 20

DataqSdk1. ADChannelList (ChannelList)

DataqSdk1.ADDiffList (DiffList)

DataqSdk1. Start

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

 

Reference Materials | Top