DataqSdk Control > Methods > ADGainList

Previous | Next

ADGainList

Applies to:

DATAQSDK Active X Control

Description:

This command calls the Gain Index list as specified by the programmer. This function is only for products that support programmable gain and is used to set up the gain index for channels. The gain index is determined by the hardware that is being used. 

For example:

 
DI-720
Gain Factor Gain Index Voltage Range

1

2

4

8

0

1

2

3

±10V

±5V

±2.5V

±1.25V

 

Default is Gain Factor of 1 - Gain Index of 0. See Gain Factors and Settings for a more complete listing of gain factors and settings.

Syntax:

DataqSdk1.ADGainList (variant) (where variant is the name given to the gain list as specified by the programmer - in the example below, it is GainList)

Example:

Dim ChannelList(32) As Integer

Dim GainList (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

 

'sets the gain list with the second, third, and fifth channels (channels 2, 3, and 15 as labelled on your hardware device) as having a gain index of 0; the first and fourth channels (channels 1 and 14 as labelled on your hardware device) with a gain index of 1; and the sixth channel (channel labelled 16 on your hardware device) with a gain index of 2

GainList(0)=1

GainList(1)=0

GainList(2)=0

GainList(3)=1

GainList(4)=0

GainList(5)=2

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.ADGainList (GainList)

DataqSdk1. Start

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

 

Reference Materials | Top