97BPLC concepts
4.1 Execution of the user program
S7-1200 Programmable controller
72
System Manual, 11/2011, A5E02486680-05
Diagnostic error events trigger the execution of OB 82 if it exists. If OB 82 does not exist,
then the CPU ignores the error. No diagnostic error interrupt OB 82 is present when you
create a new project. If desired, you add a diagnostic error interrupt OB 82 to your project by
double-clicking "Add new block" under "Program blocks" in the tree, then choose
"Organization block", and then "Diagnostic error interrupt".
Note
Diagnostic errors for multi-channel local analog devices (I/O, RTD, and Thermocouple)
The OB 82 diagnostic error interrupt can report only one channel's diagnostic error at a time.
If two channels of a multi-channel device have an error, then the second error only triggers
OB 82 under the following conditions: the first channel error clears, the execution of OB 82
triggered by the first error is complete, and the second error still exists.
OB 82 includes startup information that helps you determine whether the event is due to the
occurrence or removal of an error, and the device and channel which reported the error. You
can program instructions inside OB 82 to examine these startup values and to take
appropriate action.
Table 4- 4
Startup information for OB 82
Input
Data type
Description
IOstate
WORD
IO state of the device:
Bit 0 = 1 if the configuration is correct, and = 0 if the configuration is
no longer correct.
Bit 4 = 1 if an error is present (such as a wire break). (Bit 4 = 0 if
there is no error.)
Bit 5 = 1 if the configuration is not correct, and = 0 if the configuration
is correct again.
Bit 6 = 1 if an I/O access error has occurred. Refer to laddr for the
hardware identifier of the I/O with the access error. (Bit 6 = 0 if there
is no error.)
laddr
HW_ANY
Hardware identifier of the device or functional unit that reported the
error
1
channel
UINT
Channel number
multierror
BOOL
TRUE if more than one error is present
1
The laddr input contains the hardware identifier of the device or functional unit which returned the error. The hardware
identifier is assigned automatically when components are inserted in the device or network view and appears in the
Constants tab of PLC tags. A name is also assigned automatically for the hardware identifier. These entries in the
Constants tab of the PLC tags cannot be changed.