DataqSdk Control > Events > ControlError

Previous | Next

ControlError

Applies to:

DATAQSDK Active X Control

Description:

Fires when a control error is detected by the control. This event fires most commonly as a result of an incorrectly defined DeviceDriver, DeviceID or SampleRate.

If you continue to receive a control error and cannot determine the problem add the line "debug=1" to the [Global] section of C:\Windows\tpdataq.ini and try running your program again (see DataqSDK Log File). When the error occurs, pause Visual Basic to close the DataqSDK.log file and look at the end of it. If necessary post the relevant part of the file in a support forum or email the entire file to support@dataq.com (see Technical Support). Be sure to remove the line once the problem is resolved.

Some of the more common codes:

 

888

Failed to allocate array for return variant.

 

-1

Failed/uninitialized link to specified device driver. This error is generally a result of an incorrectly defined DeviceDriver, DeviceID or SampleRate.

 

3000

Failed to set up the monitoring process (stream feature only).

 

8001

Failed to allocate maximum data buffer for the device.

 

8000

Failed to allocate minimum data buffer for the device.

 

Other codes:

 

0

No Error

 

1

Driver Error

 

2

Communication Error

 

3

Reset Error

 

4

Error closing data acquisition device, or unable to claim parallel port

 

5

Information Error

 

6

Digital Out Error

 

7

Analog Out Error

 

8

Mode Error

 

9

Start Scan Error

 

10

Stop Scan Error

 

11

Input Scan List Error

 

12

Output Scan List Error

 

13

Burst Error

 

14

Scan List Length Error

 

19

Device not opened for function requiring it

 

20

Error Code Invalid

 

21

Device already open error

Example:

Private Sub DataqSdk1_ NewData(ByVal Count As Integer)

DQChart1. Chart (DataqSdk1. GetData)

End Sub

 

Private Sub Start_Click()

DataqSdk1. EventPoint = 20

DataqSdk1. Start

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

 

Private Sub DataqSdk1_ControlError (ByVal Code As Long)

Label1.Caption=Code

DataqSdk1. Stop

End Sub

 

Reference Materials | Top