DataqSdk Control >Properties > ADChannelCount

Previous | Next

ADChannelCount

Applies to:

DATAQSDK Active X Control

Description:

This function defines the length of the ADC Channel Scan List by indicating the number of channels to be enabled. If you need to change the channel allocation, you can do it via the ADChannelList method. If unspecified, the default is the first channel in the scan list. If the number of channels is specified, but not the channel allocation, the default is 0, 1, 2, 3, etc. (for example, if ADChannelCount is set to 8 and the ADChannelList is not specified - Channels 0 through 7 will be enabled as channels 0 through 7 consecutively).

Syntax:

DataqSdk1.ADChannelCount=variable (where variable is the number of enabled channels)

Variable:

Integer

Example:

Dim ChannelList(32) As Integer

 

Private Sub Form_Load()

'Will set up channels labelled 1, 2, 3, 14, 15, and 16 (as labelled on your hardware device) to be channels 0, 1, 2, 3, 4, and 5 in this ChannelList

ChannelList(0)=0

ChannelList(1)=1

ChannelList(2)=2

ChannelList(3)=13

ChannelList(4)=14

ChannelList(5)=15

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. Start

Label1.Caption = "You have " & DataqSdk1.ADChannelCount & " channels enabled."

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

 

  Reference Materials | Top