Predefined Local Variables
Predefined local variables
Every script contains some predefined variables. All predefined variables are declared as constants, so they may not be changed from the script.
Value | Group of local variables | Value type | Meaning |
|---|---|---|---|
QUERY action | |||
0 | _Q_YES | INT | A positive response to an action. |
1 | _Q_NO | INT | A negative response to an action. |
2 | _Q_TIMEOUT | INT | Exceeded the maximal wait time on action. |
3 | _Q_DONTKNOW | INT | Response to an action. |
Variables describing an error | |||
- | _ERR_LINE | INT | Line, where the error occurred. |
- | _ERR_NR | INT | Error number. |
_ERR_NR_TRANS_EX | INT | Extended error number - list of existing errors. | |
- | _ERR_MSG | TEXT | Error message. |
Database opening parameters | |||
1 | _DB_READ | INT | ''Read-only'' access to the database. |
2 | _DB_MODIFY | INT | ''Modify'' access to the database. |
Parameters from the D2000 HI process | |||
- | _FROM_HIP | ALIAS | If the script is started from the D2000 HI process, then the variable contains the reference to the given process. |
- | _HIP_PAR_STR | TEXT | If the script is started from the D2000 HI process, then the variable contains the parameter declared during event linking. |
- | _HIP_USER_DESC | TEXT | If the script is started from the D2000 HI process, then the variable contains the name of the logged-on user. After logging off the user and then logging on the other one to the D2000 HI, this variable is updated. |
0 | _ERR_NO_ERROR | INT | No error. |
1 | _ERR_EXPRESSION_STATUS | INT | Undefined value. |
2 | _ERR_EXPRESSION_TYPE | INT | Invalid value. |
3 | _ERR_NO_ASSIGNED_ALIAS | INT | Unassigned ALIAS. |
4 | _ERR_EXEC_EVENT | INT | Script execution failed. |
5 | _ERR_RETURN | INT | Unexpected RETURN. |
6 | _ERR_LOCAL_VAR_NFOUND | INT | Unknown local variable. |
7 | _ERR_LOCAL_VAR_NOT_RECORD | INT | The local variable must be a structure. |
8 | _ERR_OBJECT_NFOUND | INT | Unknown object. |
9 | _ERR_ARCHIV_NOT_RUNNING | INT | The archive is not running. |
10 | _ERR_TRANS_ABORT | INT | Transaction abort. Synchronous operation is broken. |
_ERR_TRANS_ERROR | INT | Transaction error. Synchronous operation is not started (the process is not running). | |
12 | _ERR_TRANS_IGNORED | INT | Transaction ignored. Synchronous operation is not accepted (e.g. invalid parameters). |
13 | _ERR_EVAL_ERROR | INT | Error during the expression evaluation. |
14 | _ERR_RANGE_ERROR | INT | Limits overrun. |
15 | _ERR_NO_ALIAS | INT | ALIAS is required. |
16 | _ERR_NO_RECORD | INT | The value must be a structure. |
17 | _ERR_RECORD_NO_COMP | INT | Structures are not the same type. |
18 | _ERR_INVALID_OBJ_TYPE | INT | Invalid object type. |
19 | _ERR_VALUE_RANGE | INT | Value out of the range |
20 | _ERR_INVALID_HANDLE | INT | Invalid handle. |
21 | _ERR_LOCAL_MUST_PUBLIC | INT | The local variable must be PUBLIC. |
22 | _ERR_NO_DATA | INT | No data. |
23 | _ERR_MORE_DATA | INT | More data is available. |
24 | _ERR_TIME_OUT | INT | Timeout. |
25 | _ERR_UNKNOWN_REFID* | INT | Unknown graphic object. |
26 | _ERR_INVALID_REFID_TYPE* | INT | Invalid type of the graphic object. |
27 | _ERR_MISSING_RETURN | INT | RETURN or END ProcedureName is missing in the procedure. |
28 | _ERR_SERVER_REQUIRED | INT | Attempt to call a remote procedure of system event, that is not declared as Server Event in the configuration. |
29 | _ERR_PROCEDURE_NOT_FOUND | INT | Attempt to call a remote procedure that does not exist. |
30 | _ERR_INV_NUM_PARAMS | INT | An incorrect number of parameters when calling the procedure. |
31 | _ERR_SET_CONST | INT | Attempt to change a constant value in the place of the input-output parameter. |
32 | _ERR_FILE_ERROR | INT | Error during running the actions: |
33 | _ERR_JAVA_EXCEPTION | INT | Error at calling JAVA RPC procedure. |
34 | _ERR_OBJECT_IS_NOT_IN_ARCHIVE | INT |
|
_ERR_DATABASE_ROWS_LIMIT | INT | Actions DB_READ, DBS_READ, SQL_FETCH, or SQL_SELECT required to read and the database table contained more rows than the limit specified by the parameter Maximum returned rows defined on the Database object. | |
36 | ERR_IS_RECORD | INT | A defined value may not be a structure. |
37 | ERR_DEADLOCK_RPC | INT | Detection of ESL script deadlock when synchronous calling the RPC procedures between the scripts. If the deadlock occurs, the execution of the script will be finished. |
0 | _ACC_NONE | INT | No access |
1 | _ACC_READ | INT | "Read-only" access |
2 | _ACC_CONTROL | INT | "Control" access - value setting |
3 | _ACC_MODIFY | INT | "Modify" access |
_LOG_PRTY_INFO | INT | Information | |
2 | _LOG_PRTY_WARNING | INT | Warning |
3 | _LOG_PRTY_ALARM | INT | Alarm |
4 | _LOG_PRTY_CRITALARM | INT | Critical alarm |
5 | _LOG_PRTY_ERROR | INT | Error |
Row and column of the trigger value change during script start | |||
- | _TRIGGER_ROW | INT | Position of change: row |
- | _TRIGGER_COL | INT | Position of change: column |
Constants for specification of statistical function for the action CALCSTATFUNC and for functions D2_CalcStatFunc and D2_CalcStatFuncArr | |||
1 | _STAT_F_AVG | INT | Arithmetical average |
2 | _STAT_F_WGAVG | INT | Weighted average |
3 | _STAT_F_INTEGRAL | INT | |