Extended instructions
9.10 Data block control
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
543
The "DELETE_DB" instruction works asynchronously, that is, its execution extends over
multiple calls. You start the interrupt transfer by calling the instruction with REQ = 1.
Output parameter BUSY and bytes 2 and 3 of output parameter RET_VAL show the status of
the job.
The deletion of the data block is complete when output parameter BUSY has the value
FALSE.
The following table shows the parameters of the "DELETE_DB" instruction:
REQ Input BOOL I, Q, M, D, L or constant REQ =1: Request to delete the DB with the num-
ber in parameter DB_NUMBER
I, Q, M, D, L or constant
Number of the DB to be deleted
Error information (see "RET_VAL parameter")
BUSY Output BOOL I, Q, M, D, L BUSY= 1: The process is not yet complete.
You can find additional information on valid data types under "Data types (Page 125)".
First call with REQ = 0: No data transfer active; BUSY has the value "0".
First call with REQ = 1: Data transfer triggered; BUSY has the value "1".
Intermediate call (REQ irrelevant): Data transfer already active; BUSY has the value "1".
80A1 Error in input parameter DB_NUMBER:
• The value at the parameter is "0".
• The value at the parameter is greater than the maximum permitted DB number for the CPU used.
The DB with the specified number does not exist on the CPU.
The DB cannot be deleted because the memory card of the CPU is write-protected.
The DB was not created using "CREATE_DB".
The "Delete a DB" function cannot be executed at this time due to a temporary resource bottleneck.
General error
See also: Common error codes for the Extended instructions (Page 553)
* You can display the error code as either integer or hexadecimal values in the program editor.