A PLC debugging point-to-point and automatic programming method based on mobile terminal

CN122569893APending Publication Date: 2026-08-14尹太丰
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-19
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0024]本申请提供一种基于移动终端的PLC调试对点与自动编程方法,旨在解决现有技术中调试设备便携性差、点位信息查阅效率低、调试记录分散难以共享、远程安全控制不足、操作过程缺乏追溯、信息变更传递不及时以及PLC编程自动化程度低且跨平台兼容性差的问题

Benefits of technology

[0069]本申请基于对现有技术问题的进一步分析和研究,认识到现有技术中存在调试设备便携性差、点位信息查阅效率低、调试记录分散难以共享、远程安全控制不足、操作过程缺乏追溯、信息变更传递不及时以及PLC编程自动化程度低且跨平台兼容性差,通过操作移动终端接收后台编辑软件基于表格数据文件编译生成的配置数据包并渲染可视化调试界面,实现点位信息的结构化呈现与快速查阅;通过执行浮动对点逻辑,在检测到信号状态变化时自动置顶或高亮显示对应信号数据,使调试人员无需手动翻页即可瞬间定位变化点位,大幅提升点位核对效率;通过响应用户输入指令生成控制信号并发送至PLC,实现随身远程安全控制;同时生成本地操作日志并存储为不可篡改的追溯报告,确保操作过程可追溯、责任可界定;通过接收用户确认的变量参数供后台编辑软件检索预设的PLC通用编程语言逻辑模板并生成适配PLC的可执行代码,实现了跨PLC平台的自动化编程,降低人工错误率,达到了提高现场调试效率与安全性、实现操作全流程可追溯、以及提升PLC编程自动化程度与跨平台兼容性的有益效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122569893A_ABST
    Figure CN122569893A_ABST
Patent Text Reader

Abstract

This application discloses a PLC debugging point-to-point and automatic programming method based on a mobile terminal. The method includes: receiving a configuration data package compiled by background editing software based on a table data file, and rendering a visual debugging interface according to the mapping relationship within it; obtaining real-time signal status feedback from the PLC through the main device terminal, executing floating point-to-point logic, and automatically highlighting or pinning the corresponding signal data on the interface when a signal status change is detected; generating control signals in response to user input commands and sending them to the PLC, while simultaneously generating a local operation log and storing it as an unalterable traceability report; receiving user-confirmed variable parameters for the background editing software to retrieve preset PLC general programming language logic templates and generate executable code adapted to the PLC. This invention improves on-site debugging efficiency and safety, achieves full-process traceability of operation, and enhances the automation level and cross-platform compatibility of PLC programming.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial automation control technology, and in particular to a PLC debugging point-to-point and automatic programming method based on a mobile terminal. Background Technology

[0002] In the field of industrial automation control, on-site commissioning and calibration of PLC (Programmable Logic Controller) systems are crucial steps before project delivery. Common commissioning methods currently include:

[0003] Field operation based on HMI touch screen: By installing an HMI touch screen near the equipment, commissioning personnel can monitor and operate the PLC points.

[0004] Debugging based on wired programming software: Debuggers carry laptops, connect them to the PLC via programming cables, and use the programming software provided by the manufacturer (such as Siemens STEP 7, Rockwell Studio 5000, etc.) to monitor points, force outputs, and modify data.

[0005] Verification based on paper drawings and I / O tables: The commissioning personnel hold the printed electrical schematic diagram or I / O allocation table and check point by point whether the on-site wiring is consistent with the addresses in the PLC program.

[0006] Mobile monitoring based on wireless adapters: Some manufacturers provide wireless adapters (such as Siemens WLAN modules) that can transmit PLC data to the operating wireless device embedded in the HMI via WiFi, enabling remote monitoring.

[0007] The above solutions have been widely used in industrial settings and the technology is relatively mature.

[0008] The inventors recognized that although existing technology can complete basic PLC debugging and alignment work, the following prominent problems still exist in actual project execution:

[0009] (1) The contradiction between the portability and functionality of the debugging equipment.

[0010] While HMI touchscreens offer high integration, their programming and configuration are complex. Any modification to the interface or logic requires recompilation and downloading in the background software, resulting in slow response times. This makes them unsuitable for the frequent information changes and rapid response requirements during the initial debugging phase. Furthermore, HMIs are bulky and expensive, and are not very convenient to carry and operate in mobile environments.

[0011] While laptops with programming software are powerful, they are inconvenient to carry, slow to start, and require a programming cable, making them extremely inconvenient to operate in large equipment or distributed control systems.

[0012] (2) The efficiency of checking location information is low.

