dpSetErrorCheck()
Sets a data point.
Synopsis
void dpSetErrorCheck(string dp, anytype value, bool errWin, int x, int
y)
Parameters
| Parameter | Meaning |
|---|---|
| dp | full data point name, for example, DP.EL1:_original.._value |
| value | value |
| errWin | true: Display child panel with an error message |
| x, y | Position of the child panel; if x or y is -1, the child panel is displayed centered. |
Return Value
None
Errors
In the event of an error no list of error classes is set!
Description
dpSetErrorCheck() allows a data point to be set. The function waits for an answer (internal dpSetWait()). If an error has occurred, a child panel can therefore be displayed with an error message as a warning. The function is intended for use within panels.
If there exists no definition for a config or attribute, the following defaults are used and added internal:
| Function | Default |
|---|---|
| dpSet*() | _original.._value |
| dpGet() | _online.._value |
| dpGetAsynch() | _offline.._value |
| dpGetPeriod() | _offline.._value |
| dpConnect() | _online.._value |
| dpDisconnect() | _online.._value |
Example
Attempts to set the original value of DP1 to 123. If an error occurs (for example, data point not found), a panel with an error message at the position (0,0).
main()
{
dpSetErrorCheck("DP1.:_original.._value",123,true,0,0);
}
Assignment
Data point function
Availability
CTRL (libCTRL.ctl)