Method for automatically generating YDT communication module based on HMI
By automatically generating the YDT communication module, the configuration and integration complexity in the HMI system is solved, efficient and reliable real-time data acquisition and monitoring between the equipment and the HMI system is achieved, and the overall performance and response speed of the system are improved.
Patent Information
- Application Number
- CN202510493110.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-08-01
AI Technical Summary
The existing HMI system has cumbersome and error-prone problems when configuring and integrating YDT communication modules, making it difficult to cope with the changing industrial environment needs.
By collecting device information, analyzing the YDT communication protocol, generating instruction script files expressed in XML, combining pre-developed communication driver files, the YDT communication module is automatically generated and embedded in the HMI system to realize real-time data collection and monitoring.
It improves system efficiency and reliability, reduces human errors, ensures the correctness and efficiency of the communication process, and realizes seamless connection between the equipment and the HMI system and real-time data synchronization.
Smart Images

Figure CN120416331A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial automation and control, and particularly to a method for automatically generating a YDT communication module based on an HMI. Background Art
[0002] With the continuous development of industrial automation and informatization technologies, the HMI (Human Machine Interface) has become an indispensable part of the automation control system. The HMI is mainly used to realize the interaction between the operator and the control system, providing functions such as real-time monitoring, data acquisition, alarm management, and operation control for users. Through the HMI, the operator can manage the equipment and production process more intuitively and efficiently, improving work efficiency and production safety. Through effective communication, the HMI can display the status of various devices in real time, process data, and execute instructions.
[0003] The drive communication module is usually used in industrial automation systems, responsible for data transmission and communication, and supporting information exchange between different devices and systems. Its functions cover data interaction with devices such as PLCs, frequency converters, and sensors, playing a bridging and linking role in the monitoring system.
[0004] Although existing HMI systems support communication with different devices, in actual applications, many enterprises still face the complexity of manually configuring and integrating communication modules.
[0005] YD / T 1363.3-2005 (YDT) stipulates the communication protocols that power supply equipment used for centralized monitoring in communication bureaus (stations) should follow in design and manufacturing, and also stipulates the communication protocols between monitoring modules and monitoring units in the power supply, air conditioning, and environmental centralized monitoring and management system of communication bureaus (stations). As a national standard protocol, domestic communication development for equipment such as power supply, air conditioning, and environmental centralized monitoring and management systems complies with this communication protocol. This type of protocol is used in multiple industries. However, only the basic protocol format and some basic functions are defined in the YDT protocol. There are differences in communication protocols for each industry and even each category of equipment. Therefore, it is impossible to use a single communication module to communicate with all devices developed according to the YDT standard protocol. However, the communication protocols of equipment in this industry are all derived from the YDT standard protocol and have similarities with each other.
[0006] Developers need to configure the YDT communication module one by one according to different devices, protocols, and communication standards. This process is not only cumbersome and error-prone but also difficult to meet the requirements of the ever-changing industrial environment. Summary of the Invention
[0007] In view of the deficiencies of the prior art, it is necessary for the present invention to provide a method for automatically generating a YDT communication module based on HMI to improve system efficiency and reliability.
[0008] To solve the above technical problems, the technical solution adopted by the present invention is: a method for automatically generating a YDT communication module based on HMI, comprising the following steps:
[0009] S1: Collect device information in the system, and classify and sort out the device information with YDT communication protocol;
[0010] S2: Perform protocol parsing for the YDT communication protocols of different devices;
[0011] S3: Based on the sorted device information and the parsed YDT communication protocol, edit and generate a YDT communication module configuration file;
[0012] S4: Generate a YDT communication module from the YDT communication module configuration file and a pre-developed communication driver file;
[0013] S5: Embed the generated YDT communication module into the system application to achieve real-time data acquisition and monitoring of the device.
[0014] Preferably, in the step S1, the collected device information includes device model, communication protocol, data format, device address; the YDT communication protocol includes the standard YDT communication protocol and the protocol derived from the standard YDT communication protocol.
[0015] Preferably, in the step S2, the protocol parsing includes extracting the data frame structure, control command, verification method, and data type of the protocol.
[0016] Preferably, in the step S3, the YDT communication module configuration file is an instruction script file expressed in XML.
[0017] Preferably, in the step S3, editing and generating an instruction script file expressed in XML includes the following steps:
[0018] Step S31: Extract the commonalities of the YDT communication protocol;
[0019] Step S32: Establish YDT device parameters according to each device information;
[0020] Step S33: Abstract the commonalities of the YDT communication protocol and the YDT device parameters, and generate an XML file for description.
[0021] Preferably, in the step S3, the commonalities of the YDT communication protocol include device identification code, control identification code, and data information included in the protocol;
[0022] The data information included in the said protocol includes: minimum acquisition period, communication waiting time, device address, protocol version, 16-bit integer decoding order, 32-bit integer decoding order, 32-bit floating-point number decoding order.
[0023] Preferably, in step S4, set the YDT communication module configuration file, and embed the YDT communication module configuration file generated in step S3 with the pre-developed YDT template driver file to generate the YDT communication module;
[0024] Setting the YDT communication module configuration file includes: setting YDT device parameters for each device, generating a structure tree through an XML file, and generating a corresponding channel table of the device in the configuration software through the structure tree;
[0025] The said YDT template driver file is a template driver developed according to the standard YDT protocol.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] Based on the parsed device information and communication protocol, the present invention generates a corresponding YDT communication module configuration file, and then embeds the generated communication module code into the HMI system application to realize real-time data acquisition and monitoring of the device, having the advantages of improving system efficiency and reliability. Description of the Drawings
[0028] Figure 1 It is a flowchart of an embodiment of the method of the present invention. Detailed Embodiment
[0029] The detailed description and technical content of the present invention are described below in conjunction with the drawings. However, the drawings are only for reference and illustration, and are not used to limit the present invention.
[0030] As Figure 1 shown, a method for automatically generating a YDT communication module based on HMI according to an embodiment of the present invention includes the following steps:
[0031] S1: Collect device information in the system, and classify and sort out the device information with the YDT communication protocol;
[0032] S2: Perform protocol parsing for the YDT communication protocols of different devices;
[0033] S3: Based on the sorted device information and the parsed YDT communication protocol, edit and generate a YDT communication module configuration file;
[0034] S4: Generate a YDT communication module from the YDT communication module configuration file and the pre-developed communication driver file;
[0035] S5: Embed the generated YDT communication module into the system application to achieve real-time data collection and monitoring of the device.
[0036] In step S1, the device information collected includes device model, communication protocol, data format, and device address. Communication protocols such as Modbus, Profibus, Ethernet / IP, YD / T 1363.3-2005, etc.; data formats such as floating-point numbers, integers, boolean types, etc.; device addresses such as IP addresses or device addresses, etc.
[0037] Ensure that the information of all relevant devices is accurately recorded and stored. Provide the complete information of all devices in the system to ensure no information is missed, which is convenient for subsequent data processing, lays a foundation for protocol parsing, data format conversion, and generation of communication modules in subsequent steps, ensures the uniqueness and identifiability of each device in the system, and avoids communication failures caused by lost or incorrect device information.
[0038] Classify and organize according to the type of communication protocol of the device, and classify devices with the same type of protocol for subsequent processing. By systematically classifying the devices, the subsequent protocol parsing and module configuration processes are simplified, the management and maintenance of different types of devices are made more efficient, ensuring unified management and standardized processing of the classified devices, providing clear device classification information for subsequent steps, and facilitating quick location and solution of device communication-related problems.
[0039] Ensure that the collected device information is accurate and error-free, use automated tools to verify the collected data, prevent data errors and omissions, and ensure that the information of each device is correctly recorded. Ensure the accuracy and integrity of the device information, reduce communication errors caused by inaccurate data in the subsequent stage, improve the reliability of the system, prevent device identification failures or communication interruptions caused by incorrect device information, provide reliable data support for subsequent module generation, and ensure that the system can be seamlessly connected and communicate with various devices.
[0040] Classify and organize according to the type of communication protocol of the device, and classify and organize the device information with the YDT communication protocol. The YDT communication protocol includes the standard YDT communication protocol and the protocols derived from the standard YDT communication protocol. The YDT communication protocol covers dozens of power electrical appliance protocols, and there are many derived protocol formats.
[0041] In step S2, for the YDT communication protocols of different devices in the system, parse the protocol content. The parsing process includes extracting key elements of the protocol such as data frame structure, control commands, verification methods, data types, etc., and understanding how to exchange data with the device. Through protocol parsing, the specific communication protocol used by the device can be identified to ensure that the data exchange between the device and the system conforms to the protocol specifications.
[0042] In step S3, the YDT communication module configuration file is an instruction script file expressed in XML format.
[0043] Using the configuration file reduces the manual input process, improves the generation efficiency, avoids human errors, and the generated communication module configuration fully meets the requirements of the device, ensuring the correctness and efficiency during the communication process. The configuration file can be directly used in the system without further adjustment, saving development and configuration time.
[0044] Among them, editing and generating an instruction script file expressed in XML format includes the following steps:
[0045] Step S31: Extract the commonalities of the YDT communication protocol;
[0046] Step S32: Establish YDT device parameters according to the information of each device;
[0047] Step S33: Abstract the commonalities of the YDT communication protocol and the YDT device parameters, and generate an XML file for description.
[0048] The commonalities of the YDT communication protocol include device identification code (CID1), control identification code (CID2), data information included in the protocol, etc.
[0049] The data information included in the protocol includes: minimum acquisition period, communication waiting time, device address, protocol version, 16-bit integer decoding order, 32-bit integer decoding order, 32-bit floating-point number decoding order, etc.
[0050] Minimum acquisition period (ms): The time period for operating the device, with the unit of ms, defaulting to 100 ms, which can be adjusted according to the actual situation.
[0051] Communication waiting time: The waiting time for receiving communication data, defaulting to 200 ms, and needs to be matched with the response speed of the device communicating with the configuration operation environment. The specific value should refer to the performance parameters of the device.
[0052] Device address: The YDT device address, used for frame decoding and frame sending.
[0053] Protocol version: Defaults to 32 (0x20), and the user can modify it according to the protocol.
[0054] 16-bit integer decoding order: Adjust the decoding order of word elements, defaulting to 0 - 12.
[0055] 32-bit integer decoding order: Adjust the decoding order of double-word elements, defaulting to 0 - 1234.
[0056] 32-bit floating-point number decoding sequence: Adjust the decoding sequence of double-word elements, with the default being 0 - 1234.
[0057] YDT device parameters include: air conditioner startup temperature, air conditioner shutdown temperature, upper limit of return air temperature, lower limit of return air temperature, upper limit of return air humidity, lower limit of return air humidity, temperature set value, etc.
[0058] The standard YDT communication protocol format is:
[0059] Table 1 Information Structure
[0060]
[0061] Table 2 Information Structure Annotations
[0062]
[0063] The device identification code and control identification code in Table 2 represent different functions.
[0064] Table 3 Base Station Air Conditioner Equipment Technical Agreement Equipment Identification Code
[0065] Serial number Content CID1 Remarks 1 Air conditioning equipment 60H
[0066] Table 4 Air Conditioner Equipment Control Identification Code
[0067] Serial number Content CID2 1 Obtain system parameters (fixed-point number) 47H 2 Set system parameters (fixed-point number) 49H 3 User-defined 80-EFH
[0068] In a specific example, the YDT device parameters are as follows:
[0069] Table 5 Read System Parameter Content
[0070] Serial number Content DATA byte Remarks 1 Air conditioning startup temperature 2 Startup temperature for cooling operation 2 Air conditioning shutdown temperature 2 Shutdown temperature for cooling operation 3 Upper limit of return air temperature 2 Set value of indoor high temperature alarm temperature 4 Lower limit of return air temperature 2 Set value of indoor low temperature alarm temperature 5 Upper limit of return air humidity 2 Set value of indoor high temperature alarm 6 Lower limit of return air humidity 2 Set value of indoor low temperature alarm 7 Set value of temperature 2 Set temperature of air conditioning 8 User-defined number of telemetry / remote control 1 9 Set operation mode 2 10 Set internal fan speed 2 11 Set swing function 2 12 Block local operation 2 13 Dual-machine backup switching time 2 14 Set temperature for simultaneous startup in high temperature 2 15 Set value of temperature in heating mode 2 16 Cooling temperature control accuracy 2 17 Heating temperature control accuracy 2
[0071] Table 6 Set System Parameter Content
[0072]
[0073]
[0074] The abstracted XML file is:
[0075] <Type name="Technical Requirements and Testing Specifications for Base Station Air Conditioner Equipment V2.0" CID1="0x60" exec="uedit">
[0076] <Content name="System Parameters (Fixed-point Numbers)" CID2="0x4947" exec="uedit">
[0077] <Element name="Air conditioner startup temperature" value_type="WUB" value_offset="0x80" / > ......
[0079] <Element name="Temperature set value" value_type="WUB" value_offset="0x86" / >
[0080] <Element name="User-defined telemetry quantity" value_type="BUB" exec="addNewsubNew">
[0081] <Element name="Operating mode setting" value_type="WUB" value_offset="0xC0" / > ......
[0083] <Element name="Heating temperature control accuracy" value_type="WUB" value_offset="0xC8" / >
[0084]
[0085]
[0086]
[0087] In the above instruction script, CID1 is the device identification code, and CID2 is the control identification code; corresponding to CID1\CID2 in the YDT protocol, exec is the operable permission: Uedit is not operable. Generally, when a new protocol is added, exec is as shown above; value_type represents the data type of this data, and the data types are BB, BUB, BD, WUB, WB, WD, DUB, DB, DD, DF, STR; the system parameters define two functions in the protocol, namely read and write functions. The sorting is write - read CID code. For read - only data, only the low - order bits can be filled: for example, "0x47"; for write - only data, only the high - order bits are filled, and the low - order bits are filled with 0: for example, "0x4900". In the instruction <Element name="Air - conditioner startup temperature" value_type="WUB" value_offset="0x80" / >, it includes the name (name), data type (value_type), and write - definition segment COMMAND_TYPE (value_offset); in the command <Element name="User - defined telemetry quantity" value_type="BUB" exec="addNewsubNew" / >, the label in exec here is addNewaubNew, which means that the number of child - node data is variable and can be added, and the user can customize it. For the data that can be added in groups in the device, it can be configured.
[0088] In step S4, set the YDT communication module configuration file, and embed the YDT communication module configuration file generated in step S3 into the pre - developed YDT template driver file to generate the YDT communication module.
[0089] In step S4, setting the YDT communication module configuration file includes: setting YDT device parameters for each device, generating a structure tree through an XML file, and generating a corresponding channel table of the device in the configuration software through the structure tree.
[0090] The YDT template driver file is a template driver developed according to the standard YDT protocol. This driver cannot communicate with the YDT device without the YDT communication module configuration file (lacking device communication parameters), and can communicate with the device corresponding to the configuration file after adding the YDT communication module configuration file.
[0091] After embedding the YDT communication module configuration file into the template driver file and opening this driver with the HMI configuration software, the device data information and data structure added in this configuration file can be seen. Generate a structure tree through the XML file, and generate a corresponding channel table of the device in the configuration software through the structure tree.
[0092] In step S5, embed the YDT communication module code into the core architecture of the HMI system to ensure seamless docking of the module with other components of the HMI, integrate and debug the module code, and ensure compatibility with other functional modules such as the UI interface, data processing module, and database in the HMI system. Ensure the coordinated operation of the communication module with other parts of the HMI system, provide a basis for subsequent data collection and monitoring, improve the integration degree of the system through integration, avoid the configuration complexity and potential errors brought by decentralized deployment, and ensure that the communication module can operate efficiently in the HMI environment without affecting the overall performance and response speed of the system.
[0093] Configure the real-time data collection logic between the communication module and the device to ensure that device information can be transmitted to the HMI system in real time according to the set cycle or event trigger, implement data flow management mechanisms such as caching and queuing to ensure stable data transmission and timely processing, and avoid data loss or delay. Achieve real-time data synchronization between the device and the HMI system, ensure that the real-time status of the device can be immediately fed back to the HMI system for processing, improve the response speed and data collection accuracy of the system, ensure that device status, sensor information, alarm data, etc. can be displayed on the HMI interface in a timely manner, and ensure the reliability and stability of data transmission through efficient data management, avoiding the impact of network latency or device failures on data real-time performance.
[0094] Design a real-time data monitoring interface and an alarm mechanism in the HMI system to display the data collected from the device and automatically trigger an alarm according to the set thresholds or status changes, implement data visualization functions such as charts, dashboards, curves, etc., and help operators monitor key information such as the running status and performance indicators of the device in real time. Provide an intuitive data display interface, enabling operators to quickly understand the current operating conditions of the device, support quick decision-making, implement an alarm mechanism based on real-time data, and be able to notify operators in a timely manner when the device has abnormalities or status changes to prevent problems from expanding. Through visualization means, enhance the user-friendliness of the HMI system and improve the operator's mastery of the system status.
[0095] The above-described embodiments are merely preferred embodiments cited to fully illustrate the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or transformations made by those skilled in the art on the basis of the present invention are all within the protection scope of the present invention.
Claims
1. A method for automatically generating a YDT communication module based on HMI, characterized in that, It includes the following steps: S1: Collect device information in the system, and classify and sort out the device information with the YDT communication protocol; S2: Perform protocol parsing for the YDT communication protocols of different devices; S3: Based on the sorted device information and the parsed YDT communication protocols, edit and generate a YDT communication module configuration file; S4: Generate a YDT communication module from the YDT communication module configuration file and a pre-developed communication driver file; S5: Embed the generated YDT communication module into the system application to achieve real-time data collection and monitoring of the devices.
2. The method for automatically generating a YDT communication module based on HMI according to claim 1, wherein In the step S1, the collected device information includes device model, communication protocol, data format, and device address; the YDT communication protocol includes the standard YDT communication protocol and the protocols derived from the standard YDT communication protocol.
3. A method for automatically generating a YDT communication module based on HMI according to claim 1, characterized in that, In the step S2, the protocol parsing includes extracting the data frame structure, control command, verification method, and data type of the protocol.
4. A method for automatically generating a YDT communication module based on HMI according to claim 1, characterized in that, In the step S3, the YDT communication module configuration file is an instruction script file expressed in XML.
5. A method for automatically generating a YDT communication module based on HMI according to claim 4, characterized in that, In the step S3, editing and generating an instruction script file expressed in XML includes the following steps: Step S31: Extract the commonalities of the YDT communication protocol; Step S32: Establish YDT device parameters according to each device information; Step S33: Abstract the commonalities of the YDT communication protocol and the YDT device parameters, and generate an XML file for description.
6. A method for automatically generating a YDT communication module based on HMI according to claim 5, characterized in that, In the step S3, the commonalities of the YDT communication protocol include device identification code, control identification code, and data information included in the protocol; The data information included in the protocol includes: minimum acquisition period, communication waiting time, device address, protocol version, 16-bit integer decoding order, 32-bit integer decoding order, 32-bit floating-point number decoding order.
7. A method for automatically generating a YDT communication module based on HMI according to claim 1, characterized in that In the step S4, set the YDT communication module configuration file, and embed and combine the YDT communication module configuration file generated in step S3 with the pre-developed YDT template driver file to generate a YDT communication module; Setting the YDT communication module configuration file includes: setting YDT device parameters for each device, generating a structure tree through the XML file, and generating a corresponding channel table in the device in the configuration software through the structure tree; The YDT template driver file is a template driver developed according to the standard YDT protocol.