[0013] During commissioning, personnel need to repeatedly verify the correspondence between the field wiring and the PLC point addresses. Currently, this mainly relies on paper drawings or Excel-formatted I / O tables, which require frequent review and are prone to errors. When an anomaly is detected, multiple personnel are often needed (one person operates the PLC to force output, while another observes the actuator's actions on-site), or personnel frequently travel between the control cabinet and the equipment, severely impacting commissioning efficiency.

[0014] (3) Debugging records are scattered, making it difficult to share information.

[0015] Problems discovered during on-site commissioning (such as wiring errors, missing points, and reversed signals) are usually recorded by the commissioning personnel in their personal notebooks or mobile phone memos. Due to different recording habits, information omissions or misunderstandings are prone to occur during personnel handover, leading to the same problem being repeatedly investigated or overlooked, ultimately causing on-site wiring chaos, recurring problems, and serious delays in project progress.

[0016] (4) Insufficient remote security control measures.

[0017] In the commissioning of large equipment or distributed production lines, emergency stop buttons are typically installed on control cabinets or equipment columns at considerable intervals. When commissioning personnel are working remotely on the equipment, if there are no emergency stop buttons nearby, accidental remote start-up of the equipment (e.g., the control room operator or another commissioning personnel are unaware of someone on site) could lead to a serious safety accident. While existing wireless monitoring solutions can view data, they lack a reliable remote mobile emergency stop control mechanism.

[0018] (5) The operation process lacks traceability.

[0019] During on-site commissioning, it is difficult to determine who performed what operation (such as forced output or value modification) at which point, when, and at which location. Currently, taking the HMI operation screen as an example, the log operation contains too much data category information, lacks filtering function, makes it difficult to distinguish and view relevant operation information, has insufficient convenience for viewing, has an unfriendly display interface, and suffers from data loss. In the event of damage to goods or personal injury, it is impossible to quickly and effectively trace responsibility.

[0020] (6) Information changes are not transmitted in a timely manner.

[0021] During project execution, changes in site conditions often necessitate the addition or modification of I / O points. Currently, such information changes are typically communicated verbally, via email, or instant messaging tools, which is prone to omissions or delays, leading to inconsistencies in data among on-site construction, electrical design, and commissioning, resulting in duplicated work or rework.

[0022] (7) PLC programming has a low degree of automation and is difficult to standardize.

[0023] Currently, PLC programming is still primarily done manually. Even though some manufacturers offer code generation tools, these tools heavily rely on their proprietary software and hardware platforms. Different brands of PLCs have significantly different address systems and instruction sets, making it difficult to reuse a single program across platforms. Furthermore, existing code generation tools can only generate simple variable declarations and basic logic based on I / O tables, and cannot adaptively adjust to incorporate equipment process flows and debugging feedback. Programming efficiency and quality still depend on the engineer's personal experience. Summary of the Invention

[0024] This application provides a PLC debugging point-to-point and automatic programming method based on a mobile terminal, aiming to solve the problems in the prior art such as poor portability of debugging equipment, low efficiency of point information retrieval, scattered debugging records that are difficult to share, insufficient remote safety control, lack of traceability of operation process, untimely transmission of information changes, and low degree of automation in PLC programming and poor cross-platform compatibility.

[0025] Firstly, a method for PLC debugging and automatic programming based on a mobile terminal is provided. This method operates in a system including an operating mobile terminal, a master device terminal, and background editing software. The operating mobile terminal communicates with the master device terminal via wireless or physical connection, and the master device terminal is connected to the PLC via industrial communication. This method is applied to the operating mobile terminal and includes:

[0026] Data Configuration: Receives a configuration data package compiled by the background editing software based on a table data file. The configuration data package contains mapping relationships of device location information, PLC address, data type, and function description; renders a visual debugging interface based on the mapping relationships.

[0027] Dynamic interaction: The real-time signal status feedback from the PLC is obtained through the main device terminal; floating point logic is executed, that is, when a change in the signal status of a specific address is detected, the corresponding signal data is automatically pinned to the top and highlighted on the visual debugging interface;

[0028] Real-time data modification and operation: In response to the user's real-time data modification and operation on the visual debugging interface, operation control signals and safety control signals are generated and sent to the PLC through the main device terminal; at the same time, a local operation log is generated and stored, and the local operation log is used to generate an unalterable traceability report;

[0029] Code generation assistance: Provides multiple data elements to the background editing software, including at least tabular data, PLC data, process data, and program block data, so that the background editing software can retrieve preset PLC general programming language logic templates and generate executable code adapted to the PLC.

[0030] Optionally, in the above scheme, the data configuration step specifically includes permission verification logic:

[0031] Receive the user's login credentials;

[0032] Verify the account permission level corresponding to the login credentials;

[0033] If the account permission level is low, a simplified interface containing only input signals, output signals, and electronic emergency stop controls will be rendered.

[0034] If the account permission level is high, a full-featured interface including input signals, output signals, device operation controls, and electronic emergency stop controls will be rendered.

[0035] Optionally, in the above scheme, the real-time data modification and operation steps also include electronic emergency stop logic:

[0036] The communication link status between the mobile terminal and the main device terminal is monitored in real time and classified into three states: normal, weak signal, and interruption.

[0037] When a communication interruption is detected, the triggered emergency stop command remains valid.

[0038] After communication is restored, the triggered emergency stop command remains in a continuously valid state and is not automatically released when communication is restored; the emergency stop command can only be released by an explicit recovery operation performed by the user on the operating mobile terminal;

[0039] When a weak signal is detected, a weak signal warning is issued, and the emergency stop operation remains effective;

[0040] An emergency stop status record is generated and synchronized to the local operation log.

[0041] Optionally, in the above scheme, the floating point logic in the dynamic interaction step specifically includes:

[0042] Real-time scanning of transition edges in the real-time signal state;

[0043] When a signal is detected to change from the first state to the second state, the corresponding PLC address identifier is obtained;

[0044] On the visual debugging interface, the signal control corresponding to the PLC address identifier is dynamically moved from the default list position to the top of the list at the top of the interface and highlighted.

[0045] Optionally, in the above scheme, the real-time data modification and operation steps also include anti-accidental touch logic:

[0046] In response to the user's triggering of the anti-accidental touch control, the operation signal interaction between the mobile terminal and the main device terminal is temporarily cut off;

[0047] In response to the user's recovery operation, the signal status of the main device terminal is detected, and the current signal status of the main device terminal is synchronized to the operating mobile terminal.

[0048] Optionally, the above solution may also include a problem record sharing step:

[0049] In response to a user's problem recording operation, a local problem record is generated; the local problem record is synchronized to other connected mobile terminals via the main device terminal; problem records from other mobile terminals are received and displayed in the local visual debugging interface.

[0050] Optionally, in the above scheme, the plurality of data elements specifically include:

[0051] Tabular data includes externally imported tabular data and operational data modified after on-site verification;

[0052] PLC data refers to identifiable data variables obtained from the PLC.

[0053] Process data refers to the logical data of the equipment process.

[0054] Program block data consists of pre-programmed template programs for different device types.

[0055] Secondly, a PLC automatic programming method based on tabular data, which is applied to background editing software, includes:

[0056] Data import and recognition: Import tabular data files containing PLC addresses, data types, and function descriptions, and automatically recognize data levels and variable relationships;

[0057] Configuration generation: The identified data is compiled into a configuration data packet that can be recognized by the device terminal, and the configuration data packet is sent to the main device terminal and the operating mobile terminal;

[0058] Automatic code generation: The system acquires multiple data elements provided by the mobile terminal, retrieves a preset PLC general programming language logic template, automatically replaces key fields in the template, and generates executable code adapted to the PLC. The executable code includes a first type of program code for manual debugging and a second type of program code for automatic operation.

[0059] Traceability Management: Real-time recording of operation logs and signal change data to the read-only storage area of ​​the main device terminal, generating an unalterable traceability report.

[0060] Thirdly, a PLC debugging and automatic programming system includes an operating mobile terminal, a main device terminal, and background editing software;

[0061] The background editing software is used to execute the PLC automatic programming method based on tabular data as described above;

[0062] The mobile terminal is used to execute the mobile terminal-based PLC debugging point-to-point and automatic programming method described above.

[0063] The main device terminal is communicatively connected to the operating mobile terminal and the PLC, and is used to forward control signals and real-time signal status between the operating mobile terminal and the PLC, and to store operation logs to the read-only storage area.

[0064] Optionally, in the above scheme, the operating mobile terminal includes a general-purpose mobile device or a dedicated debugging device:

[0065] The operating mobile terminal includes general-purpose mobile devices or dedicated debugging devices:

[0066] If it is a mobile device, it connects to the main device terminal via a wireless network and loads the restricted function set by default;

[0067] If it is a dedicated mobile debugging device, it connects to the main device terminal via a physical interface or wireless network and loads the full set of functions.

[0068] Compared with the prior art, this application has at least the following beneficial effects:

[0069] This application, based on further analysis and research into the problems of existing technologies, recognizes that existing technologies suffer from poor portability of debugging equipment, low efficiency in accessing point information, scattered and difficult-to-share debugging records, insufficient remote safety control, lack of traceability in the operation process, untimely transmission of information changes, and low automation and poor cross-platform compatibility in PLC programming. This application addresses these issues by using a mobile terminal to receive configuration data packages compiled from table data files by background editing software and rendering a visual debugging interface, enabling structured presentation and rapid access to point information. Furthermore, by executing floating point-to-point logic, the application automatically prioritizes or highlights the corresponding signal data when a signal state change is detected, eliminating the need for manual page turning by debugging personnel. Instantly locates changing points, significantly improving point verification efficiency; generates control signals in response to user input commands and sends them to the PLC, enabling remote safety control; simultaneously generates local operation logs and stores them as tamper-proof traceability reports, ensuring traceability and accountability of the operation process; by receiving user-confirmed variable parameters, the backend editing software retrieves preset PLC general programming language logic templates and generates executable code adapted to the PLC, achieving automated programming across PLC platforms, reducing human error rates, and achieving the beneficial effects of improving on-site debugging efficiency and safety, enabling full traceability of the operation process, and enhancing the automation level and cross-platform compatibility of PLC programming. Attached Figure Description

[0070] Figure 1 A schematic diagram illustrating three hardware and software configuration schemes provided in one embodiment of this application;

[0071] Figure 2 Example diagram of a table-type data file provided in one embodiment of this application;

[0072] Figure 3 This is a schematic diagram of a mobile terminal pop-up interface provided in one embodiment of this application;

[0073] Figure 4 A schematic diagram of the main interface of a mobile terminal (point-to-point mode or operation mode) provided in one embodiment of this application;

[0074] Figure 5 This is a schematic diagram of another interface of a mobile terminal (including an electronic emergency stop button) provided in one embodiment of this application.

[0075] Figure 6 A schematic diagram of a problem recording interface provided in one embodiment of this application;

[0076] Figure 7 This is a schematic diagram of an operation log interface provided in one embodiment of this application;

[0077] Figure 8 This is a schematic diagram of the process editing state provided in one embodiment of this application;

[0078] Figure 9 This is a schematic diagram of a program block parameter table provided in one embodiment of this application. Detailed Implementation

[0079] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0080] In the description of this application: unless otherwise stated, the terms "first," "second," "third," etc., are intended to distinguish the objects they refer to and do not have any special meaning in terms of technical connotation (e.g., they should not be construed as an emphasis on importance or order). Expressions such as "comprising," "including," and "having" also mean "not limited to" (certain units, components, materials, steps, etc.).

