EasyManua.ls Logo

Siemens SIMATIC S7 - Error_Message

Siemens SIMATIC S7
82 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SIEMENS AG PRODAVE S7
Toolbox for Data Link PGs/PCs to SIMATIC S7
57
error_message
This function supplies the approprioate error text relating to an error message in
the form of a zero terminated character string. For this purpose the
ERROR.DAT file is read when the function is first called and the texts are
stored in a file.
When transferring error number 0 the file name of the error text file to be
loaded can be transferred in “buffer“. If no valid file name was transferred or a
ZERO pointer was transferred, the ERROR.DAT file is read in the current
directory. Therefore it must be ensured that the ERROR.DAT file exists and is
in the same directory as the program.
The error texts are stored in English. Should you require the error texts in
German, you must rename the ERROR.GER file to ERROR.DAT, and copy
this file into the directory of your application, or load this file explicitly.
.
A maximum of 100 error texts can be stored.
Note:
We recommend calling the error_message function shortly after program start
by means of error_no = 0 to load the ERROR.DAT file. This ensures almost
consistent processing time for further calls of this function.
Structure error text file:
[Error number as ascii hex]:[error text]
e.g.:
0207:data segment cannot be disabled
0302:block too small DW does not exist
...
If there were no errors, the function supplies 0 as the return value.
Return-Value = 1: ERROR.DAT file does not exist or cannot be opened.
Return-Value = 2: Error when reading the ERROR.DAT file.
Return-Value = 3: Incorrect call of the ERROR.DAT error text file.
Return-Value = 4: No error text exists for this error number.
Return-Value = 5: Too many error texts in ERROR.DAT
C-Adapter
int error_message (int no,char * buffer);
Example:

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals