Chapter 2 C Language Reference
© National Instruments Corporation 2-7 AutoCode Reference
Two error functions are provided, fatalerr( ) and error( ). The
fatalerr( ) function reports exception conditions detected by the
functions in the sa_utils.c file. error( ) reports conditions detected
by the generated code during execution. Not all reported conditions are
errors. These functions can be invoked for deactivating all necessary
functions and then passing an alarm to the external environment or for
initiating recovery action. You can choose either to return from an error
function or to halt the machine.
fatalerr( ): Stand-Alone Utilities Detected Errors Several error conditions are trapped in sa_utils.c by default, but you
can expand this capability in your own versions of the program, detecting
your own error conditions and adding your own messages. The ERROR
value that is returned is evaluated by a C language switch-case statement.
Any RT_INTEGER value can be used for an error indication, except that the
value of –1 is reserved for use in the scheduler.
The following are generated messages displayed in the default version of
the sa_utils.c file. Most of these messages pertain to the processing of
the input and output files for execution of generated code.
INPUT FILE IS NOT IN Xmath {matrixx,ascii} FORMAT
Save the file in MATRIXx ASCII format from Xmath, then try again.
INPUT FILE IS NOT V7.0 OR LATER
The input data file was generated using an obsolete version of MATRIXx.
Save the file in MATRIXx ASCII format from Xmath, then try again.
INPUT FILE CONTAINS MORE THAN TWO ARRAYS
INPUT TIME VECTOR NOT ONE COLUMN
INPUT U DIMENSION NOT (TIME x NUMBER OF INPUTS)
The following messages indicate a bad input file.
INPUT TIME VECTOR TOO LARGE
INPUT U ARRAY TOO LARGE FOR AVAILABLE STORAGE
OUTPUT STORAGE EXCEEDS THE AVAILABLE STORAGE
The following messages indicate that the size of the input file has exceeded
one or more of the storage allocation size limits established by
sa_utils.c. These limits are #defined at the very beginning of the
sa_utils.c header, just after the #include header statements. Refer to