[0081] In this application, the term "operating mobile terminal" generally refers to a portable electronic device with data processing and human-computer interaction capabilities, such as a smartphone, tablet computer, or industrial handheld terminal; the term "master terminal" generally refers to a hardware device that communicates directly with the PLC and is responsible for data forwarding and storage, such as an embedded gateway or communication adapter.

[0082] It should be noted that the core inventive concept of this application does not rely on a specific communication medium. In practical applications, wireless communication (such as WiFi) is preferred between the operating mobile terminal and the main device terminal, thus providing the debugging personnel with maximum freedom of movement and supporting a safety mechanism that links electronic emergency stop with wireless signal quality. However, in some industrial settings, the use of wireless devices may be prohibited or restricted due to electromagnetic shielding, safety regulations, or frequency band control. In such scenarios, a physical wired connection (such as USB, Ethernet cable, or a dedicated aviation connector) can also be used between the operating mobile terminal and the main device terminal, achieving the same core functions such as data synchronization, signal monitoring, and event logging. Functions that only partially rely on wireless signal quality detection (such as weak signal alerts) will be unsuitable or require adaptive adjustments.

[0083] Therefore, although the embodiments of this application are mostly described using wireless connections as an example, unless otherwise specified, the terms "operating mobile terminal" and "master device terminal" used in the claims should be understood to cover both wireless and wired connection methods, and wireless connection should not be considered a limitation on the scope of protection. Those skilled in the art who choose wired connection to implement the technical solutions of this application based on actual site conditions still fall within the scope of protection of this application.

[0084] In one embodiment, a PLC debugging point-to-point and automatic programming method based on a mobile terminal is provided. This method operates in a system including an operating mobile terminal, a master device terminal, and background editing software. The operating mobile terminal communicates with the master device terminal via a wireless or physical connection, and the master device terminal is connected to the PLC. The method is applied to the operating terminal and includes:

[0085] Data Configuration: Receives a configuration data package compiled by the background editing software based on a table data file. The configuration data package contains mapping relationships of device location information, PLC address, data type, and function description; renders a visual debugging interface based on the mapping relationships.

