1.19 Insert / Remove Module Interrupt Organization Block (OB83)
Description
The CPU operating system calls OB83 in following situations: • after insertion / removal of a configured module
• after modifications of module parameters under STEP 7 and download of changes to the CPU during RUN
If you have not programmed OB83, the CPU changes to STOP mode
You can disable/delay/enable the insert/remove interrupt OB with the help of SFCs 39 to 42.
Module insertion and removal
Each time a configured module is removed or inserted during the RUN, STOP, and STARTUP modes, an insert/remove interrupt is generated (power supply modules, CPUs, adapter modules and IMs must not be removed in these modes). This interrupt causes an entry in the diagnostic buffer and in the system status list for the CPU involved. The insert/remove OB is also started if the CPU is in the RUN mode. If this OB has not been programmed, the CPU changes to the STOP mode.
Then system polls S7-400 modules in seconds intervals to detect insertion or removal. To enable the CPU to detect the removal and insertion of an S7-400 module, a minimum time interval of two seconds must expire between removal and insertion. This minimum time is slightly higher for other modules. If you remove a configured module in the RUN mode, OB83 is started. Since the existence of modules is only monitored at intervals of one second, an access error may be detected first if the module is accessed directly or when the process image is updated.
If you insert a module in a configured slot in the RUN mode, the operating system checks whether the type of the module inserted corresponds to the recorded configuration. OB83 is then started and parameters are assigned if the module types match.
Special considerations for S7-300
• Central IO devices cannot be inserted and removed with S7-300.
• With respect to distributed IO devices, CPU 318 behaves like an S7-400-CPU. With all other S7-300 CPUs, there is an insert/remove interrupt only for 31x PN/DP CPUs, but then only for PROFINET IO components.
• With IM151/CPU (CPU with ET 200S), there is an insert/remove interrupt only for central IO devices.
1.19 Insert / Remove Module Interrupt Organization Block (OB83)
System Software for S7-300/400 System and Standard Functions Volume 1/2
58 Reference Manual, 05/2010, A5E02789976-01
Reconfiguring modules
You can reassign the parameters to existing modules when you modify your system configuration during runtime (CiR). This reassignment of parameters is performed by transferring the required parameter data records to the modules.
This is the procedure:
1. OB83 will be started (Start event W#16#3367) after you have assigned new parameters to a module under STEP 7 and downloaded this configuration to the CPU in RUN mode. Relevant OB -start information is the logical basic address (OB83_MDL_ADDR) and the module type
(OB83_MDL_TYPE). Module I/O data may be incorrect as of now, which means that no SFC may be busy sending data records to this module.
2. The module parameters are reassigned after OB83 was executed.
3. OB83 will be restarted after the parameters have been assigned (Start event W#16#3267, provided this parameter assignment was successful, or W#16#3968 if failed). The module's I/O data response is identical to their response after an insertion interrupt, that is, currently they may be incorrect. You can now call SFCs again to send data records to the module.
Local Data for OB83
The following table describes the temporary (TEMP) variables for the insert/remove module interrupt OB. The variable names are the default names of OB83.
Variable Type Description
OB83_EV_CLASS BYTE Event class and identifiers:
• B#16#32: End of reassignment of module parameters • B#16#33: Start of reassignment of module parameters • B#16#38: module inserted
• B#16#39: module removed or not responding, or end of parameter assignment
OB83_FLT_ID BYTE Error code: (possible values B#16#51, B#16#54, B#16#55, B#16#56, B#16#58, B#16#61, B#16#63, B#16#64, B#16#65, B#16#66, B#16#67, B#16#68)
OB83_PRIORITY BYTE • Priority class; can be assigned via STEP 7 (hardware configuration)
OB83_OB_NUMBR BYTE OB number (83)
OB83_RESERVED_1 BYTE Identification of module or submodule/interface module
OB83_MDL_TD BYTE Range:
• B#16#54: Peripheral input (PI) • B#16#55: Peripheral output (PQ)
1.19 Insert / Remove Module Interrupt Organization Block (OB83)
Variable Type Description
OB83_MDL_ADDR WORD • Central or distributed PROFIBUS DP: Logical base address of the module affected. If it is a mixed module, it is the smallest logical address used in the module. If the I and O addresses in the mixed block are equal, the logical base address is the one that receives the event identifier. • Distributed PROFINET IO: Logical base address of the
module/submodule
OB83_RACK_NUM WORD • If OB83_RESERVED_1 =B#16#A0: number of submodule/interface submodule (low byte) • If OB83_RESERVED_1 = B#16#C4:
- central: rack number
- distributed PROFIBUS DP: number of DP station (low byte) and DP master system ID (high byte)
- distributed PROFINET IO: physical address: identifier bit (bit 15, 1 = PROFINET IO), IO system ID (bits 11 to 14) and device number (bits 0 to 10)
OB83_MDL_TYPE WORD • Central or distributed PROFIBUS DP: Module type of affected module (X: irrelevant to the user): - W#16#X5XX: analog module - W#16#X8XX: function module - W#16#XCXX: CP
- W#16#XFXX: digital module • Distributed PROFINET IO
- W#16#8101: module type of the inserted module is the same as the module type of the removed module - W#16#8102: module type of the inserted module is not
the same as the module type of the removed module OB83_DATE_TIME DATE_AND_TIME DATE_AND_TIME of day when the OB was called
1.19 Insert / Remove Module Interrupt Organization Block (OB83)
System Software for S7-300/400 System and Standard Functions Volume 1/2
60 Reference Manual, 05/2010, A5E02789976-01
The following table shows the event that started OB83:
OB83_EV_CLASS OB83_FLT_ID Meaning
B#16#39 B#16#51 PROFINET IO module removed B#16#39 B#16#54 PROFINET IO submodule removed
B#16#38 B#16#54 PROFINET IO submodule inserted and matches configured submodule
B#16#38 B#16#55 PROFINET IO submodule inserted, but does not match configured submodule
B#16#38 B#16#56 PROFINET IO submodule inserted, but error with module parameters B#16#38 B#16#58 PROFINET IO submodule, access error corrected
B#16#39 B#16#61 Module removed or not responding OB83_MDL_TYPE: Actual module type B#16#38 B#16#61 Module inserted. Module type OK
OB83_MDL_TYPE: Actual module type B#16#38 B#16#63 Module inserted but incorrect module type
OB83_MDL_TYPE: Actual module type
B#16#38 B#16#64 Module inserted but problem (module ID cannot be read) OB83_MDL_TYPE: Configured module type
B#16#38 B#16#65 Module inserted but error in module parameter assignment OB83_MDL_TYPE: Actual module type
B#16#39 B#16#66 Module not responding, load voltage error
B#16#38 B#16#66 Module responds again, load voltage error corrected B#16#33 B#16#67 Start of module reconfiguration
B#16#32 B#16#67 End of module reconfiguration
B#16#39 B#16#68 Module reconfiguration terminated with error
Note
If you are using a DPV1- or PROFINET-capable CPU you can obtain additional information on the interrupt with the help of SFB54 "RALRM" which exceeds the start information of the OB. This also applies when you operate the DP master in S7 compatible mode.