DataqSdk Control > Properties > DeviceID

Previous | Next

DeviceID

Applies to:

DATAQSDK Active X Control

Description:

Ethernet and USB devices have a DeviceID. Parallel-port-based or ISA bus plug-in cards running under WinNT also have a DeviceID. Parallel-port-based or ISA bus plug-in cards running under Win95/98 do not have a DeviceID. By default, the DeviceID will be the one used by the last WinDaq installation. It is the operator’s responsibility to be sure the correct device driver is selected. Open the file Windows\tpdataq.ini to see all Dataq Instruments’ hardware ever installed on your computer. The one marked under the heading [Global] is currently active. Another available option is to use the Dataq Device Driver Wizard. Note: The Device Driver Wizard will not work for serial products. In this program, the active Dataq Instrument’s hardware can be selected. This will define the DeviceDriver and the DeviceID automatically, without the need to call these properties in your program (the preferred method). If you do not have both the DeviceID and DeviceDriver properties correct you cannot acquire data.

If you are writing a program that will be used with different devices or if the user has multiple devices installed on his/her PC, it is suggested that you use something similar to the model in the sample program DataqSdkDevice.vbp, allowing the user to select which device to use and setting defaults based on that device. See the table in Device Drivers and Device IDs for a listing of Device IDs.

Note: Be sure to verify the correct DeviceDriver and DeviceID in the Device Drivers table provided in the Reference Materials of these help files.

Syntax:

DataqSdk1.DeviceID=variable (where variable is the device ID)

Variable:

String

Example:

Private Sub DataqSdk1_ NewData(ByVal Count As Integer)

DQChart1. Chart (DataqSdk1. GetData)

End Sub

 

Private Sub Start_Click()

'this is the device ID for a 720 USB device

DataqSdk1.DeviceID = 0

DataqSdk1. EventPoint = 20

DataqSdk1. Start

Label1.Caption = "Your Device ID is " & DataqSdk1.DeviceID & "."

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

 

Reference Materials | Top