Technical data

Table Of Contents
Copy and Block Functions
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01
3-13
3.7 Compressing the User Memory with SFC 25
"COMPRESS"
Gaps in Memory
Gaps can occur in the load memory and in the work memory if data blocks are
deleted and reloaded several times. These gaps reduce the effective memory area.
Description
With SFC 25 "COMPRESS," you start compression of the RAM section of both the
load memory and the work memory. The compression function is the same as
when started externally in the RUN-P mode (mode selector setting).
If compression was started externally and is still active, the SFC 25 call will result in
an error message.
Note
Data blocks with a length greater than 1000 bytes are not shifted with SFC 25
"COMPRESS." This means that gaps may still remain in the work memory after
compression.
Parameter Declaration Data Type Memory Area Description
RET_VAL OUTPUT INT I, Q, M, D, L Error information
BUSY OUTPUT BOOL I, Q, M, D, L Indicates whether the compression
function started by an SFC 25 call is still
active. (1 means active.)
DONE OUTPUT BOOL I, Q, M, D, L Indicates whether the compression
function started by SFC 25 was completed
successfully. (1 means completed
successfully.)
Checking the Compression Function
If SFC 25 "COMPRESS" is called once, the compression function is started. You
cannot, however, check whether the memory was successfully compressed.
If you want to check the compression function, follow the steps outlined below:
Call SFC 25 cyclically. First evaluate the parameter RET_VAL after every call.
Provided that its value is 0, the parameters BUSY and DONE can be evaluated. If
BUSY = 1 and DONE = 0, this indicates that the compression function is still active.
When BUSY changes to value 0 and DONE to the value 1, this indicates that the
compression function was completed successfully. If SFC 25 is called again
afterwards, the compression function is started again.