Technical data
Diagnostics
23.9 Program Measures for Handling Errors
Programming with STEP 7
508 Manual, 05/2010, A5E02789666-01
23.9.3 Inserting Substitute Values for Error Detection
With certain types of error (for example, a wire break affecting an input signal), you can supply
substitute values for values that are not available due to the error. There are two ways in which you
can supply substitute values:
• You can assign substitute values for configurable output modules using STEP 7. Output
modules that cannot have parameters assigned have the default substitute value 0.
• Using SFC44 RPLVAL, you can program substitute values in error OBs (only for input
modules).
For all load instructions that lead to synchronous errors, you can specify a substitute value for the
accumulator content in the error OB.
Sample Program for Substituting a Value
In the following sample program, a substitute value is made available in SFC44 RPLVAL. The
following figure shows how OB122 is called when the CPU recognizes that an input module is not
reacting.
In this example, the substitute value in the following figure is entered in the program so that the
program can continue to operate with feasible values.
If an input module fails, the processing of the statement L PIB0 produces a synchronous error and
starts OB122. As standard, the load instruction reads in the value 0. With SFC44, however, you
can define any substitute value suitable for the process. The SFC replaces the accumulator content
with the specified substitute value.