DataqSdk Control > Properties > DeviceDriver

Previous | Next

DeviceDriver

Applies to:

DATAQSDK Active X Control

Description:

By default, the DeviceDriver 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. 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 DeviceDriver and DeviceID 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 adv_sdk.vbp, allowing the user to select which device to use and setting defaults based on that device. An incorrectly defined DeviceDriver will cause the DriverError Event to be fired. See the table in Device Drivers and Device IDs for a listing of device drivers. Example 1 uses the default; Example 2 calls a driver.

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.DeviceDriver=variable (where variable is the device driver - must be in quotes)

Variable:

String

Example 1:

Private Sub DataqSdk1_ NewData(ByVal Count As Integer)

DQChart1. Chart (DataqSdk1. GetData)

End Sub

 

Private Sub Start_Click()

DataqSdk1. EventPoint = 20

DataqSdk1. Start

Label1.Caption = "Your device driver is " & DataqSdk1.DeviceDriver

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

Example 2:

Private Sub DataqSdk1_ NewData(ByVal Count As Integer)

DQChart1. Chart (DataqSdk1. GetData)

End Sub

 

Private Sub Form_Load()

'this is the device driver for a 720 USB device this must be in quotes

DataqSdk1.DeviceDriver = "di720nt.dll"

End Sub

 

Private Sub Start_Click()

DataqSdk1. EventPoint = 20

DataqSdk1. Start

Label1.Caption = "Your device driver is " & DataqSdk1.DeviceDriver

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

 

Reference Materials | Top