System Software for S7-300/400 System and Standard Functions Volume 1/2
62 Reference Manual, 05/2010, A5E02789976-01
1.21 Priority Class Error Organization Block (OB85)
Description
The operating system of the CPU calls OB85 whenever one of the following events occurs:
• Start event for an OB that has not been loaded (except OB80. OB81, OB82, OB83 and OB86). • Error when the operating system accesses a module.
• I/O access error during update of the process image by the system (if the OB85 call was not suppressed due to the configuration).
Note
If OB85 has not been programmed, the CPU changes to STOP mode when one of these events is detected.
You can disable or delay and re-enable the priority class error OB using SFCs 39 to 42.
Local Data for the Priority Class Error OB
The following table describes the temporary (TEMP) variables for the priority class error OB. The variable names are the default names of OB85.
Variable Type Description
OB85_EV_CLASS BYTE Event class and identifiers: B#16#35
B#16#38 (only with error codes B#16#B3 and B#16#B4) B#16#39 (only with error codes B#16#B1, B#16#B2, B#16#B3 and B#16#B4)
OB85_FLT_ID BYTE Error code (possible values: B#16#A1, B#16#A2, B#16#A3, B#16#A4, B#16#B1, B#16#B2, B#16#B3, B#16#B4)) OB85_PRIORITY BYTE • Priority class; can be assigned via STEP 7 (hardware
configuration) OB85_OB_NUMBR BYTE OB number (85)
OB85_RESERVED_1 BYTE Reserved
OB85_RESERVED_2 BYTE Reserved
OB85_RESERVED_3 INT Reserved
OB85_ERR_EV_CLASS BYTE Class of the event that caused the error OB85_ERR_EV_NUM BYTE Number of the event that caused the error
OB85_OB_PRIOR BYTE Priority class of the OB that was active when the error occurred (only with certain error codes, for more detailed information, see below)
OB85_OB_NUM BYTE Number of the OB that was active when the error occurred (only with certain error codes, for more detailed information, see below)
1.21 Priority Class Error Organization Block (OB85)
If you want to program OB85 dependent on the possible error codes, we recommend that you organize the local variables as follows:
Variable Type OB85_EV_CLASS BYTE OB85_FLT_ID BYTE OB85_PRIORITY BYTE OB85_OB_NUMBR BYTE OB85_DKZ23 BYTE OB85_RESERVED_2 BYTE OB85_Z1 WORD OB85_Z23 DWORD OB85_DATE_TIME DATE_AND_TIME
The following table shows the event that started OB85 and how the variables dependent on the error code are occupied:
OB85_EV_CLASS OB85_FLT_ID Meaning
B#16#35 B#16#A1 As a result of your configuration created with STEP 7, your program or the operating system creates a start event for an OB that is not loaded on the CPU.
• OB85_Z1: The respective local variable of the called OB which is determined by OB85_Z23.
• OB85_Z23:
- High word: Class and number of the event causing the OB call - Low word, high byte: Program level and OB active at the time of
error
Low word, low byte: active OB
B#16#35 B#16#A2 As a result of your configuration created with STEP 7, your program or the operating system creates a start event for an OB that is not loaded on the CPU.
OB85_Z1 and OB85_Z23 as for OB85_FLT_ID=B#16#A1 B#16#35 B#16#A3 Error when the operating system accesses a module
• OB85_Z1: Error ID of the operating system - High byte: 1=integrated function, 2=IEC-Timer
- Low byte: 0=no error resolution, 1=block not loaded, 2=area length error, 3=write-protect error
• OB85_Z23:
- High word: Block number
- Low word: Relative address of the MC7 command causing the error. The block type must be taken from OB85_DKZ23 (B#16#88: OB, B#16#8C: FC, B#16#8E: FB, B#16#8A: DB). B#16#35 B#16#A4 PROFINET Interface DB cannot be addressed
1.21 Priority Class Error Organization Block (OB85)
System Software for S7-300/400 System and Standard Functions Volume 1/2
64 Reference Manual, 05/2010, A5E02789976-01
OB85_EV_CLASS OB85_FLT_ID Meaning
B#16#39 B#16#B1 I/O access error when updating the process image of the inputs • OB85_DKZ23: ID of the type of process image transfer during which
the I/O access error has occurred - B#16#10: Byte access - B#16#20: Word access - B#16#30: DWord access
- B#16#57: Transmitting a configured consistency range • OB85_Z1: Reserved for internal use by the CPU: logical base
address of the module
If OB85_RESERVED_2 has the value B#16#76, OB85_Z1 receives the return value of the affected SFC (SFC 14, 15, 26 or 27). • OB85_Z23:
- Byte 0: Part process image no.
- Byte 1: Irrelevant, if OB85_DKZ23=B#16#10, 20 or 30; Length of the consistency range in bytes, if OB85_DKZ23=B#16#57 - Bytes 2 and 3: The I/O address causing the PAE, if
OB85_DKZ23=B#16#10, 20 or 30;
Logical start address of the consistency range, if OB85_DKZ23=B#16#57
B#16#39 B#16#B2 I/O access error when transferring the output process image to the output modules
OB85_DKZ23, OB85_Z1 and OB85_Z23 as for OB85_FLT_ID=B#16#B1 You obtain the error codes B#16#B1 and B#16#B2 if you have configured the repeated OB85 call of I/O access errors for the system process image table update.
1.21 Priority Class Error Organization Block (OB85)
OB85_EV_CLASS OB85_FLT_ID Meaning
B#16#39/B#16#38 B#16#B3 I/O access error when updating the process image of the inputs, incoming/outgoing event
• OB85_DKZ23: ID of the type of process image transfer during which the I/O access error has occurred
- B#16#10: Byte access - B#16#20: Word access - B#16#30: DWord access
- B#16#57: Transmitting a configured consistency range • OB85_Z1: Reserved for internal use by the CPU: logical base
address of the module
If OB85_RESERVED_2 has the value B#16#76, OB85_Z1 receives the return value of the affected SFC (SFC 14, 15, 26 or 27). • OB85_Z23:
- Byte 0: Part process image no.
- Byte 1: Irrelevant, if OB85_DKZ23=B#16#10, 20 or 30; Length of the consistency range in bytes, if OB85_DKZ23=B#16#57 - Bytes 2 and 3: The I/O address causing the PAE, if
OB85_DKZ23=B#16#10, 20 or 30;
Logical start address of the consistency range, if OB85_DKZ23=B#16#57
B#16#39/B#16#38 B#16#B4 I/O access error when updating the process image of the outputs, incoming/outgoing event
OB85_DKZ23, OB85_Z1, OB85_Z23 as for OB85_FLT_ID=B#16#B3 You obtain the error codes B#16#B3 and B#16#B4 if you configured the OB85 call of I/O access errors entering and outgoing event for process image table updating by the system. After a cold or warm restart, all access to non-existing inputs and outputs will be reported as I/O access errors during the next process image table updating.