Method and system for quickly replacing IO point based on Siemens PLC system
By writing logic control programs and configuring screens in the Siemens PLC system, the rapid replacement of IO points is achieved, solving the production line downtime problem caused by IO point damage and reducing equipment downtime and maintenance costs.
Patent Information
- Application Number
- CN202411381812.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-07
AI Technical Summary
In automated systems, damage to I/O points leads to module replacement and program modification, causing prolonged production line downtime and economic losses.
By writing logic control programs in the Siemens PLC system, embedding standard logic programs into user programs, and configuring screens on the HMI, rapid replacement of IO points can be achieved. Data mapping is performed using the PEEK_BOOL and POKE_BOOL functions to automatically replace damaged points.
It reduced equipment downtime and maintenance costs, avoided significant economic losses, and improved the reliability and efficiency of the production line.
Smart Images

Figure CN119270757A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of PLC system control, and in particular relates to a method and system for quickly replacing IO points based on a Siemens PLC system. Background Art
[0002] In the automation system, due to the harsh factory environment and the limited life of the input and output transistors, the input and output points may burn out or break down after a period of time. When this happens, the entire module needs to be replaced and the engineer needs to be contacted to modify the program, which may cause the production line to stop for a long time and cause certain economic losses. In order to overcome the above technical difficulties, the present invention designs a method for quickly replacing IO points to solve this problem, reducing the economic losses caused by IO point damage in the entire production line. Summary of the invention
[0003] The main technical problem solved by the present invention is to provide a method and system for quickly replacing IO points based on the Siemens PLC system. The system writes its own logic control program, implants the standard logic program into the user program, and prepares the configuration screen on the HMI. When the module or point is damaged at the user end, the operator only needs to change the old point line to the new spare point and perform simple configuration on the HMI to restore the equipment, which greatly reduces the downtime of the equipment and avoids causing major losses to the user; at the same time, it reduces the maintenance cost and the cost of spare parts.
[0004] In order to solve the above technical problems, a technical solution adopted by the present invention is: a method for quickly replacing IO points based on a Siemens PLC system, the method comprising the following steps:
[0005] S1, PLC reads the data of the new input signal and stores it in the variable InPutNewData;
[0006] S2, split InPutNewData into byte address InPutByteNewNo and bit address InPutBitNewNo;
[0007] S3. Use the byte address InPutByteNewNo and the bit address InPutBitNewNo to write the InPutNewData data into the variable Value through the PEEK_BOOL function;
[0008] S4. Write the variable Value into the old address byte address InPutByteOldNo and bit address InPutBitOldNo through the POKE_BOOL function;
[0009] S5, merge the old address byte address InPutByteOldNo and the bit address InPutBitOldNo into one address InPutOldData;
[0010] S6, InPutOldData is mapped to the user-side program;
[0011] S7, map the output signal in the PLC program to OutPutOldData;
[0012] S8, split OutPutOldData into byte address OutPutByteOldNo and bit address OutPutBitOldNo;
[0013] S9, write the OutPutOldData data into the variable Value by using the byte address OutPutByteOldNo and the bit address OutPutBitOldNo through the PEEK_BOOL function;
[0014] S10, write Value into the new address byte address OutPutByteNewNo and bit address OutPutBitNewNo through the POKE_BOOL function;
[0015] S11, merge the new address byte address OutPutByteNewNo and the bit address OutPutBitNewNo into one address OutPutNewData;
[0016] S12, PLC outputs OutPutNewData data.
[0017] Preferably, a system for quickly replacing IO points based on a Siemens PLC system comprises:
[0018] PLC, HMI, remote IO modules and input and output components;
[0019] The input and output points are configured through the HMI. After receiving the new configuration, the PLC automatically replaces the old points with the new ones through calculation.
[0020] The remote IO module collects input signals through sensors and then controls relays through output signals.
[0021] Preferably,
[0022] PLC is set to Siemens S7-1200, S7-1500, S7-300, S7-400;
[0023] The HMI is set to be able to communicate with Siemens PLC;
[0024] The remote IO module is set as an IO module or analog quantity that can communicate with Siemens S7-1200, S7-1500, S7-300, S7-400 PLC via Profinet;
[0025] The input and output components are set to components that can be connected to the system's IO or analog modules.
[0026] Preferably,
[0027] The communication mode of this system is set to Profinet.
[0028] The beneficial effects of the present invention are as follows:
[0029] 1. This system writes its own logic control program, implants the standard logic program into the user program, and prepares the configuration screen on the HMI. When the module or point is damaged at the user end, the operator only needs to change the old point line to the new spare point and perform simple configuration on the HMI to restore the equipment, greatly reducing the downtime of the equipment and avoiding major losses to the user.
[0030] 2. Reduce maintenance costs and spare parts costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a system schematic diagram of the present invention;
[0032] Figure 2 It is a logical schematic diagram of the present invention. DETAILED DESCRIPTION
[0033] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0034] Example:
[0035] like Figure 1 Build a hardware control system, PLC (Siemens S7-1200, S7-1500, S7-300, S7-400), HMI (able to communicate with Siemens PLC system), remote IO module (Siemens module or IO module that supports Siemens PLC), input and output components (compatible with the above modules), and communication method (Profinet or Profibus).
[0036] like Figure 2 The inverter is controlled by logic program as shown below:
[0037] The working process HMI configuration interface designed by the present invention is as follows:
[0038]
[0039] The PLC program logic is as follows:
[0040] PLC reads the data of the new input signal and stores it in InPutNewData.
[0041] Split InPutNewData into the byte address InPutByteNewNo and the bit address InPutBitNewNo.
[0042] The InPutNewData data is written to the variable Value using the byte address InPutByteNewNo and the bit address InPutBitNewNo via the PEEK_BOOL function.
[0043] Use the POKE_BOOL function to write Value to the old address byte address InPutByteOldNo and the bit address InPutBitOldNo.
[0044] The old address byte address InPutByteOldNo and the bit address InPutBitOldNo are combined into one address InPutOldData.
[0045] InPutOldData can be mapped to the user-side program for use, thus achieving the purpose of quickly changing the input point.
[0046] Map the output signals in the PLC program to OutPutOldData.
[0047] Split OutPutOldData into the byte address OutPutByteOldNo and the bit address OutPutBitOldNo.
[0048] Use the PEEK_BOOL function to write the OutPutOldData data into the variable Value using the byte address OutPutByteOldNo and the bit address OutPutBitOldNo
[0049] Use the POKE_BOOL function to write Value to the new address byte address OutPutByteNewNo and bit address OutPutBitNewNo.
[0050] The new address byte address OutPutByteNewNo and the bit address OutPutBitNewNo are combined into one address OutPutNewData.
[0051] The PLC outputs the OutPutNewData data, thereby achieving the purpose of quickly changing the output point.
[0052] Further, a system for quickly replacing IO points based on a Siemens PLC system includes:
[0053] PLC, HMI, remote IO modules and input and output components;
[0054] The input and output points are configured through the HMI. After receiving the new configuration, the PLC automatically replaces the old points with the new ones through calculation.
[0055] The remote IO module collects input signals through sensors and then controls relays through output signals.
[0056] in,
[0057] PLC is set to Siemens S7-1200, S7-1500, S7-300, S7-400;
[0058] The HMI is set to be able to communicate with Siemens PLC;
[0059] The remote IO module is set as an IO module or analog quantity that can communicate with Siemens S7-1200, S7-1500, S7-300, S7-400 PLC via Profinet;
[0060] The input and output components are set to components that can be connected to the system's IO or analog modules.
[0061] The communication mode of this system is set to Profinet.
[0062] The above are only embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for quickly replacing IO points based on Siemens PLC system, characterized in that: The method comprises the following steps: S1, PLC reads the data of the new input signal and stores it in the variable InPutNewData; S2, split InPutNewData into byte address InPutByteNewNo and bit address InPutBitNewNo; S3. Use the byte address InPutByteNewNo and the bit address InPutBitNewNo to write the InPutNewData data into the variable Value through the PEEK_BOOL function; S4. Write the variable Value into the old address byte address InPutByteOldNo and bit address InPutBitOldNo through the POKE_BOOL function; S5, merging the old address byte address InPutByteOldNo and the bit address InPutBitOldNo into one address InPutOldData; S6, InPutOldData is mapped to the user-side program; S7, map the output signal in the PLC program to OutPutOldData; S8, split OutPutOldData into byte address OutPutByteOldNo and bit address OutPutBitOldNo; S9, write the OutPutOldData data into the variable Value by using the byte address OutPutByteOldNo and the bit address OutPutBitOldNo through the PEEK_BOOL function; S10, write Value into the new address byte address OutPutByteNewNo and bit address OutPutBitNewNo through the POKE_BOOL function; S11, merge the new address byte address OutPutByteNewNo and the bit address OutPutBitNewNo into one address OutPutNewData; S12, PLC outputs OutPutNewData data.
2. A system for quickly replacing IO points based on a Siemens PLC system as claimed in claim 1, characterized in that: The system includes: PLC, HMI, remote IO modules and input and output components; The input and output points are configured through the HMI. After receiving the new configuration, the PLC automatically replaces the old points with the new ones through calculation. The remote IO module collects input signals through sensors and then controls relays through output signals.
3. According to claim 2, a system for quickly replacing IO points based on Siemens PLC system is characterized in that: PLC is set to Siemens S7-1200, S7-1500, S7-300, S7-400; The HMI is set to be able to communicate with Siemens PLC; The remote IO module is set as an IO module or analog quantity that can communicate with Siemens S7-1200, S7-1500, S7-300, S7-400 PLC via Profinet; The input and output components are set to components that can be connected to the system's IO or analog modules.
4. A system for quickly replacing IO points based on Siemens PLC system according to claim 3, characterized in that: The communication mode of this system is set to Profinet.