6.10 Synchronous Interrupts
6.10.1 OB 121 - PROG_ERR - Programming Error
The operating system of the CPU calls OB 121 whenever an event occurs that is caused
by an error related to the processing of the program. If OB 121 is not programmed, the
CPU changes to STOP. For example, if your program calls a block that has not been
loaded on the CPU, OB 121 is called.
OB 121 is executed in the same priority class as the interrupted block. So you have read/
write access to the registers of the interrupted block.
The CPU provides the following SFCs for masking and unmasking start events for OB
121 during the execution of your program:
n SFC 36 MSK_FLT masks specific error codes.
n SFC 37 DMSK_FLT unmasks the error codes that were masked by SFC 36.
n SFC 38 READ_ERR reads the error register.
The following table describes the start information of the OB 121 with default names of
the variables and its data types:
Variable Data type Description
OB121_EV_CLASS BYTE Event class and identifiers: 25h
OB121_SW_FLT BYTE Error code
OB121_PRIORITY BYTE Priority class:
priority class of the OB in which the error occurred.
OB121_OB_NUMBR BYTE OB number (121)
OB121_BLK_TYPE BYTE Type of block where the error occurred
88h: OB, 8Ah: DB, 8Ch: FC, 8Eh: FB
OB121_RESEVED_1 BYTE reserved (Data area and access type)
OB121_FLT_REG WORD Source of the error (depends on error code).
For example:
n Register where the conversation error occurred
n Incorrect address (read/write error)
n Incorrect timer/counter/block number
n Incorrect memory area
OB121_BLK_NUM WORD Number of the block with command that caused the error.
OB121_PRG_ADDR WORD Relative address of the command that caused the error.
OB121_DATE_TIME DATE_AND_TIME Date and time of day when the OB was called.
Information to access the local data can be found at the description of the OB 1.
The variables dependent on the error code have the following meaning:
Description
Masking of start events
Local data
Error codes
VIPA SPEED7
Organization Blocks
Synchronous Interrupts > OB 121 - PROG_ERR - Programming Error
HB00 | OPL_SP7 | Operation list | en | 18-30 98