@CDB_IER#
To avoid CADiNP error messages reaching the end of the record, a special condition can be used.
A predefined CADiNP variable
#CDB_IER
can be used.With every new
@access
, the variable gets a new value, as is:0 = all ok, value exists
1 = record could be read, but length is not correct (see description to
#CDB_LEN
)2 = end of record reached
3 = data (KWH/KWL) does not exist or does not contain any values (e.g. load-case not defined)
Example: create list of load cases, #CDB_IER =3
in case load case not existing
LET#CDB_IER 0
LET#LF 0
LOOP 999
LET#LF #LF+1
@KEY LC_CTRL #LF
IF #cdb_ier<2
LET#RTEX LIT(@RTEX)
TXA #(#LF,6.0) #RTEX
ENDIF
ENDLOOP