SIMATIC S7-1500 PLC Hardware Interrupt Organization Block and Its Application Introduction

Publisher:BlossomJoyLatest update time:2024-06-18 Source: elecfansKeywords:SIMATIC  S7-1500  PLC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Hardware interrupt organization block and its application

Hardware interrupt organization blocks (such as OB40) are used to quickly respond to signal changes of signal modules (SM), communication processors (CP) and function modules (FM).


After the hardware interrupt is triggered by the module, the operating system will automatically identify which slot of the module and which channel in the module generated the hardware interrupt. After the hardware interrupt OB is executed, a channel confirmation signal will be sent.

If an interrupt event is being processed and the same interrupt event occurs in the same module and the same channel, the new interrupt event will be lost.

If an interrupt event occurs in other channels or other modules in the same module while an interrupt signal is being processed, the temporarily stored interrupt will be processed after the currently activated hardware interrupt is executed.

The following example illustrates how to use the hardware interrupt organization block.

[Example] Write a command to record the number of times the user uses the 10.0 button, making it a simple "black box".

[Solution] ① Add organization block OB40. In the project tree of the TIA Portal project view, double-click "Add new block" to pop up the interface shown in Figure 1. Select the "Organization block" and "Hardware interrupt" options, and click the "OK" button to add the OB40 organization block.

d99b8822-3f6a-11ee-ac96-dac502259ad0.png

Figure 1

② Select the hardware module "DI16×24VDC HF", click the "Properties" tab, as shown in Figure 2, select "Channel 0", enable rising edge detection, and select the hardware interrupt organization block as "Hardware interrupt".

da0aff9a-3f6a-11ee-ac96-dac502259ad0.png

Figure 2

③ Write a program. Write a program in the organization block OB40 as shown in Figure 3. Each time the button is pressed, the program in OB40 is called once, and the value in MW10 is increased by 1, which records the number of times the button is used.

da40b0b8-3f6a-11ee-ac96-dac502259ad0.png

Figure 3


Keywords:SIMATIC  S7-1500  PLC Reference address:SIMATIC S7-1500 PLC Hardware Interrupt Organization Block and Its Application Introduction

Previous article:What is the Profinet interface communication protocol?
Next article:Diagram of a circuit with two motors running in cycles

Recommended ReadingLatest update time:2024-11-16 13:47

The difference and connection method between PLC ladder diagram and relay contactor circuit diagram
The PLC ladder diagram is a circuit diagram used to program a programmable logic controller (PLC). It is mainly a logical operation sequence diagram of a control system based on logic functions. It uses graphical symbols to represent electrical components. Each line represents a logical relationship. Through the com
[Embedded]
PLC instruction knowledge popularization
1. Contact and coil instructions Programming principles of PLC ladder diagram language 1. The ladder diagram consists of multiple rungs. Each coil can constitute a rung. Each rung has multiple branches, and each rung represents a logic equation. 2. The relays, contacts and coils in the ladder diagram
[Embedded]
PLC instruction knowledge popularization
8 common error types when PLC presents abnormal alarm
With the continuous development of science and technology, mainstream PLCs now have self-diagnosis functions. However, the skill of PLC repair lies in making full use of this function for analysis and then accurately locating the problem. Therefore, we have sorted out 8 common error types that PLC repair personnel n
[Embedded]
A brief discussion on the method of controlling the frequency converter by Mitsubishi FX series PLC communication method
This article introduces a very simple method of controlling the frequency converter by Mitsubishi FX series PLC communication: it only requires installing an RS-485 communication board or hanging an RS-485 communication module on the PLC host; embedding a "function expansion storage box" costing only a few hundred y
[Embedded]
A brief discussion on the method of controlling the frequency converter by Mitsubishi FX series PLC communication method
How do multiple PLCs exchange signals?
A common concept in industrial control systems: hard-wired exchange of signals and communication between different devices. In some large-scale smart factories, one or more large PLCs are usually used to form the processing core. All important equipment needs to be controlled by this unified core. The advantage
[Embedded]
How do multiple PLCs exchange signals?
Which one has higher technology content, PLC or DCS
The decision between a programmable logic controller (PLC) and a distributed control system (DCS) depends on the specific situation, because different applications have different requirements for the control system. Let's take a look. PLC 1. From switch quantity control to sequence control and transp
[Embedded]
Which one has higher technology content, PLC or DCS
Omron PLC to Ethernet communicates with Easy Control monitoring software ModbusTCP via CHNet-CP
Omron CP series PLC converts to Ethernet and communicates with the easy-to-control monitoring software ModbusTCP via CHNet-CP Easy-control INSPEC software connects to Omron CP series PLC (CP1E, CP1L, CP1H, etc.) via Ethernet, and Xingda Easy-control CHNet-CP communication module provides Ethernet communication
[Embedded]
Omron PLC to Ethernet communicates with Easy Control monitoring software ModbusTCP via CHNet-CP
Specific application of Modbus485 to profinet gateway to connect servo spindle drive and PLC
The PN controller communicates with the INVT server through the Kaijiang intelligent Modbus485 to profinet gateway. This communication method greatly simplifies the control process in the industrial automation system. This case is a configuration case of connecting the INVT DriveServo200 series servo spindle driver
[Embedded]
Specific application of Modbus485 to profinet gateway to connect servo spindle drive and PLC
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号