|
If the UI requests a non-existent data point attribute, for instance, only the UI or the CTRL program can know whether the non-existence of this attribute constitutes an error (the read request could also be a check to see whether this attribute actually exists). Therefore, in this case the UI must issue the error message, waiting for the response from the Event Manager before issuing an error message. |
|
This information means the following: |
Information |
Meaning |
Panel |
The panel in which the error occurred |
Object |
The object in which the error occurred |
In Panel-Reference |
If the graphics object is a reference, then the whole hierarchy is given here. At the top is the panel in which the graphics object is defined, then all parents of the panel successively. |
File |
The file in which the error occurred, for example, a CTRL library. |
Script |
Property name for which the erroneous CTRL script was written. |
Line |
Line number |
Example 1
WCCOANG(1), 2003.06.30
12:51:30.857, CTRL, WARNING, 78, Assignment to this expression
impossible, |
Example 2
WCCOANG(1), 2003.06.03 12:51:30.857, CTRL,
WARNING, 73, Variable not defined, |
For waiting control functions the configurator can read the last error to have occurred in this errClass using getLastError(). the configurator can output an error message for the user in dialog form using errorDialog() or output the error in the Standard-Error with throwError(). Note Some functions (for example, dpSetWait(), dpCreate(), dpTypeChange(), ...) may return the value 0 although when the function fails (a failed function returns otherwise the value -1). This means that the user has to query the possible error via getLastError() and check if the function was executed successfully (see also the example of dpWaitForValue() below).
A failed function returns 0 for example,:
When a dpSetWait() is executed by a UI on a data point that does not exist. The UI knows that this data point does not exist and returns -1. If a dpSetWait() is executed on a nonexisting config/attribute of a data point element the function misleadingly returns 0 (the UI does not know whether the specific config exists or not). To check if errors occurred the user has to query them via getLastError(). |
The data type errClass respectively dyn_errClass can be used to store WinCC OA errors. An error variable can be assigned to another error variable or string variable. You can read the individual attributes using suitable functions. |
Example |
Example with dpWaitForValue():
main() |
Example |
main() |
V 3.11 SP1
Copyright ETM professional control GmbH 2013 All Rights Reserved