Product : ISaGRAF V3.3x
Date : 25-August-1999
Subject : How run time error messages are displayed in the debugger
Keywords: Warning - Error - Message - Debugger - sys_err - isdk_txt
A run time error (warning) is emitted by the target software using
void sys_err(uint16 num, uint16 arg)
Each warning is identified by a number plus an argument
The debugger displays both number and argument with the following
<argument>:<error description or number>
Normally, the number is replaced by a readable string.
This applies to
- standard warnings defined by ICS Triplex ISaGRAF Inc.
- private warnings supported by ISDK_TXT.DLL
Below is the algorithm used to display the error number or string:
if string is defined by ISDK_TXT.DLL for this number
display string provided by ISDK_TXT.DLL
else if it is a standard warning
display standard string
display the error number in decimal: "ERROR nnn"
where nnn is the error number passed to sys_err
The debugger automatically regonize arguments which are valid VAs,
and replace the arg number by the object symbol in this case.
Below is the algorithm used to display the argument:
if argument is valid VA of a declared object
display the object symbol
display the argument in decimal between brackets:
"[nnn]" where nnn is the argument value
Valid VAs are expressed on 16 bit arguments where:
- 4 highest bits are the type (1=boo / 2=ana / 3=tmr / 4=msg ...)
- 12 lowest bits are the range (address)
Variables with range greater than 4095 are not supported.
Type 0 is never used. This implies that, if you set an argument
lower than 4096, you are sure that it will always be displayed as
Copyright © 1996-2009 ICS Triplex ISaGRAF Inc. All rights reserved.