show the entry list
STEP 7 -- Analyzing error messages -- Diagnosing errors
How do you use the "SIMATIC Diagnostics Tool" (SDT2012) to collect diagnostics and system data?
How do you use the "SIMATIC Diagnostics Tool" (SDT2011) to gather together the diagnostics and system information of multiple computers on one computer?
Information about the topic of "Diagnosing errors"
How can you clear the error message 257:5 in STEP 7?
How can you clear the error message "Abnormal Program Termination"?
What is the meaning of the error codes (xxxx:yyyy) in STEP 7?
How do you clear message 256:26 "An OLE error has occurred"?
How do Diagnostics and Remedy work in STEP 7 when an online connection with the CP5511 is not possible?
What is the remedy for error message 13:76?
Why does the area length error warning appear in STEP 7 V5.5 with indirect addressing or when using FC100 "SWR_START"?
Why does the message "S7tgtopx.exe has caused an error and will be closed" appear?
What is the meaning of the error codes (like W#16#8081) of the return value RET_VAL in STEP 7 V5.5?
Why does the area length error warning appear in STEP 7 V5.5 with indirect addressing or when using FC100 "SWR_START"?
Part number:

Description
The area length error appears if references are made to addresses that do not exist in the STEP 7 program or when parameterizing the block call. The Online Help in STEP 7 gives two reasons for this:

  • The value addressed by the access address is outside or not entirely inside the permissible address area (CPU-specific size).
  • Due to an incorrect address calculation the addressed value is >65535. In the case of indirect addressing, an address value of greater than 65535 might occur through incorrect calculation. This value can no longer be entered correctly in the detail information of the event. Then for S7-300 a 0 is entered and displayed as access address and the calculated value module 65535 for S7-400.

Example 1 (Indirect Addressing)
You have programmed a function block or function with indirect addressing that reads data from a data block (DB20, for example), processes the data and then writes the data to a data block (DB23, for example). If now, when you call the block with the parameterization of the ANY pointer, the address areas of the data blocks called are exceeded, there is an "Area length error when reading" and / or an "Area length error when writing" if the address area of DB20 or DB23 in the example described above is less than the byte length of the ANY pointer parameterized.

Fig. 01 shows the example here of incorrect programming.


Fig. 01

The ANY pointer "P#DB23.DBX0.0 BYTE 30" on the "PointerOutput" parameter of the called function block FB10 points to the addresses DB23.DBX0.0 to DB23.DBX29.7, because the length of the ANY pointer is 30 bytes (repeat factor). The repeat factor identifies the volume of the data type identified for transfer by the parameter type ANY. Here there is an "Area length error when writing", because the DB23 now only has a defined address area of 10 bytes (DB23.DBX0.0 to DB23.DBX9.7).

Remedy

  1. Change the access address so that the addressed value lies entirely in the address area permitted in each case.
  2. Check the defined address area. According to the example above, either the length of the ANY pointer must be reduced by 20 bytes or the length of data block DB23 must be defined as 30 bytes (ARRAY[1..30]) or more.

Example 2 (FC100 "SWR_START")
With the two parameters "DB_A_B_NO_LEN" and "DB_B_A_NO_LEN" of the FC100 "SWR_START" from the software redundancy you enter the number of data bytes used in the data blocks ("DB_A_B_NO" and "DB_B_A_NO"). The number must be equal to or greater than 4 bytes. If, for example, you specify only 2 bytes, this might lead to the cycle time being exceeded by read and write errors. The CPU switches to STOP mode and you get the messages below displayed in the diagnostics buffer:

  • Area length error when reading
  • Area length error when writing

More information about parameterizing FC100 "SWR_START" is available in the manual "Software Redundancy for SIMATIC S7", under "Programmable Logic Controllers S7-300 Module Data" in Entry ID: 1137637.

 Entry ID:23151678   Date:2013-03-25 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Help
Online Help
Guided Tour