[0086] Dynamic interaction: The real-time signal status feedback from the PLC is obtained through the main device terminal; floating point logic is executed, that is, when a change in the signal status of a specific address is detected, the corresponding signal data is automatically pinned to the top and highlighted on the visual debugging interface;

[0087] Real-time data modification and operation: In response to the user's real-time data modification and operation on the visual debugging interface, operation control signals and safety control signals are generated and sent to the PLC through the main device terminal; at the same time, a local operation log is generated and stored, and the local operation log is used to generate an unalterable traceability report;

[0088] Code generation assistance: Provides multiple data elements to the background editing software, including at least tabular data, PLC data, process data, and program block data, so that the background editing software can retrieve preset PLC general programming language logic templates and generate executable code adapted to the PLC.

[0089] In one embodiment, the plurality of data elements specifically include:

[0090] Tabular data includes externally imported tabular data and operational data modified after on-site verification;

[0091] PLC data refers to identifiable data variables obtained from the PLC.

[0092] Process data refers to the logical data of the equipment process.

[0093] Program block data consists of pre-programmed template programs for different device types.

[0094] This embodiment provides a PLC debugging point-to-point and automatic programming method based on a mobile terminal. This method operates in a system including an operator mobile terminal, a master device terminal, and background editing software. The operator mobile terminal communicates with the master device terminal via wireless (WIFI) or a physical connection, and the master device terminal connects to the PLC via an industrial communication protocol.

[0095] I. Data configuration steps.

[0096] Data import automatically identifies and configures the region technology, and the background editing software imports tabular data files (see example). Figure 2 This file contains columns B through I. Columns B and C generate the device area level 1 and level 2 directories, respectively. Column D is the function description, column E is the data type (e.g., BOOL, Word), column F is the PLC address, column G is the unit, column H is the display area (signal input / signal output), and column I is the hardware address mapping. The background software identifies the area information in the data and assigns different types of data to different areas. After compilation, it generates a configuration data package, which is downloaded to the main device's wireless terminal. After the wireless mobile terminal establishes a Wi-Fi or physical connection with the main device's wireless terminal, it synchronizes the configuration data package and renders a visual debugging interface based on the mapping relationship (see example). Figures 3 to 5 Users can filter the signal input / output range by clicking on the primary and secondary regions, and double-click on a data block to bring up a pop-up window to view detailed information.

[0097] II. Dynamic Interaction Steps.

[0098] This step implements "floating point-to-point technology." The mobile terminal obtains the real-time signal status feedback from the PLC through the main device terminal. When operating the field device or the operating unit in the device operation area of ​​the operating software causes a change in the signal feedback from the PLC hardware address, the mobile terminal software identifies the changed signal data and automatically moves the changed signal data in the input and output signal areas to the top of the list (highlighted). This function solves the problem of operators having to manually flip through pages to find changed signals when there are many field signals and the interface cannot display them all, enabling commissioning personnel to quickly check whether the device signal status corresponding to the current operation meets the requirements.

[0099] III. Real-time data modification and operation steps.

[0100] This step includes several security-related functions:

[0101] Command control: Responds to user input commands on the visual debugging interface (such as pressing buttons to operate BOOL data or data entry boxes for Word data), generates control signals and sends them to the PLC through the main device terminal to realize remote operation of the equipment.

[0102] Electronic Emergency Stop: The mobile terminal provides an electronic emergency stop button. The software monitors the Wi-Fi connection status in real time, classifying the signal into three levels: weak, medium, and strong. Emergency stop is triggered normally under medium and strong signal conditions; under weak signal conditions, the Wi-Fi icon at the top flashes and a prompt is issued, the emergency stop indicator flashes, but the emergency stop operation remains effective; when the signal is lost or reconnected, the triggered emergency stop signal will not automatically resume. It must be restored by operating the software's electronic emergency stop function or through the HMI interface after re-establishing the connection.

[0103] Operation Log Recording: Log recording begins immediately upon user login. The log includes operation date, user, button actions, data entry, and data additions. Logs are stored in real-time on the main device terminal and cannot be deleted or modified on the mobile terminal, thus generating an unalterable traceability report. Users can retrieve and view log records from the main device terminal using the "Log Synchronization" button and filter by year / month / day / hour.

[0104] IV. Code generation auxiliary steps.

[0105] This step enables automatic programming of the background PLC program. The mobile terminal provides several data elements to the background editing software, including:

[0106] Tabular data: Data imported from external tabular files (such as...) Figure 2 (as shown), and the operation data generated after verification and modification via a mobile terminal during on-site debugging;

[0107] PLC data: Identifiable data variables (such as input / output status, register values, etc.) obtained in real time from the PLC through the main device terminal.

