Page tree
Skip to end of metadata
Go to start of metadata

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.

ValueGroup of local variablesValue typeMeaning
QUERY action
0_Q_YESINTPositive response to an action.
1_Q_NOINTNegative response to an action.
2_Q_TIMEOUTINTExceeded the maximal wait time on action.
3_Q_DONTKNOWINTResponse to an action.
Variables describing an error
-_ERR_LINEINTLine, where the error occurred.
-_ERR_NRINTError number.
-
_ERR_NR_TRANS_EXINTExtended error number - list of existing errors.
-_ERR_MSGTEXTError message.
Database opening parameters
1_DB_READINT''Read only'' access to the database.
2_DB_MODIFYINT''Modify'' access to the database.
Parameters from process D2000 HI
-_FROM_HIPALIASIf the script is started from process D2000 HI, then the variable contains the reference to the given process.
-_HIP_PAR_STRTEXTIf the script is started from process D2000 HI, then the variable contains the parameter declared during event linking.
-_HIP_USER_DESCTEXTIf the script is started from process D2000 HI, then the variable contains the name of logged-on user. After logging off the user and then logging on the other one to D2000 HI, this variable is updated.
0
_ERR_NO_ERROR
INTNo error.
1
_ERR_EXPRESSION_STATUS
INTUndefined value.
2
_ERR_EXPRESSION_TYPE
INTInvalid value.
3
_ERR_NO_ASSIGNED_ALIAS
INTUnassigned ALIAS.
4
_ERR_EXEC_EVENT
INTScript execution failed.
5
_ERR_RETURN
INTUnexpected RETURN.
6
_ERR_LOCAL_VAR_NFOUND
INTUnknown local variable.
7
_ERR_LOCAL_VAR_NOT_RECORD
INTLocal variable must be a structure.
8
_ERR_OBJECT_NFOUND
INTUnknown object.
9
_ERR_ARCHIV_NOT_RUNNING
INTThe archive is not running.
10
_ERR_TRANS_ABORT
INTTransaction abort. Synchronous operation is broken.
11
_ERR_TRANS_ERROR
INTTransaction error. Synchronous operation is not started (process is not running).
12
_ERR_TRANS_IGNORED
INTTransaction ignored. Synchronous operation is not accepted (e.g. invalid parameters).
13
_ERR_EVAL_ERROR
INTError during the expression evaluation.
14
_ERR_RANGE_ERROR
INTLimits overrun.
15
_ERR_NO_ALIAS
INTALIAS is required.
16
_ERR_NO_RECORD
INTValue must be a structure.
17
_ERR_RECORD_NO_COMP
INTStructures are not the same type.
18
_ERR_INVALID_OBJ_TYPE
INTInvalid object type.
19
_ERR_VALUE_RANGE
INTValue out of the range
20
_ERR_INVALID_HANDLE
INTInvalid handle.
21
_ERR_LOCAL_MUST_PUBLIC
INTLocal variable must be PUBLIC.
22
_ERR_NO_DATA
INTNo data.
23
_ERR_MORE_DATA
INTMore data available.
24
_ERR_TIME_OUT
INTTimeout.
25
_ERR_UNKNOWN_REFID*
INTUnknown graphic object.
26
_ERR_INVALID_REFID_TYPE*
INTInvalid type of the graphic object.
27
_ERR_MISSING_RETURN
INTRETURN or END ProcedureName is missing in the procedure.
28
_ERR_SERVER_REQUIRED
INTAttempt to call a remote procedure of system event, that is not declared as Server Event in the configuration.
29
_ERR_PROCEDURE_NOT_FOUND
INTAttempt to call a remote procedure that does not exist.
30
_ERR_INV_NUM_PARAMS
INTIncorrect number of parameters when calling the procedure.
31
_ERR_SET_CONST
INTAttempt to change a constant value on the place of input-output parameter.
32
_ERR_FILE_ERROR
INTError during running the actions:
   DB_READ_BLOB - new file creation or modification is disabled
   DB_UPDATE_BLOB - file reading is disabled
   IMPORT_CSV - file reading is disabled


