Technical data

Table Of Contents
Copy and Block Functions
System Software for S7-300/400 System and Standard Functions - Volume 1/2
3-12
A5E00709327-01
3.6 Testing a Data Block with SFC 24 "TEST_DB"
Description
With SFC 24 "TEST_DB" (test data block), you obtain information about a data
block located in the work memory of the CPU. The SFC queries the number of data
bytes in the selected DB and checks whether or not the DB is read only.
Parameter Declaration Data Type Memory Area Description
DB_NUMBER INPUT
WORD
I, Q, M, D, L,
constant
Number of the DB to be tested
RET_VAL OUTPUT
INT
I, Q, M, D, L Error information
DB_LENGTH OUTPUT WORD I, Q, M, D, L Number of data bytes the selected DB
contains.
WRITE_PROT OUTPUT
BOOL
I, Q, M, D, L Information about the write-protect
identifier of the DB (1 means read only).
Error Information
Error Code (W#16#...) Explanation
0000 No error occurred.
80A1 Error in the input parameter DB_NUMBER: the actual parameter selected
Is 0
Is greater than the max. permissible DB number for the CPU used.
80B1 The DB with the specified number does not exist on the CPU.
80B2 The DB was created using the keyword UNLINKED.
8xyy General error information, see Evaluating Errors with Output Parameter
RET_VAL