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-15
3.8 Transferring a Substitute Value to Accumulator 1 with
SFC 44 "REPL_VAL"
Description
With SFC 44 "REPL_VAL" (replace value), you transfer a value to accumulator 1 of
the priority class that caused the error.
Restriction: Only in Synchronous Error OBs
You can only call SFC 44 "REPL_VAL" in a synchronous error OB (OB121,
OB122).
Example of an Application
If an input module is damaged to such an extent that no more values can be read
from it, then each time the module is accessed, OB 122 is started. Using SFC 44
"REPL_VAL," a suitable value in OB 122 can be transferred to accumulator 1 of the
interrupted priority class so that the program can continue with this substitute
value. The information for selecting the substitute value (for example, the block in
which the error occurred or the address affected) is located in the local variables of
OB 122.
Parameter Declaration Data Type Memory Area Description
VAL INPUT DWORD I, Q, M, D, L, constant Substitute value
RET_VAL OUTPUT INT I, Q, M, D, L If an error occurs while the
function is being executed,
the return value contains an
error code.
Error Information
Error Code (W#16#...) Explanation
0000 No error occurred. A substitute value was entered.
8080 SFC 44 was not called by a synchronous error OB (OB 121, OB 122).
8xyy General error information, see Evaluating Errors with Output Parameter
RET_VAL