33
_ERR_JAVA_EXCEPTION
INTError at calling JAVA RPC procedure.
Called procedure terminated in exception.
34
_ERR_OBJECT_IS_NOT_IN_ARCHIVE
INT
  • archive manipulation actions enable to specify archived object instead of archive object.
    This condition cannot be verified during saving ESL script therefore this error occurs when the object is not archived during this action.
  • this error can also occur if limits (row) are exceeded in reference to structured archive.
35
_ERR_DATABASE_ROWS_LIMITINT

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.

36ERR_IS_RECORDINTDefined value may not be a structure.
37ERR_DEADLOCK_RPCINTDetection of ESL script deadlock when synchronous calling the RPC procedures between the scripts. If the deadlock occurs, the execution of script will be finished.
0_ACC_NONEINTNo access
1_ACC_READINT"Read only" access
2_ACC_CONTROLINT"Control" access - value setting
3_ACC_MODIFYINT"Modify" access
0
_LOG_PRTY_INFOINTInformation
2_LOG_PRTY_WARNINGINTWarning
3_LOG_PRTY_ALARMINTAlarm
4_LOG_PRTY_CRITALARMINTCritical alarm
5_LOG_PRTY_ERRORINTError
Row and column of the trigger value change during script start
-_TRIGGER_ROWINTPosition of change: row
-_TRIGGER_COLINTPosition of change: column
Constants for specification of statistical function for the action CALCSTATFUNC and for functions D2_CalcStatFunc and D2_CalcStatFuncArr
1_STAT_F_AVGINTArithmetical average
2_STAT_F_WGAVGINTWeighted average
3_STAT_F_INTEGRALINTIntegral
4_STAT_F_SUMINTSum
5_STAT_F_MAXINTMaximum
6_STAT_F_MININTMinimum
7_STAT_F_COUNTINTCount
8_STAT_F_FILTERINTFilter
9_STAT_F_INCREMENTINTIncrement (Compare value is 1.0)
10_STAT_F_DELTAINTDelta (Compare value is 1.0)
11_STAT_F_ECOAVGINTEcoAvg
12_STAT_F_GT_TIMEINTGT Time (>)
13_STAT_F_GE_TIMEINTGE Time (>=)
14_STAT_F_LT_TIMEINTLT Time (<)
15_STAT_F_LE_TIMEINTLE Time (<=)
16_STAT_F_MAXTINTInterval maximum
17_STAT_F_MINTINTInterval minimum
18_STAT_F_NUMPEEKSINTNumber of local maxima
19_STAT_F_SUM_POSITIVEINTSum of positive values
20_STAT_F_SUM_NEGATIVEINTSum of negative values
21_STAT_F_AVG_POSITIVEINTArithmetical average of positive values
22_STAT_F_AVG_NEGATIVEINTArithmetical average of negative values
23_STAT_F_ADDITIONINTSum of increments (Compare value is 1.0)
24_STAT_F_TIMESLICEINTTime slice
25_STAT_F_NUMPITSINTNumber of local minima
27_STAT_F_SAMPLE_DEVINTSample standard deviation
1000_STAT_F_ADDITION_PARAMINTSum of increments
1001_STAT_F_INCREMENT_PARAMINTIncrement
1002_STAT_F_DELTA_PARAMINTDelta
Constants for specification of integral size for the action CALCSTATFUNC and for functions D2_CalcStatFunc and D2_CalcStatFuncArr
1_INTEGRAL_HOURUNITINTHour integral
2_INTEGRAL_MINUNITINTMinute integral
3_INTEGRAL_SECUNITINTSecond integral
Events class for log database. Application in functions %HI_OpenLogDBByMask and %HI_OpenLogDBForObject.
1
_LOGF_ALARMINTAlarms
2_LOGF_SYSTEMINTSystem
4_LOGF_PROCESINTProcesses
8_LOGF_KOMINTKom
16_LOGF_OPERATORINTOperator intervention
32_LOGF_EVENTINTEvents
64_LOGF_LOGONLOGOFFINTLog on / Log off
128_LOGF_DATAEXPORTINTData export
256_LOGF_CHANGEVALUEINTImpulsive value change
512_LOGF_POSTMORTEMDATAINTTime recorder

* Errors may be occurred only in an active picture.

Related pages:

Write a comment…