About OnError event


In DNC, if an error occurs while the component is running, it will be notified by the OnError event.

In the OnError event, the event argument [e] is used to notify the details of the error that occurred.

 

■Parameters of event argument [e]

Arguments

Type

Description

Error

int

Indicates the error code. (Refer to: Error code details)

ErrorCategory

int

Indicates the category in which the error occurred (classification of component/driver information, etc.).

ErrorType

int

Indicates the type of error (method/property/event, etc.).

Param

int

Indicates the parameters defined by ErrorCategory/ErrorType.

 

The classification of ErrorCategory/ErrorType/Param in the event argument [e] is shown below.

 

     ■Parameter details of event argument [e]

ErrorCategory

ErrorType

Param

Value[Dec]

Description

Value[Dec]

Description

Description

1

DIO(WDM) Driver

1

Driver API

0

2

AIO(WDM) Driver

1

Driver API

0

3

CNT(WDM) Driver

1

Driver API

0

21

DncDaq

2

Property

0

3

Method

Method No.(Dnc)

4

Event

Event No.

5

DAQ schedule

0

6

DAQ input task

Input No. (-1 for indefinite case such as batch)

7

DAQ output task

Output No. (-1 for indefinite case such as batch)

8

DIO edge

Edge No.

9

DAQ sampling

0

11

CNT function

0

41

DncLamp

2

Property

0

3

Method

Method No.

4

Event

Event No.

42

DncButton

2

Property

0

3

Method

Method No.

4

Event

Event No.

43

DncLabel

2

Property

0

3

Method

Method No.

4

Event

Event No.

44

DncTextBox

2

Property

0

3

Method

Method No.

4

Event

Event No.

45

DncGraph

2

Property

0

3

Method

Method No.

4

Event

Event No.

46

DncWriteFile

2

Property

0

3

Method

Method No.

4

Event

Event No.

47

DncDataSet

2

Property

0

3

Method

Method No.

4

Event

Event No.

48

DncLevel

2

Property

0

3

Method

Method No.

4

Event

Event No.

49

DncMeter

2

Property

0

3

Method

Method No.

4

Event

Event No.

50

DncTrackBar

2

Property

0

3

Method

Method No.

4

Event

Event No.

51

DncVolume

2

Property

0

3

Method

Method No.

4

Event

Event No.

52

DncFFT

2

Property

0

3

Method

Method No.

4

Event

Event No.

 

■Example of error occurrence

   Shows the error parameters when Invalid parameter occurs during DncDaq Init.

Error: 510001(Invalid parameter)

ErrorCategory: 21(DncDaq)

ErrorType: 3(Method)

Param: 16(Init method)