[0108] Process data: Equipment process logic data, such as the process status diagram edited in the background editing software (e.g., ... Figure 8 (As shown), describing the logical relationships between devices, such as start-up, shutdown, and interlocking;

[0109] Program block data: Pre-programmed template programs for different device types. Each template program defines the device area information interface (such as the previous area and the current area) and reserves key fields to be replaced (such as "area_function description keyword_data type").

[0110] After acquiring the aforementioned data elements via a mobile terminal, the data is transmitted to the background editing software. The background editing software, based on a preset PLC general programming language (such as ST structured text) logic template, retrieves address information and variable parameters from the data elements, automatically replaces key fields in the template, and, in conjunction with process editing information, generates executable code adapted to the current PLC.

[0111] Specifically, the background software identifies information such as "region_function description keywords_data type" in the template program block, retrieves matching addresses in tabular data and PLC data (e.g., %Q102.2 is retrieved based on "conveyor forward rotation" and "BOOL"), performs a replacement operation, processes each device sequentially, and finally generates a structured text program. This program can be copied to the PLC for compilation and execution.

[0112] This method supports automatically generating a manual program first for on-site manual debugging. After debugging and point correction, a complete automatic program is then generated, forming an iterative optimization programming flow. This approach significantly reduces manual programming, lowers the address input error rate, and, because it uses the standard ST language, is compatible with programming environments for various PLC brands.

[0113] In one embodiment, the data configuration step specifically includes permission verification logic:

[0114] Receive the user's login credentials;

[0115] Verify the account permission level corresponding to the login credentials;

[0116] If the account permission level is low, a simplified interface containing only input signals, output signals, and electronic emergency stop controls will be rendered; this is generally applicable to mobile devices and dedicated mobile debugging equipment.

[0117] If the account permission level is high, a full-featured interface including input signals, output signals, device operation controls, and electronic emergency stop controls will be rendered. This permission is only applicable to dedicated debugging equipment.

[0118] In this embodiment, the specific details regarding the automatic identification and configuration of data import to the region technology are as follows.

[0119] Example Figure 2 The tabular data files are imported into the background compilation software. By identifying information such as regions within the data, different data types are assigned to different regions. After compilation, the data is downloaded to the device terminal. Data synchronization is achieved by establishing a Wi-Fi or physical connection between the device's wireless terminal and the mobile terminal. An example of mobile terminal display is shown below. Figures 3-5 .

[0120] refer to Figure 2 and Figure 9 The following is an example of importing table data and displaying it on a mobile device:

[0121] Columns B and C generate the device region level 1 and level 2 directories. Click in the software... Figure 4 The primary and secondary areas of the filter row, corresponding to columns B and C respectively, can be used to filter the range of signal inputs and outputs to be displayed.

[0122] Double-click on other data in the table. Figure 4 The data block in the middle brings up the pop-up interface. Figure 3 Other data is contained in the corresponding data blocks.

[0123] Column D: Function descriptions of the corresponding data blocks.

[0124] Data type of column E:

[0125] BOOL data - PLC hardware address generation indicator light, PLC mapping address generation button.

[0126] Word data - PLC hardware address generates non-inputable data frames, PLC mapping address generates inputable data frames.

[0127] Column F, PLC Address: Displays the PLC's hardware address and mapped address.

[0128] Column G: Displays the unit of data. BOOL data has no unit.

[0129] Column H displays the data block area where the data will be allocated.

[0130] Signal input and output can be of digital, analog, or other data types. It directly reflects the PLC's hardware address. This signal is for display purposes only and cannot be operated.

[0131] Operation data only supports mapped data. Signals can be rewritten, displayed, and operated via buttons or data entry. PLC hardware addresses cannot be used.

[0132] The software performs background compilation checks based on the data types supported by different PLCs, verifies the relationship between data types, PLC addresses, and display areas, and performs error correction display.

[0133] Column I: Hardware address mapping: Actual wiring data and contact information on site.

[0134] In one embodiment, the real-time data modification and operation steps further include electronic emergency stop logic:

[0135] The communication link status between the mobile terminal and the main device terminal is monitored in real time and classified into three states: normal, weak signal, and interruption.

[0136] When a communication interruption is detected, the triggered emergency stop command remains valid.

[0137] After communication is restored, the triggered emergency stop command remains in a continuously valid state and is not automatically released when communication is restored; the emergency stop command can only be released by an explicit recovery operation performed by the user on the operating mobile terminal;

[0138] When a weak signal is detected, a weak signal warning is issued, and the emergency stop operation remains effective;

[0139] An emergency stop status record is generated and synchronized to the local operation log.

[0140] In this embodiment, electronic emergency stop technology such as Figure 4 and Figure 5 The electronic emergency stop button is located in the lower right corner.

[0141] Implementation steps:

[0142] When a good communication connection is established between the handheld mobile terminal and the main device wireless terminal, the electronic emergency stop can be activated. The software will monitor the communication link status between the mobile terminal and the main device terminal in real time, and classify the link status into three states: normal, weak signal, and interruption, based on the transmission efficiency, response speed, and connection maintenance of data transmission and reception.

[0143] Normal state: Signal transmission is good, electronic emergency stop can be triggered and resumed normally, and operation response is rapid.

[0144] Weak signal state: Communication is not completely disconnected, but there is a significant transmission delay or some packet loss. The software flashes a warning and a weak signal alert at the WiFi connection status indicator on the top of the mobile terminal, and the emergency stop button indicator flashes simultaneously to indicate an abnormal control status. In this state, the electronic emergency stop operation is still effective, and the user can press the emergency stop button normally to trigger the emergency stop command; its operating logic is the same as in the normal state.

[0145] Interruption status: When the communication link is completely disconnected, if an emergency stop command has been triggered via the mobile terminal, the main device terminal will automatically maintain the continuous validity of the emergency stop command to ensure that the PLC or safety device remains in emergency stop protection.

[0146] Operating mode:

[0147] Emergency stop trigger: When the user presses the electronic emergency stop button on the mobile terminal interface, the button symbol changes, and the mobile terminal sends the emergency stop command to the main equipment terminal through the currently available communication link. The main equipment terminal then controls the PLC or safety equipment to perform an emergency stop, power cut-off, or braking.

[0148] Emergency Stop Recovery: Once an emergency stop is triggered, the emergency stop state will not be automatically deactivated. Even if the communication link recovers from a weak signal to normal, or resumes connection from an interruption, the triggered emergency stop command remains valid and will not be automatically reset upon communication recovery. The user must actively perform a clear recovery operation on the mobile terminal (e.g., rotating the dot on the electronic emergency stop button in a specific direction) to deactivate the emergency stop state and restore device operation.

[0149] In particular, in the case of reconnection after communication interruption, the emergency stop state remains after the link is restored, and the user can only release the emergency stop through the recovery operation on the mobile terminal. The system does not provide any automatic recovery mechanism.

[0150] Record generation: Each emergency stop trigger, status change (such as entering a weak signal or interruption leading to maintenance), and recovery operation generates a corresponding emergency stop status record and synchronizes it to the local operation log for subsequent traceability and accident analysis.

[0151] In one embodiment, the floating point logic in the dynamic interaction step specifically includes:

[0152] Real-time scanning of transition edges in the real-time signal state;

[0153] When a signal is detected to change from the first state to the second state, the corresponding PLC address identifier is obtained;

[0154] On the visual debugging interface, the signal control corresponding to the PLC address identifier is dynamically moved from the default list position to the top of the list at the top of the interface and highlighted.

[0155] In this embodiment, the floating point-to-point technology is described as follows.

[0156] Click Figure 4 The sorting row in the table sorts the data.

[0157] PLC address sorting; IO address sorting; ascending or descending order can be selected;

[0158] Floating point sorting; there is no ascending or descending order, and it is automatically prioritized based on the signal changes fed back from the PLC hardware address.

[0159] Implementation steps:

[0160] When the field equipment is operated by the operation unit in the equipment operation area of ​​the operating software, the real-time signal fed back by the PLC is finally fed back to the operating mobile terminal software. After receiving the signal, the software identifies the changed signal data and automatically puts the changed signal data in the input and output signal areas to the top layer.

[0161] This technology primarily addresses situations where there are numerous signals in some Level 2 areas, making it impossible for the software interface to display them all. It also allows operators to quickly check whether the signal status of the current device meets the requirements.

[0162] In one embodiment, the real-time data modification and operation steps further include anti-accidental touch logic: in response to the user's triggering operation of the anti-accidental touch control, temporarily cut off the operation signal interaction between the operating mobile terminal and the main device terminal; in response to the user's recovery operation, detect the synchronization status with the main device terminal, and synchronize the operation signal status before disconnection to the operating mobile terminal.

[0163] In this embodiment, the anti-accidental touch operation includes:

[0164] Pressing the button will temporarily cut off the operation signal interaction between the mobile software and the main device terminal, maintaining the device state before the cutoff.

[0165] Button Resume: Detects the synchronization status between the mobile app and the main device, and synchronizes the operation signal status of the main device before disconnection to the mobile app.

[0166] In one embodiment, the method further includes a problem record sharing step: generating a local problem record in response to a user's problem record operation; synchronizing the local problem record to other connected mobile terminals via the master device terminal; receiving problem records from other mobile terminals and displaying them in a local visual debugging interface.

[0167] In this embodiment, the generation and processing of problem logs specifically includes: in the Messages-Problem Logs option, referring to... Figure 6 .

[0168] Implementation steps:

[0169] Select Level 1 and Level 2 areas or search by entering the area you want to record. Click the pop-up window that appears. "Close the pop-up window."

[0170] choose" "To add a problem record, a pop-up window will appear asking you to fill in the problem record. After filling in the problem record, save it. The save date will be the current system date."

[0171] pass Figure 4 , Figure 5 The system allows for the addition, modification, and deletion of operational data such as data blocks, as well as the addition, modification, and deletion of PLC hardware addresses. Through real-time data capture technology, the data is directly recorded in the problem log table.

[0172] To delete a problem record: Click on the corresponding problem point in the record area. A problem record pop-up window will appear. Click the delete button to delete the problem record.

[0173] Problem screening and handling:

[0174] Select Level 1 and Level 2 areas or filter by search.

[0175] Status filtering: All, Resolved, Pending; Default status: Pending.

[0176] Click the small square at the end of the issue section in the record area to switch the issue status. Newly created issues default to "". ".

[0177] Solved: Displaying " ".

[0178] Unresolved: Displays " ".

[0179] In one embodiment, a PLC automatic programming method based on tabular data is provided, which is applied to background editing software and includes:

[0180] Data import and recognition: Import tabular data files containing PLC addresses, data types, and function descriptions, and automatically recognize data levels and variable relationships;

[0181] Configuration generation: The identified data is compiled into a configuration data packet that can be recognized by the device terminal, and the configuration data packet is sent to the main device terminal and the operating mobile terminal;

[0182] Automatic code generation: The system acquires multiple data elements provided by the mobile terminal, retrieves a preset PLC general programming language logic template, automatically replaces key fields in the template, and generates executable code adapted to the PLC. The executable code includes a first type of program code for manual debugging and a second type of program code for automatic operation.

[0183] Traceability Management: Real-time recording of operation logs and signal change data to the read-only storage area of ​​the main device terminal, generating an unalterable traceability report.

[0184] This embodiment provides a PLC automatic programming method based on tabular data, which is applied to background editing software. The background editing software runs independently on a computer or server and is used in conjunction with the main device terminal and the operating mobile terminal.

[0185] I. Data Import and Recognition.

[0186] Data import automatically identifies and configures to regional technologies, backend software development - PLC program automatic programming technology, and backend editing software imports tabular data files (see example). Figure 2 This form file contains, but is not limited to, the following information:

[0187] Columns B and C: Level 1 and Level 2 directories for equipment zones, used to define the hierarchical affiliation of equipment;

[0188] Column D: Function description, such as "Conveyor motor rotating forward" or "Emergency stop status";

[0189] Column E: Data types, including BOOL (Boolean) and Word (Word), etc.;

[0190] Column F: PLC address, such as hardware address (%I, %Q) and mapped address (%MW, %MD);

[0191] Column G: Units (BOOL data has no units);

[0192] Column H: Display area, such as "Signal Input" or "Signal Output";

[0193] Column I: Hardware address mapping (actual wiring data and contact information on site).

[0194] The background editing software automatically identifies the hierarchical relationships (level 1 / level 2 areas) and the relationships between variables in the above data (e.g., matching input / output relationships through functional description keywords). Simultaneously, the software performs background compilation checks on the relationships between data types, PLC addresses, and display areas, correcting any inconsistencies found.

[0195] II. Configuration Generation.

[0196] The background editing software compiles the identified data into a configuration data packet that can be recognized by the device terminal. This data packet contains mappings for PLC addresses, data types, function descriptions, area information, and operation permissions. After compilation, the background software sends the configuration data packet to the master device terminal (device wireless terminal or device terminal), and the master device terminal synchronizes it to the operating mobile terminals (via Wi-Fi or physical connection). This process ensures that all mobile terminals on site have a consistent data view.

[0197] 3. Automatic code generation.

[0198] The background editing software includes pre-programmed ST (Structured Text) language logic templates (i.e., program block data) for different device types. Each template program defines a device area information interface, for example:

[0199] / / The conveyor motor is running;

[0200] IF U_Area_Task Completed_BOOL THEN Area_Conveyor Forward Rotation_Q = 1; END_IF;

[0201] Among them, "U_Area" represents the previous area, "Area" represents the current area, and "Task End_BOOL" and "Conveyor Forward Rotation_Q" are the key fields to be replaced.

[0202] The specific execution process of automatic code generation is as follows:

[0203] First, the background editing software acquires multiple data elements provided by the mobile terminal. These data elements include at least:

[0204] Tabular data (such as externally imported PLC address mapping tables and modified operation data after on-site verification);

[0205] PLC data (identifiable variables obtained in real time from the PLC);

[0206] Process data (equipment process logic relationships);

[0207] Program block data (the aforementioned pre-set template program).

[0208] Then, based on these data elements, the background editing software performs the following operations:

[0209] Retrieval: Based on the variable parameters confirmed by the user (which can be received from the mobile terminal or directly based on table data), identify the area identifier (such as Area, U_Area), function description keywords (such as "forward conveying") and data type identifier (such as _BOOL, _Q) in the template.

[0210] Matching: Search the imported table data file for PLC address information that matches the above identifier. For example, if the current area is found to be "P1102", the function description is "conveyor forward rotation", and the data type is BOOL output, then the corresponding PLC address is locked as "%Q102.2".

[0211] Replace: Replace keywords in the template with actual addresses to generate structured text code, for example:

[0212] IF %MW100.0 THEN %Q102.2 =1; END_IF;

[0213] Output: The generated executable code is presented in text format. The generated code includes two categories: the first is program code for manual debugging (e.g., jog control, single-step operation), and the second is program code for fully automatic operation (containing complete process interlocks and automatic logic). Users can copy the code to their clipboard and paste it into the corresponding PLC programming software for compilation and download.

[0214] This method supports an iterative development process: First, a manual debugging program is generated for on-site debugging personnel to manually check points and verify functions via mobile terminals; after the manual debugging is completed and the point correction data is sent back to the backend, an automatic running program is generated based on the corrected data, thereby achieving a seamless connection from debugging to production.

[0215] Because it uses ST language and address matching is based on a three-level search of "region + keyword + data type", this method can be adapted to different brands of PLCs (as long as the PLC supports ST language), has broad versatility and standardization potential, and significantly reduces the error rate of manual programming and repetitive work.

[0216] IV. Traceability Management.

[0217] The background editing software works in conjunction with the main device terminal to record operation logs and signal change data in real time.

[0218] Operation Log: After a user logs in to the mobile terminal, all operations (button clicks, data entry, forced output, etc.) are recorded, including information such as the operation date, user account, and operation content. The log is transmitted in real time to the read-only storage area of ​​the main device terminal. Neither the mobile terminal nor the background editing software can directly delete or modify the log content, ensuring the authenticity and immutability of the data.

[0219] Signal change data: When the signal of the PLC hardware address changes (such as the input point being turned on or the output point being set), the master terminal also records the change event and its timestamp.

[0220] Traceability Report Generation: Users can query logs via mobile devices or backend software, filter by year / month / day / hour, and generate tamper-proof traceability reports. These reports can be used for incident analysis, operational responsibility determination, and debugging process review.

[0221] In one embodiment, a PLC debugging and automatic programming system is provided, which includes an operator mobile terminal, a master device terminal, and background editing software;

[0222] The background editing software is used to execute the PLC automatic programming method based on table data provided in the above embodiments, including importing table data files, automatically identifying data levels and compiling them into configuration data packages, sending them to the main device terminal, and synchronizing them to the operating mobile terminal;

[0223] The mobile terminal is used to execute the PLC debugging point-to-point and automatic programming method based on the mobile terminal provided in the above embodiments; including receiving the configuration data packet and rendering a visual debugging interface, monitoring the signal status fed back by the PLC in real time, executing floating point-to-point logic to display the changing signal data on top, responding to user input commands to generate control signals and send them to the PLC, and recording operation logs.

[0224] The main device terminal is communicatively connected to the operating mobile terminal and the PLC, and is used to forward control signals and real-time signal status between the operating mobile terminal and the PLC, and to store operation logs to the read-only storage area.

[0225] The background editing software also generates PLC executable code based on a preset PLC general programming language (such as ST language) logic template and the table data file.

[0226] In one embodiment, a PLC debugging and automatic programming system is provided, which consists of three parts: an operator terminal, a field gateway device, and upper-level configuration software.

[0227] The host configuration software is responsible for parsing external table files (which record the PLC's address mapping, data types, and function descriptions), automatically extracting the hierarchical structure and variable relationships, and packaging the parsing results into a data configuration file. The software also has a built-in structured text (ST)-based code generation engine that can automatically retrieve and populate preset program templates based on the address information in the table and user-defined parameters, ultimately outputting a machine-executable program adapted to the target PLC.

[0228] The operator terminal establishes a wireless or wired connection with the field gateway device, receives and loads data configuration files, and generates a graphical human-machine interface based on these files. During operation, the terminal collects signal changes from the PLC in real time. Once a signal change at a certain address is detected, the corresponding control is immediately brought to the forefront and highlighted on the interface. The terminal also receives touch commands from the operator, converts them into control messages, sends them to the PLC via the gateway device, and stores the operation history locally.

[0229] The field gateway device acts as a bridge, connecting a handheld operating terminal on one end and a PLC on the other, responsible for bidirectional forwarding of control commands and status data. The device has an internal read-only storage area for persistently storing log records from the operating terminal, preventing subsequent tampering.

[0230] The above system enables a closed-loop process from importing tabular data, visual on-site debugging, rapid location of signal changes to automatic generation of cross-platform programs.

[0231] In one embodiment, the operating mobile terminal includes a general-purpose mobile device or a dedicated debugging device:

[0232] If it is a general mobile device, it connects to the main device terminal via a wireless network and loads the restricted feature set by default;

[0233] If it is a dedicated debugging device, it is connected to the main device terminal through a physical interface, and the full set of functions is loaded, while the device's external communication module is disabled.

[0234] In one embodiment, the operating mobile terminal is categorized as either a general-purpose mobile device or a dedicated debugging device based on its device type:

[0235] General mobile devices (such as smartphones) establish a connection with the main device terminal via a wireless network (such as WiFi). To meet on-site management requirements (such as preventing operator distraction), this mode loads a restricted function set by default, only enabling basic debugging functions such as point viewing, signal verification, problem logging, and electronic emergency stop protection, and does not include advanced permissions such as remote device operation.

[0236] Dedicated debugging equipment (such as customized industrial handheld terminals) connects directly to the main device terminal via physical interfaces (such as USB or dedicated aviation connectors). In this mode, a full suite of functions is loaded, supporting all debugging operations (including device start / stop, parameter writing / modification, etc.). Dedicated debugging equipment is a hardware-limited product (lacking mobile communication, camera, Bluetooth, etc.) to avoid external power interference with debugging operations and to meet factory requirements for controlling photographic activity.

[0237] The above-mentioned differentiated design allows the system to flexibly adapt to different factory environments (photography allowed / prohibited) and different work scenarios (simple verification / full-function debugging), taking into account both ease of operation and on-site safety and compliance.

[0238] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A PLC debugging point-to-point and automatic programming method based on a mobile terminal, characterized in that, This method operates in a system including an operating mobile terminal, a main device terminal, and background editing software. The operating mobile terminal communicates with the main device terminal via a wireless or physical connection, and the main device terminal is connected to the PLC via industrial communication. The method is applied to the operating mobile terminal and includes: Data Configuration: Receives a configuration data package compiled by the background editing software based on a table data file. The configuration data package contains mapping relationships of device location information, PLC address, data type, and function description; renders a visual debugging interface based on the mapping relationships. Dynamic interaction: The real-time signal status feedback from the PLC is obtained through the main device terminal; floating point logic is executed, that is, when a change in the signal status of a specific address is detected, the corresponding signal data is automatically pinned to the top and highlighted on the visual debugging interface; Real-time data modification and operation: In response to the user's real-time data modification and operation on the visual debugging interface, operation control signals and safety control signals are generated and sent to the PLC through the main device terminal; at the same time, a local operation log is generated and stored, and the local operation log is used to generate an unalterable traceability report; Code generation assistance: Provides multiple data elements to the background editing software, including at least tabular data, PLC data, process data, and program block data, so that the background editing software can retrieve preset PLC general programming language logic templates and generate executable code adapted to the PLC.

2. The method according to claim 1, characterized in that, The data configuration steps specifically include permission verification logic: Receive the user's login credentials; Verify the account permission level corresponding to the login credentials; If the account permission level is low, a simplified interface containing only input signals, output signals, and electronic emergency stop controls will be rendered. If the account permission level is high, a full-featured interface including input signals, output signals, device operation controls, and electronic emergency stop controls will be rendered.

3. The method according to claim 1, characterized in that, The real-time data modification and operation steps also include electronic emergency stop logic: The communication link status between the mobile terminal and the main device terminal is monitored in real time and classified into three states: normal, weak signal, and interruption. When a communication interruption is detected, the triggered emergency stop command remains valid. After communication is restored, the triggered emergency stop command remains in a continuously valid state and is not automatically released when communication is restored; the emergency stop command can only be released by an explicit recovery operation performed by the user on the operating mobile terminal; When a weak signal is detected, a weak signal warning is issued, and the emergency stop operation remains effective; An emergency stop status record is generated and synchronized to the local operation log.

4. The method according to claim 1, characterized in that, The floating point logic in the dynamic interaction step specifically includes: Real-time scanning of transition edges in the real-time signal state; When a signal is detected to change from the first state to the second state, the corresponding PLC address identifier is obtained; On the visual debugging interface, the signal control corresponding to the PLC address identifier is dynamically moved from the default list position to the top of the list at the top of the interface and highlighted.

5. The method according to claim 1, characterized in that, The real-time data modification and operation steps also include logic to prevent accidental touches: In response to the user's triggering of the anti-accidental touch control, the operation signal interaction between the mobile terminal and the main device terminal is temporarily cut off; In response to the user's recovery operation, the signal status of the main device terminal is detected, and the current signal status of the main device terminal is synchronized to the operating mobile terminal.

6. The method according to claim 1, characterized in that, It also includes steps for sharing problem records: In response to a user's problem recording operation, a local problem record is generated; the local problem record is synchronized to other connected mobile terminals via the main device terminal; problem records from other mobile terminals are received and displayed in the local visual debugging interface.

7. The method according to claim 1, characterized in that, The aforementioned multiple data elements specifically include: Tabular data includes externally imported tabular data and operational data modified after on-site verification; PLC data refers to identifiable data variables obtained from the PLC. Process data refers to the logical data of the equipment process. Program block data consists of pre-programmed template programs for different device types.

8. A PLC automatic programming method based on tabular data, characterized in that, This method is applied to background editing software, including: Data import and recognition: Import tabular data files containing PLC addresses, data types, and function descriptions, and automatically recognize data hierarchy and variable relationships; Configuration generation: The identified data is compiled into a configuration data packet that can be recognized by the device terminal, and the configuration data packet is sent to the main device terminal and the operating mobile terminal; Automatic code generation: The system acquires multiple data elements provided by the mobile terminal, retrieves a preset PLC general programming language logic template, automatically replaces key fields in the template, and generates executable code adapted to the PLC. The executable code includes a first type of program code for manual debugging and a second type of program code for automatic operation. Traceability Management: Real-time recording of operation logs and signal change data to the read-only storage area of ​​the main device terminal, generating an unalterable traceability report.

9. A PLC debugging and automatic programming system, characterized in that, This includes operating the mobile terminal, the main device terminal, and the background editing software; The background editing software is used to execute the method of claim 8; The mobile terminal is used to perform the method according to any one of claims 1 to 7; The main device terminal is communicatively connected to the operating mobile terminal and the PLC, and is used to forward control signals and real-time signal status between the operating mobile terminal and the PLC, and to store operation logs to the read-only storage area.

10. The system according to claim 9, characterized in that, The operating mobile terminal includes general-purpose mobile devices or dedicated debugging devices: If it is a mobile device, it connects to the main device terminal via a wireless network and loads the restricted function set by default; If it is a dedicated mobile debugging device, it connects to the main device terminal via a physical interface or wireless network and loads the full set of functions.