Error Handling Organization Block
(1) Error handling overview
SIMATIC S7-1500 PLC has strong error (or fault) detection and handling capabilities, which refers to functional errors or programming errors within the PLC, rather than failures of external devices. After the CPU detects an error, the operating system calls the corresponding organization block, and the user can program in the organization block to take appropriate measures for the error that occurred. For most errors, if the organization block is not programmed, the CPU will enter STOP mode when an error occurs.
(2) Incorrect classification
There are two basic types of errors that are detected by the S7 CPU and can be handled by the user via organization blocks.
① Asynchronous errors are errors that are closely related to the PLC hardware or operating system, have nothing to do with program execution, and have serious consequences. Asynchronous error OBs have the highest priority and other OBs cannot interrupt them. If multiple asynchronous error OBs of the same priority appear at the same time, they will be processed in the order they appear.
The system program can detect the following errors: incorrect CPU functions, errors in the execution of the system program, errors in the user program, and errors in the I/O. Depending on the type of error, the CPU is set to enter STOP mode or call an error handling organization block (OB).
When the CPU detects an error, it calls the appropriate organization block, as shown in Figure 1. If there is no corresponding error handling OB, the CPU will enter STOP mode. The user can write a program in the error handling OB to handle this error in order to reduce or eliminate the impact of the error.
Figure 1
To prevent the CPU from shutting down when a certain error occurs, you can create a corresponding empty organization block in the CPU. Users can use the information provided by the variable declaration table in the OB to determine the type of error.
② Synchronous errors (OB121 and OB122) are errors related to program execution. The priority of their OBs is the same as the priority of the block that was interrupted when the error occurred, that is, the program in the synchronous error OB can access the contents of the accumulator and status register when the block was interrupted. After processing the error, the processing result can be returned to the interrupted block.
Previous article:What is the difference between F-type PLC data types and standard PLC data types (UDT)?
Next article:In-depth discussion of the relationship and role of servo motors and machine tools
Recommended ReadingLatest update time:2024-11-16 09:45
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Rawpixel RVB2601 development board trial experience] 4. General hardware timer test
- Ask a question about Verilog
- Share MODBUS examples based on MSP430
- EEWORLD University Hall--Overview of Hall Position Sensor Applications
- Qorvo has produced the ACTIVECiPS series of modular power PMICs. Will you use them?
- CircuitPython 5.0.0 released
- dspPI controller program problem
- MSP430F5529 Beginner's Guide
- Canaan's K510 development board is now on the forum. Let's warm it up first and post it later.
- EEWORLD University Hall----Live Replay: Fujitsu FRAM's authenticity verification solution without encryption algorithm (spectrum) is a security innovation and the world's first new verification method