Building control method and system based on AUTBUS bus and Modbus TCP protocol
By adopting the combination solution of AUTBUS bus and Modbus TCP protocol in the building control system, efficient control of controlled equipment in complex industrial environments is achieved, problems such as limited communication rate and poor compatibility in existing systems are solved, and the real-time and reliability of the system are improved.
Patent Information
- Application Number
- CN202411953504.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-15
AI Technical Summary
In complex industrial environments, existing building control systems have problems such as limited communication rate, poor compatibility, high wiring costs, and reduced stability and real-time data transmission.
The building control method and system based on the AUTBUS bus and Modbus TCP protocol is adopted to realize the message interaction between the Modbus TCP master and slave station through cascading forwarding, and the logical address of the controlled device is mapped with the IO ports in the IOM module in the AUTBUS network based on the address mapping table.
It realizes efficient control of massive controlled equipment in complex buildings, reduces wiring complexity, and improves the real-time and reliability of the system.
Smart Images

Figure CN119828547A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial control technology, and in particular to a building control method and system based on AUTBUS bus and Modbus TCP protocol. Background Art
[0002] In the field of building control, existing technologies mainly rely on various fieldbus technologies and industrial Ethernet communication protocols to achieve communication and control between devices. Generally, the 485 bus protocol is used more often, which leads to limited communication rate and poor compatibility. In addition, if you want to connect multiple controllers at one time, you must use traditional switches, and you cannot achieve intelligent linkage control between multiple distributed data controllers and IOM module input and output modules.
[0003] Some existing systems in the building are controlled by Modbus TCP protocol. Distributed controllers use Modbus TCP protocol to connect various controlled devices through star Ethernet to realize data transmission and the issuance of control commands.
[0004] However, for some complex industrial environments, especially when field equipment is dispersed and far away, the wiring cost of star Ethernet is high and may be affected by factors such as electromagnetic interference, resulting in reduced stability and real-time performance of data transmission; it also requires more complex network configuration and more network equipment support, increasing the complexity and cost of the system. Summary of the invention
[0005] In view of this, the embodiment of the present application provides a building control method and system based on the AUTBUS bus and the Modbus TCP protocol. The technical solution of the embodiment of the present application realizes the message interaction between the Modbus TCP master station and the Modbus TCP slave station based on cascade forwarding, and realizes the mapping between the logical address of the controlled device accessed by the Modbus TCP message and the IO port in each IOM module in the AUTBUS network connected to the Modbus TCP slave station based on the address mapping table, thereby integrating the high reliability of the AUTBUS bus and the network advantages of the Modbus TCP protocol, realizing the control of massive controlled devices in complex buildings, which not only reduces the wiring complexity of the building control system, but also improves the real-time and reliability of the building control system.
[0006] In the first aspect, an embodiment of the present application provides a building control method based on AUTBUS bus and Modbus TCP protocol, wherein a building control system is composed of several cascaded controllers, the Modbus TCP master station is a server or one of the controllers in the system, and the other controllers are both Modbus TCP slave stations and AUTBUS master stations, each controller is connected to several IOM modules through the AUTBUS bus, and each port of each IOM module is connected to a controlled device, and the method comprises: the Modbus TCP slave station determines whether the destination address of the received Modbus TCP downlink message is the local machine; when the Modbus TCP slave station determines that the destination address is the local IP address, the device ID of the IOM module connected to the controlled device accessed by the message and the IO port number connected to the IOM module are parsed from the logical address of the message according to the local address mapping table; the Modbus TCP slave station encapsulates the parsed device ID and IO port number with the business data carried by the Modbus TCP downlink message into an AUTBUS downlink message according to the function code indication of the Modbus TCP downlink message, and sends it to the IOM module connected to the controlled device accessed by the message, or processes the Modbus locally. Service data carried by TCP downlink messages.
[0007] From the above, in multiple cascaded controller networks, the message interaction between the Modbus TCP master station and the Modbus TCP slave station is realized based on the cascade forwarding method, and the mapping of the logical address of the controlled device accessed by the Modbus TCP message and the IO port in each IOM module in the AUTBUS network connected to the Modbus TCP slave station is realized based on the address mapping table, so as to realize the unique addressing of each controlled device, thereby integrating the high reliability and multi-node advantages of the AUTBUS bus and the network advantages of the compatibility of the Modbus TCP protocol, realizing the control of massive controlled devices in complex buildings, which not only reduces the wiring complexity of the building control system, but also improves the real-time performance and reliability of the building control system.
[0008] In a possible implementation manner of the first aspect, the method further includes: the Modbus TCP slave station receives an AUTBUS uplink message sent by the IOM module to include a device ID and an IO port number of the IOM module and collected field data; the Modbus TCP slave station locally processes the AUTBUS uplink message according to the type of the AUTBUS uplink message, or, according to an address mapping table, converts the device ID and the IO port number of the IOM module into a logical address, and then encapsulates the logical address together with the IP address of the Modbus TCP master station and the business data carried by the AUTBUS uplink message into a Modbus TCP uplink message and sends it to the Modbus TCP master station.
[0009] From the above, when the AUTBUS uplink message is a feedback message for regularly collecting field data, the Modbus TCP slave saves the collected data in the cache so that the Modbus TCP master can quickly obtain it. When the AUTBUS uplink message is a feedback message for real-time collection of field data, the Modbus TCP slave sends the collected data to the Modbus TCP master in real time to make real-time decisions, thereby meeting the needs of collecting field data in different scenarios.
[0010] In a possible implementation of the first aspect, when the function code in the Modbus TCP downlink message indicates writing data to a logical address in the message, the device ID and the IO port number are encapsulated with the business data into the AUTBUS downlink message and then sent to the IOM module connected to the controlled device accessed by the message; when the function code in the Modbus TCP downlink message indicates reading field data, the business data carried by the Modbus TCP downlink message is processed locally, including: reading the field data from a cache corresponding to the logical address in the message in the Modbus TCP slave station.
[0011] From the above, the controlled device can be controlled in real time according to the function code instructions or the collected data can be quickly fed back to the Modbus TCP master station to meet the needs of different control scenarios.
[0012] In a possible implementation of the first aspect, the method further includes: the Modbus TCP master station receives control information generated by the application layer based on the system control logic, and the control information is encapsulated based on the structure of the Modbus TCP message; after determining that the control information includes the IP address of the Modbus TCP slave station, the Modbus TCP master station sends a Modbus TCP downlink message including the control information to the Modbus TCP slave station.
[0013] From the above, the application layer of the Modbus TCP master generates control information based on the control logic of the building control system. The Modbus TCP master sends the Modbus TCP downlink message of the control information to the corresponding Modbus TCP slave according to the IP address to realize the control of the entire building.
[0014] In a possible implementation manner of the first aspect, after receiving a Modbus TCP uplink message, the Modbus TCP slave station determines that the destination address in the Modbus TCP uplink message is not a local address, and forwards the Modbus TCP uplink message to the cascaded Modbus TCP slave station in an uplink direction. When it is determined that the destination address is the local address, the Modbus TCP uplink message is processed locally according to the type of the Modbus TCP uplink message.
[0015] From the above, the Modbus TCP slave determines whether to process locally in the Modbus TCP slave or continue to forward in the cascaded upstream direction according to the destination address in the received Modbus TCP upstream message, thereby realizing the interaction of the Modbus TCP upstream message between the Modbus TCP slave and the Modbus TCP master.
[0016] In a possible implementation manner of the first aspect, when the Modbus TCP master station is one of the controllers in the system, the controller is an AUTBUS master station, and the method further includes: after determining that the control information includes its own IP address, the Modbus TCP master station parses the device ID of the IOM module connected to the accessed controlled device and the IO port number connected to the IOM module from the logical address in the control information according to a local address mapping table; the Modbus TCP master station encapsulates the parsed device ID and IO port number with the business data carried in the control information into an AUTBUS downlink message according to the function code indication in the control information, and then sends it to the IOM module connected to the controlled device accessed by the control information, or locally processes the business data carried by the control information.
[0017] From the above, the Modbus TCP master station uses its connection to the AUTBUS bus to achieve real-time control of the controlled devices it controls, and also achieves addressing of the controlled devices it controls through the local address mapping table, flexibly expanding the controlled devices it controls.
[0018] In a possible implementation manner of the first aspect, the encapsulating the parsed device ID and IO port number with the business data carried by the Modbus TCP downlink message into an AUTBUS downlink message includes: after encapsulating the parsed IO port number, the business data and the function code in the payload of the AUTBUS downlink message, using the parsed device ID as the target node identifier of the AUTBUS downlink message on the corresponding AUTBUS bus.
[0019] From the above, the device ID of the IOM module is used to address the IOM module on the AUTBUS bus, thereby addressing the controlled device.
[0020] In a possible implementation of the first aspect, the method further includes: the server configuring address configuration information of each controlled device, the address configuration information of each controlled device including the logical address of the controlled device, the connected controller, the device ID of the IOM module connected to the controller, and the IO port number in the IOM module; the Modbus TCP master station generates an address mapping table for each controller according to the address configuration information, and sends the address mapping table of the slave station to each Modbus TCP slave station.
[0021] From the above, the server configures the address configuration information of each controlled device and the Modbus TCP master generates an address mapping table for each controller according to the address configuration information, thereby realizing unified configuration of the logical addresses of the controlled devices in the entire building to ensure unique addressing of each logical address.
[0022] In a possible implementation of the first aspect, the address mapping table of each controller also includes a data type of business data of each logical address in the controller, and the method also includes: each Modbus TCP slave station converts the acquired field data into the data type of business data of the corresponding logical address in the address mapping table.
[0023] From the above, by including the data type in the address mapping table of each controller (corresponding to the data type in the Modbus TCP message, which is also the data type used by the application layer of the Modbus TCP master), the data type of the collected field data is matched with the business data of ModbusTCP, so as to facilitate the use of the application layer of the Modbus TCP master.
[0024] In a possible implementation manner of the first aspect, the method further includes: after each Modbus TCP slave station obtains a local address mapping table and before using the address mapping table, the Modbus TCP master station is also used to send a test message to the Modbus TCP slave station, wherein the test message is used to read a message of data of a specific logical address of the Modbus TCP slave station; when the return value of the Modbus TCP slave station is the same as the expected value, it is determined that the address mapping table of the Modbus TCP slave station has passed the verification.
[0025] From the above, the local address mapping table of each Modbus TCP slave is verified through test messages to ensure that the controlled device is correctly addressed.
[0026] In a possible implementation of the first aspect, the logical address of the controlled device connected to each controller is configured in a corresponding segment, and the logical address corresponding to each type of IO port in the segment of each controller is configured in a corresponding sub-segment.
[0027] From the above, the logical addresses of the controlled devices connected through each controller are configured in the corresponding segments, and the logical addresses corresponding to each type of IO port in the segments of each controller are configured in the corresponding sub-segments, so that when each controller adds or deletes various types of controlled devices, it is convenient to update the address mapping table.
[0028] In the second aspect, an embodiment of the present application provides a building control system based on AUTBUS bus and Modbus TCP protocol, including: a server, several cascaded controllers using Modbus TCP protocol, each controller connected to several IOM modules through AUTBUS bus, and each IO port of each IOM module connected to a controlled device; the Modbus TCP master station is a server or one of the controllers is configured as a Modbus TCP master station, and the other controllers are configured as ModbusTCP slave stations and AUTBUS master stations at the same time; the Modbus TCP slave station is used to determine whether the destination address of the received Modbus TCP downlink message is the local machine, and when it is determined that the destination address of the received Modbus TCP downlink message is the local IP address, the device ID of the IOM module connected to the controlled device accessed by the message and the IO port number connected to the IOM module are parsed from the logical address of the message according to the local address mapping table; the Modbus TCP slave station is also used to compare the parsed device ID and IO port number with the Modbus according to the function code indication of the Modbus TCP downlink message. The service data carried by the TCP downstream message is encapsulated into an AUTBUS downstream message and then sent to the IOM module connected to the controlled device accessed by the message, or the service data carried by the Modbus TCP downstream message is processed locally.
[0029] As described above, the message interaction between the Modbus TCP master station and the Modbus TCP slave station is realized based on the cascade forwarding method, and the mapping of the logical address of the controlled device accessed by the Modbus TCP message and the IO port in each IOM module in the AUTBUS network connected to the Modbus TCP slave station is realized based on the address mapping table, so as to realize the unique addressing of each controlled device, thereby integrating the high reliability and multi-node advantages of the AUTBUS bus and the network advantages of the compatibility of the Modbus TCP protocol, realizing the control of massive controlled devices in complex buildings, which not only reduces the wiring complexity of the building control system, but also improves the real-time performance and reliability of the building control system.
[0030] In a possible implementation of the second aspect, the Modbus TCP slave station is also used to receive an AUTBUS uplink message sent by the IOM module, which includes the device ID and IO port number of the IOM module and the collected field data; the Modbus TCP slave station is also used to locally process the AUTBUS uplink message according to the type of the AUTBUS uplink message, or, according to the address mapping table, convert the device ID and IO port number of the IOM module into a logical address, and then encapsulate it together with the IP address of the Modbus TCP master station and the business data carried by the AUTBUS uplink message into a Modbus TCP uplink message and send it to the Modbus TCP master station.
[0031] From the above, when the AUTBUS uplink message is a feedback message for regularly collecting field data, the Modbus TCP slave saves the collected data in the cache so that the Modbus TCP master can quickly obtain it. When the AUTBUS uplink message is a feedback message for real-time collection of field data, the Modbus TCP slave sends the collected data to the Modbus TCP master in real time to make real-time decisions, thereby meeting the needs of collecting field data in different scenarios.
[0032] In a possible implementation of the second aspect, when the function code in the Modbus TCP downlink message indicates writing data to a logical address in the message, the Modbus TCP slave station is specifically used to encapsulate the device ID and the IO port number with the business data into the AUTBUS downlink message and then send it to the IOM module connected to the controlled device accessed by the message; when the function code in the Modbus TCP downlink message indicates reading field data, the Modbus TCP slave station locally processes the business data carried by the Modbus TCP downlink message, including: reading the field data from a cache corresponding to the logical address in the message in the Modbus TCP slave station.
[0033] From the above, the controlled device can be controlled in real time according to the function code instructions or the collected data can be quickly fed back to the Modbus TCP master station to meet the needs of different control scenarios.
[0034] In a possible implementation manner of the second aspect, the Modbus TCP master station is used to receive control information generated by the application layer based on the system control logic, wherein the control information is encapsulated based on a structure of a Modbus TCP message;
[0035] The Modbus TCP master station is further configured to send a Modbus TCP downlink message including the control information to the Modbus TCP slave station after determining that the control information includes the IP address of the Modbus TCP slave station.
[0036] From the above, the application layer of the Modbus TCP master generates control information based on the control logic of the building control system. The Modbus TCP master sends the Modbus TCP downlink message of the control information to the corresponding Modbus TCP slave according to the IP address to realize the control of the entire building.
[0037] In a possible implementation manner of the second aspect, the method further includes: after receiving the Modbus TCP uplink message, when the Modbus TCP slave station determines that the destination address in the Modbus TCP uplink message is not the local address, forwarding the Modbus TCP uplink message to the cascaded Modbus TCP slave station in the uplink direction, and when determining that the destination address is the local address, processing the Modbus TCP uplink message locally according to the type of the Modbus TCP uplink message.
[0038] From the above, the Modbus TCP slave determines whether to process locally or continue to forward according to the destination address in the received Modbus TCP uplink message, thereby realizing the cascade forwarding of the Modbus TCP uplink message.
[0039] In a possible implementation of the second aspect, when the Modbus TCP master station is one of the controllers in the system, the controller is the master station of AUTBUS, and the Modbus TCP master station is also used to parse the device ID of the IOM module connected to the accessed controlled device and the IO port number connected to the IOM module from the logical address in the control information according to the local address mapping table after determining that the control information includes its own IP address; the Modbus TCP master station is also used to encapsulate the parsed device ID and IO port number with the business data carried in the control information into an AUTBUS downlink message according to the function code indication in the control information, and then send it to the IOM module connected to the controlled device accessed by the control information, or locally process the business data carried by the control information.
[0040] From the above, the Modbus TCP master station uses its connection to the AUTBUS bus to achieve real-time control of the controlled devices it controls, and also achieves addressing of the controlled devices it controls through the local address mapping table, flexibly expanding the controlled devices it controls.
[0041] In a possible implementation manner of the second aspect, the Modbus TCP slave station is specifically used to encapsulate the parsed IO port number, the service data and the function code in the payload of the AUTBUS downstream message, and use the parsed device ID as the target node identifier of the AUTBUS downstream message on the corresponding AUTBUS bus.
[0042] From the above, the device ID of the IOM module is used to address the IOM module on the AUTBUS bus, thereby addressing the controlled device.
[0043] In a possible implementation manner of the second aspect, the server is used to configure address configuration information of each controlled device, the address configuration information of each controlled device including the logical address of the controlled device, the connected controller, the device ID of the IOM module connected to the controller, and the IO port number in the IOM module; the Modbus TCP master station is also used to generate an address mapping table for each controller according to the address configuration information, and send the address mapping table of the slave station to each Modbus TCP slave station.
[0044] From the above, the server configures the address configuration information of each controlled device and the Modbus TCP master generates an address mapping table for each controller according to the address configuration information, thereby realizing unified configuration of the logical addresses of the controlled devices in the entire building to ensure unique addressing of each logical address.
[0045] In a possible implementation of the second aspect, the address mapping table of each controller also includes the data type of the business data of each logical address in the controller, and each Modbus TCP slave station is also used to convert the acquired field data into the data type of the business data of the corresponding logical address in the address mapping table.
[0046] From the above, by including the data type in the address mapping table of each controller (corresponding to the data type in the Modbus TCP message, which is also the data type used by the application layer of the Modbus TCP master), the data type of the collected field data is matched with the business data of ModbusTCP, so as to facilitate the use of the application layer of the Modbus TCP master.
[0047] In a possible implementation manner of the second aspect, after each Modbus TCP slave station obtains a local address mapping table and before using the address mapping table, the Modbus TCP master station is further used to send a test message to the Modbus TCP slave station, wherein the test message is used to read a message of data of a specific logical address of the Modbus TCP slave station; when the return value of the Modbus TCP slave station is the same as the expected value, it is determined that the address mapping table of the Modbus TCP slave station has passed the verification.
[0048] From the above, the Modbus TCP slave determines whether to process locally in the Modbus TCP slave or continue to forward in the cascaded upstream direction according to the destination address in the received Modbus TCP upstream message, thereby realizing the interaction of the Modbus TCP upstream message between the Modbus TCP slave and the Modbus TCP master.
[0049] In a possible implementation of the second aspect, the logical address of the controlled device connected to each controller is configured in a corresponding segment, and the logical address corresponding to each type of IO port in the segment of each controller is configured in a corresponding sub-segment.
[0050] From the above, the logical addresses of the controlled devices connected through each controller are configured in the corresponding segments, and the logical addresses corresponding to each type of IO port in the segments of each controller are configured in the corresponding sub-segments, so that when each controller adds or deletes various types of controlled devices, it is convenient to update the address mapping table. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a structural diagram of a first embodiment of a building control system based on AUTBUS bus and Modbus TCP protocol of the present application;
[0052] Figure 2 A schematic diagram of the working mode of the DDC controller master station and the DDC controller slave station executing the server and the client in the first embodiment of the building control system based on the AUTBUS bus and the Modbus TCP protocol of the present application;
[0053] Figure 3 A flowchart of a first embodiment of a building control method based on AUTBUS bus and Modbus TCP protocol of the present application;
[0054] Figure 4 This is a structural diagram of a second embodiment of a building control system based on AUTBUS bus and Modbus TCP protocol of the present application;
[0055] Figure 5A schematic diagram of the communication hierarchy structure of each DDC controller of Example 2 of the building control system based on AUTBUS bus and Modbus TCP protocol of the present application;
[0056] Figure 6 This is a flow chart of Embodiment 2 of a building control method based on AUTBUS bus and Modbus TCP protocol of the present application;
[0057] Figure 7 A schematic diagram of the entire process of the Modbus TCP master station executing control in Embodiment 2 of a building control method based on AUTBUS bus and Modbus TCP protocol of the present application;
[0058] Figure 8 A schematic flow chart of DDC controller master station error management in Embodiment 2 of a control method for a distributed control system of the present application. DETAILED DESCRIPTION
[0059] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0060] In the following description, the terms "first\second\third, etc." or module A, module B, module C, etc. are not only used to distinguish similar objects, or to distinguish different embodiments, but do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0061] In the following description, the numbers representing the steps, such as S110, S120, etc., do not necessarily mean that the steps must be executed in this manner. If permitted, the order of the previous and next steps can be interchanged, or the steps can be executed simultaneously.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0063] The following is an introduction to the terms involved in this application.
[0064] DDC controller (Direct Digital Controller) completes the measurement of characteristic parameters and process parameters of the controlled equipment and controls the controlled equipment. The controlled equipment includes sensors and actuators.
[0065] The IOM module (Input / Output Module) is an electronic device used to process input and output. It is used in industrial automation systems to receive input signals from sensors or other devices through the IO port and convert the output signals of the control system into a form that can drive actuators or other devices.
[0066] AUTBUS bus is a broadband field bus that uses two-wire non-bridge media and OFDM technology at the physical layer. When the transmission distance of AUTBUS bus is 500 meters, the transmission rate is 100Mps; when the transmission distance is 2500 meters, the transmission rate is 6.25Mbps. It supports up to 254 nodes. The twisted pair has no polarity and the wiring is simple. It supports mixed carrying of real-time and non-real-time business data to ensure the certainty and real-time nature of various data transmissions.
[0067] In addition, the AUTBUS bus has excellent communication security performance. Through strict encryption and authentication mechanisms, strict security protection is carried out in every link of data transmission. This not only ensures the security and integrity of data during transmission, but also effectively prevents the risk of data being maliciously tampered with or stolen. In today's digital age, data security in building control systems is extremely important, and the security mechanism of the AUTBUS bus provides reliable protection for the safe and stable operation of buildings.
[0068] In addition, the AUTBUS bus has significant advantages in supporting the number of IOM slaves. It can meet the connection requirements of a large number of input and output modules in large building control systems, greatly improving the scalability and flexibility of the system. Whether it is a large number of sensors and actuators in commercial buildings or a complex equipment control system in an industrial plant, the AUTBUS bus can easily cope with it and achieve efficient data communication and equipment management.
[0069] The nodes of the AUTBUS bus include control nodes (CN) and terminal nodes (TN). CN: Control nodes in the AUTBUS network, which complete network control and communicate with all TN nodes. TN: Terminal nodes in the AUTBUS network, TN nodes can communicate with CN or TN nodes.
[0070] The Modbus TCP protocol uses the master-slave mode. The Modbus TCP master collects data from multiple IOM slave devices in real time, and then issues instructions to the Modbus TCP slave devices according to the preset control algorithms and strategies. The Modbus TCP slave is used for data acquisition and control signal output devices, usually as a slave device of the master station, working in conjunction with the master station to monitor and control field equipment.
[0071] The Modbus TCP protocol is widely used in the field of industrial control with its simple and efficient frame format. Its typical structure includes address field, function code, data field and check code. For example, the address field is used to identify different slaves, the function code indicates the specific operation type, the data field carries the actual data content, and the check code ensures the accuracy of data transmission.
[0072] The embodiment of the present application provides a building control method and system based on AUTBUS bus and Modbus TCP protocol. The method forms a building control system through several cascade controllers, the Modbus TCP master station is a server or one of the controllers in the system, and the other controllers are Modbus TCP slave stations and AUTBUS master stations at the same time. Each controller is connected to several IOM modules through the AUTBUS bus, and each port of each IOM module is connected to a controlled device. The method includes: the Modbus TCP slave station determines whether the destination address of the received Modbus TCP downlink message is the local machine; when the Modbus TCP slave station determines that the destination address is the local IP address, the device ID of the IOM module connected to the controlled device accessed by the message and the IO port number connected to the IOM module are parsed from the logical address of the message according to the local address mapping table; the Modbus TCP slave station encapsulates the parsed device ID and IO port number with the business data carried by the Modbus TCP downlink message into an AUTBUS downlink message and sends it to the IOM module connected to the controlled device accessed by the message, or processes the Modbus TCP locally. Service data carried by TCP downlink messages.
[0073] The technical solution of the embodiment of the present application is used for a building control system composed of multiple cascaded controllers based on the Modbus TCP protocol. The message interaction between the Modbus TCP master station and the Modbus TCP slave station is realized based on the cascade forwarding method. The logical address of the controlled device accessed by the Modbus TCP message is mapped with the IO port in each IOM module in the AUTBUS network connected to the Modbus TCP slave station based on the address mapping table, so as to realize unique addressing of each controlled device, thereby integrating the high reliability and multi-node advantages of the AUTBUS bus and the network advantage of the compatibility of the Modbus TCP protocol, realizing the control of massive controlled devices in complex buildings, which not only reduces the wiring complexity of the building control system, but also improves the real-time performance and reliability of the building control system.
[0074] The following describes various embodiments of the present application in conjunction with the accompanying drawings. Figures 1 to 3The present application introduces a first embodiment of a building control method based on the AUTBUS bus and the Modbus TCP protocol and a first embodiment of a building control system based on the AUTBUS bus and the Modbus TCP protocol.
[0075] A building control method based on AUTBUS bus and Modbus TCP protocol Embodiment 1 Control is performed through the control system described in Embodiment 1 of a building control system based on AUTBUS bus and Modbus TCP protocol.
[0076] Figure 1 The structure of a building control system embodiment 1 based on AUTBUS bus and Modbus TCP protocol is shown, which is a distributed architecture, including: a server, N cascaded controllers based on Modbus TCP protocol, the N controllers are controller 1 to controller N, forming a cascade network, and connected to the server. Each controller can be a PLC controller, a DDC controller, or other controllers.
[0077] Each controller is provided with a first network port and a second network port for connecting each DDC controller to the server in a chain cascade manner. Figure 1 As shown, controller 1 is connected to the server via the first network port (ETH1), connected to the first network port of controller 2 via the second network port (ETH2), and controller 2 is connected to the first network port of controller 3 via the second network port; and so on, so that each controller is connected to the server in a chain cascade manner.
[0078] The cascade network structure of each controller based on the Modbus TCP protocol reduces the complexity of wiring between controllers. The Modbus TCP master is a server or one of the controllers is configured as a Modbus TCP master, and the other controllers are configured as Modbus TCP slaves and AUTBUS masters (CN of the AUTBUS bus) at the same time. The Modbus TCP master and the Modbus TCP slave are addressed based on IP addresses. The IP address of the Modbus TCP master is the IP address of the server or controller where it is located, and the IP address of the Modbus TCP slave is the IP address of the controller where it is located. From the Modbus TCP master to the Modbus TCP slave is the downstream direction, and the Modbus TCP message in this direction is the Modbus TCP downstream message. From the Modbus TCP slave to the Modbus TCP master is the upstream direction, and the Modbus TCP message in this direction is the Modbus TCP upstream message.
[0079] Each controller is also provided with an AUTBUS interface (ATB), which connects M IOM modules through the AUTBUS bus, namely IOM module 1 to IOM module M. Each port of each IOM module is connected to a controlled device, and each IOM module is a slave of the AUTBUS to which it is connected (TN of the AUTBUS bus). The M here is an example, and the M of each controller can be different. The node identification of the AUTBUS bus of each IOM module is obtained according to the device ID of the IOM module, and the device ID of each IOM module is uniquely encoded. Each controller cascades the corresponding IOM modules based on the AUTBUS bus to realize the building control system that integrates the AUTBUS bus and the ModbusTCP protocol. It not only uses the multiple nodes of the AUTBUS bus to increase the number of controlled devices exponentially and reduce the complexity of wiring, but also uses the high-speed and real-time characteristics of the AUTBUS bus to achieve high real-time and reliable control of the controlled devices.
[0080] For ease of description, the IOM module, address mapping table and controlled device connected to the Modbus TCP slave station in this application are respectively the IOM module, address mapping table and controlled device connected to the controller where the Modbus TCP slave station is located, and so on. When the IOM module connected to the Modbus TCP master station, the IOM module, address mapping table and controlled device connected to the Modbus TCP master station are respectively the IOM module, address mapping table and controlled device connected to the controller where the Modbus TCP master station is located, and so on.
[0081] Each controller (including the controller where the Modbus TCP slave station is located) saves a local address mapping table, which is used to implement the mapping relationship between the logical address of the controlled device controlled by the controller in the Modbus TCP message and the device ID of the IOM module to which the controlled device is connected and the IO port connected to the controlled device in the IOM module. Among them, the types of IO ports of each IOM module are divided into digital input port, digital output port, analog input port and analog output port. Each IO port corresponds to a register in the IOM module. The IOM realizes input and output from the IOM port by reading and writing the register. Here, the register is equivalent to the IO port. Some analog input ports and output ports are also called holding registers. The input or output values of these IO ports need to remain unchanged before updating.
[0082] Each IO port of each IOM module is connected to a controlled device, and different IO ports are connected to different controlled devices. In this case, the IO port and the controlled device are equivalent, and the logical address of each controlled device is the logical address of the IO port to which the controlled device is connected. It should be emphasized that the controlled device here may be a field device or a part of a field device. The execution unit in the field device receives control parameters from an IO port in an IOM module and performs an operation. The execution unit is a controlled device. The output unit of the field device feeds back the collected field data to an IO port in an IOM module. The output unit is also a controlled device. If the field device has only one of the execution unit or the output unit, the field device is a controlled device.
[0083] The Modbus TCP master runs the control system's application program, which is used to execute the control logic of the control system and perform the following tasks: The Modbus TCP master sends a control command to each Modbus TCP slave to perform a control operation on the corresponding controlled device of the Modbus TCP slave. The control operation includes one of the following: reading field data from the controlled device (also called a sensor), outputting control data to the controlled device (also called an actuator) to perform an action.
[0084] The Modbus TCP master station and the Modbus TCP slave station execute the working modes of the server and the client. Figure 2 The flow of this working mode is shown in Figure 1. The Modbus TCP master ( Figure 2 The client) starts a request, which is a request for controlling the logical address of Modbus TCP, including making the corresponding controlled device collect data or perform actions. The request includes the function code and data field of the structure in the Modbus TCP message; the Modbus TCP slave station ( Figure 2 The Modbus TCP slave (server) responds to the request, allowing the corresponding controlled device to collect data or perform actions; Figure 2 Server) to Modbus TCP Master ( Figure 2 The client sends a request response, which also includes the function code and data field in the structure in the Modbus TCP message.
[0085] The following introduces a first embodiment of a building control method based on the AUTBUS bus and the Modbus TCP protocol. For the detailed working principles of the controller and the IOM module in the first embodiment of a building control system based on the AUTBUS bus and the Modbus TCP protocol, please refer to the corresponding steps and implementation methods of the first embodiment of a building control method based on the AUTBUS bus and the Modbus TCP protocol.
[0086] A building control method based on AUTBUS bus and Modbus TCP protocol Embodiment 1 Based on the cascade forwarding method, the message interaction between the Modbus TCP master station and the Modbus TCP slave station is realized through the target IP address, and the mapping of the logical address of the controlled device accessed by the Modbus TCP message and the IO port in each IOM module in the AUTBUS network connected to the Modbus TCP slave station is realized based on the address mapping table, thereby realizing unique addressing of each controlled device and controlling the controlled device.
[0087] Figure 3 The flowchart of the first embodiment of a building control method based on AUTBUS bus and Modbus TCP protocol is shown, including steps S110 to S140.
[0088] S110: The Modbus TCP slave station determines whether the destination address of the received Modbus TCP downlink message is the local station.
[0089] When the destination address of the Modbus TCP downlink message received by the Modbus TCP slave station is the local IP address, the Modbus TCP slave station runs steps S120 to S130; when the destination address of the Modbus TCP downlink message received by the Modbus TCP slave station is not the local IP address, the Modbus TCP slave station runs step S140.
[0090] Among them, the application layer of the Modbus TCP master generates control information for controlling the controlled device based on the control logic of the system, and the Modbus TCP downlink message includes the control information. When the Modbus TCP master is a server, the application layer of the control system runs on the server, and the control information is generated on the server. When the Modbus TCP master is a controller, the application layer of the control system runs on the controller, and the control information is generated on the controller. The application layer of the control system determines the IP address of the Modbus TCP slave connected to the IO module to be accessed by the Modbus TCP master, and adds it in the control information.
[0091] The control information is encapsulated based on the structure of the Modbus TCP message, including the IP address of the Modbus TCP slave connected to the IO module to be accessed by the Modbus TCP master, the function code corresponding to the access command of the Modbus TCP master to the IO module, and the data field of the access command of the Modbus TCP master to the IO module. The function code indicates the control function corresponding to the ModbusTCP downlink message, including collecting the field status information of the controlled device or making the controlled device perform control operations, and the data field includes the logical address and business data of the controlled device, and the business data changes according to the function code.
[0092] Among them, the logical address of each controlled device is different from the logical addresses of other controlled devices in the control system. In the entire distributed system, each controlled device can be uniquely addressed through Modbus TCP messages. The logical address here is also called the logical address or bitmap of the IO port of the Modbus TCP protocol.
[0093] After determining that the received control information includes the IP address of the Modbus TCP slave station, the Modbus TCP master station sends a Modbus TCP downlink message including the control information to the Modbus TCP slave station, and the target address of the Modbus TCP downlink message is the IP address of the Modbus TCP slave station.
[0094] S120: The Modbus TCP slave station parses the logical address of the message according to the local address mapping table to obtain the device ID of the IOM module connected to the controlled device accessed by the message and the IO port number connected to the IOM module.
[0095] Among them, each table entry in the address mapping table of each controller (including the controller where the Modbus TCP slave station is located) includes the logical address of a controlled device of the controller and the device ID of the corresponding IOM module connected to the controller by the controlled device, and the IO port number corresponding to the IOM module, indicating the mapping relationship between the logical address of the controlled device and the device ID of the corresponding IOM module connected to the controller by the controlled device, and the IO port number corresponding to the IOM module.
[0096] Among them, the Modbus TCP slave station also parses the function code and the carried business data from the received Modbus TCP downlink message. When the message is to make the controlled device perform a control operation, the business data is the data written to the logical address of the message. When the message is to collect the field status information of the controlled device, the business data is the amount of data to be read, such as the number of registers and the number of coils, and fills in the field data information of the controlled device when feedback is given.
[0097] Among them, in order to facilitate the management of the logical addresses corresponding to the controlled devices in the Modbus TCP messages, in some embodiments, the logical addresses corresponding to the controlled devices in the Modbus TCP messages are globally planned, and the logical addresses of the controlled devices connected to each controller (including the controller where the ModbusTCP slave station is located) are configured in the corresponding segments. In the segment of each slave station, the logical addresses corresponding to each type of IO ports of the IOM module connected to the controller where the slave station is located are configured in the corresponding sub-segment. Compared with automatically generating logical addresses when the control software is compiled, this configuration method facilitates the expansion and deletion of controlled devices controlled by each controller.
[0098] S130: The Modbus TCP slave station encapsulates the parsed device ID and IO port number and the business data carried by the Modbus TCP downstream message into an AUTBUS downstream message according to the function code indication of the Modbus TCP downstream message, and then sends it to the IOM module connected to the controlled device accessed by the message, or processes the business data carried by the Modbus TCP downstream message locally.
[0099] Among them, the AUTBUS downlink message also includes a function code. When the function code is to input data to the logical address (that is, to make the controlled device perform a control operation), the business data read is the data to be input; when the function code is to read data from the logical address (that is, to collect the field data of the controlled device), the business data carried is the data volume. In the Modbus TCP uplink message corresponding to the AUTBUS downlink message that collects the field data of the controlled device, the business data carried is the collected field data.
[0100] In some embodiments, when the function code in the Modbus TCP downstream message indicates writing data to the logical address in the message, the parsed device ID and IO port number are encapsulated with the business data carried by the Modbus TCP downstream message into an AUTBUS downstream message and then sent to the IOM module connected to the controlled device accessed by the message, so that the controlled device performs the corresponding operation action.
[0101] The payload of the AUTBUS downstream message includes the corresponding function code, the IO port number in the corresponding IOM module and the corresponding input data. The AUTBUS downstream message includes the device ID of the parsed IOM module, which is used as the target node identifier of the AUTBUS bus. The IOM module outputs the corresponding input data to the corresponding IO port number in the AUTBUS downstream message according to the corresponding function code in the AUTBUS downstream message, so that the controlled device performs the control operation.
[0102] In some embodiments, when the function code in the Modbus TCP downlink message indicates reading field data and the field status data is not available in the cache of the Modbus TCP slave station, the parsed device ID and IO port number are encapsulated with the business data carried by the Modbus TCP downlink message into an AUTBUS downlink message and then sent to the IOM module connected to the controlled device accessed by the message to read the field data from the controlled device.
[0103] The AUTBUS downstream message includes the corresponding function code, the IO port number in the corresponding IOM module and the amount of data to be collected. The AUTBUS downstream message includes the device ID of the parsed IOM module, which is used as the target node identifier of the AUTBUS bus. The IOM module collects the field data of the controlled device from the corresponding IO port number in the AUTBUS downstream message according to the corresponding function code in the AUTBUS downstream message, and stores it in the corresponding cache of the IOM module.
[0104] In some embodiments, the Modbus TCP slave station acts as a proxy for the IOM module to which it is connected, and sets a cache address for each IO port (equivalent to each logical address) of the IOM module. The Modbus TCP slave station collects field data of related controlled devices through the IOM module to which it is connected, and stores the data in the corresponding cache. When the function code in the Modbus TCP downlink message indicates reading field data and the field status data exists in the cache of the Modbus TCP slave station, the business data carried by the Modbus TCP downlink message is processed locally, including: reading the field data from the cache corresponding to the logical address in the message in the Modbus TCP slave station.
[0105] S140: The Modbus TCP slave station forwards the received Modbus TCP downstream message to the cascaded Modbus TCP slave stations in the downstream direction of the cascade network.
[0106] When the Modbus TCP downlink message is received from the cascaded Modbus TCP slave station in the downlink direction of the cascade network, step S110 is executed until the Modbus TCP downlink message is received and processed by the corresponding Modbus TCP slave station.
[0107] In some embodiments, the Modbus TCP slave station receives an AUTBUS uplink message sent by the IOM module, which includes the device ID and IO port number of the IOM module and the collected field data; the Modbus TCP slave station processes the AUTBUS uplink message locally according to the type of the AUTBUS uplink message, or, according to the address mapping table, converts the device ID and IO port number of the IOM module into a logical address, and then encapsulates the logical address together with the IP address of the Modbus TCP master station and the business data carried by the AUTBUS uplink message into a Modbus TCP uplink message and sends it to the Modbus TCP master station.
[0108] Among them, when the Modbus TCP slave station periodically collects the field data of the corresponding controlled device through the IOM module, the type of the AUTBUS uplink message at this time is a feedback message corresponding to the periodically collected data, and the Modbus TCP slave station processes the AUTBUS uplink message locally, including: saving the field data in a cache corresponding to the logical address of the controlled device set by the Modbus TCP slave station (that is, the logical address of the IO port of the IOM to which the controlled device is connected).
[0109] Among them, when the Modbus TCP slave station collects the field data of the corresponding controlled device in real time through the IOM module, the type of the AUTBUS uplink message corresponds to the feedback message of the real-time collected data. The AUTBUS uplink message is processed locally. The Modbus TCP slave station converts the device ID and IO port number of the IOM module into a logical address according to the address mapping table, and then encapsulates it together with the IP address of the Modbus TCP master station and the data and function code collected in the AUTBUS uplink message into a ModbusTCP uplink message to send it to the Modbus TCP master station. The Modbus TCP uplink message uses the IP address of the Modbus TCP master station as the target address.
[0110] In some embodiments, after receiving a Modbus TCP uplink message, when the Modbus TCP slave station determines that the destination address in the Modbus TCP uplink message is not the local address, the Modbus TCP uplink message is forwarded to the cascaded Modbus TCP slave station in the upstream direction. When it is determined that the destination address is the local address, the Modbus TCP uplink message is processed locally according to the type of the Modbus TCP uplink message, thereby realizing the uplink cascade forwarding of the Modbus TCP uplink message.
[0111] Among them, the Modbus TCP uplink message whose destination address is the Modbus TCP master station is finally forwarded to the Modbus TCP master station through the cascade network step by step. The Modbus TCP uplink message whose destination address is the Modbus TCP slave station is processed after receiving the message.
[0112] The type of the Modbus TCP uplink message processed by the Modbus TCP slave is determined according to the function code in the message, and the Modbus TCP slave processes the message according to the function code and the logical address and data in the data field of the PDU in the Modbus TCP uplink message.
[0113] In some embodiments, when the Modbus TCP master station is one of the controllers in the system, the controller is the master station of AUTBUS. After determining that the control information received from the application layer includes its own IP address, the Modbus TCP master station parses the device ID of the IOM module connected to the accessed controlled device and the IO port number connected to the IOM module from the logical address in the control information according to the local address mapping table; the Modbus TCP master station encapsulates the parsed device ID and IO port number with the business data carried in the control information into an AUTBUS downlink message according to the function code indication in the control information, and then sends it to the IOM module connected to the controlled device accessed by the control information, or processes the business data carried by the control information locally.
[0114] The specific method for the Modbus TCP master to process the control information is the same as that for the Modbus TCP slave. For details, please refer to the processing method of the Modbus TCP slave in steps S120 and S130.
[0115] In some embodiments, the address mapping table of each controller is managed in a unified manner, and the logical address of each controlled device is guaranteed to be unique. The server configures the address configuration information of each controlled device, and the address configuration information of each controlled device includes the logical address of the controlled device, the address of the connected controller, the device ID of the IOM module connected to the controller, and the IO port number in the IOM module; the Modbus TCP master station generates an address mapping table for each controller according to the address configuration information, and sends the address mapping table of the slave station to each Modbus TCP slave station, and each Modbus TCP slave station locally saves the address mapping table of the Modbus TCP slave station. When the Modbus TCP master station is one of the controllers, the Modbus TCP master station also generates and saves its local address mapping table.
[0116] In some embodiments, when a controlled device connected to a Modbus TCP slave station is deleted or added, the server deletes or adds the address configuration information of the controlled device, and the Modbus TCP master station updates the address mapping table of the Modbus TCP slave station to which the control device is connected according to the updated address configuration information, and sends it to the Modbus TCP slave station, and the Modbus TCP slave station saves the updated address mapping table locally. When the Modbus TCP master station is one of the controllers and the controlled device connected to the Modbus TCP master station changes, the server and the master station also perform corresponding configuration updates, and the updated address mapping table is also saved in the Modbus TCP master station.
[0117] The data type of each controlled device may be inconsistent with the data type in the application program of the control system (that is, the type of the data item in the Modbus TCP message). In some embodiments, the address mapping table of each controller also includes the data type of the business data of each logical address in the controller. The data type corresponds to the data type in the Modbus TCP message and is also the data type used by the application layer of the Modbus TCP master. Each controller (including the controller where the Modbus TCP slave is located) converts the acquired field data into the data type of the business data of the corresponding logical address in the address mapping table for use by the application layer of the Modbus TCP master.
[0118] In order to uniformly maintain the logical address corresponding to the controlled device in the Modbus TCP message, the local address mapping table of the slave station is verified. In some embodiments, after each Modbus TCP slave station obtains the local address mapping table and before using the address mapping table, the Modbus TCP master station is also used to send a test message to the Modbus TCP slave station, and the test message is used to read the data of the specific logical address of the Modbus TCP slave station; when the return value of the Modbus TCP slave station is the same as the expected value, it is determined that the address mapping table of the Modbus TCP slave station has passed the verification. Specifically, the specific logical address is the logical address of the IO port that can be read or written in the IOM module or a fixed register used to test a register, first write a value to the IO port, and then read the value from the IO port, and then compare whether the two are consistent.
[0119] In some embodiments, the server is also used to configure the IP address of each controller, including the IP address of the controller as a Modbus TCP master and a Modbus TCP slave, and configure the TCP port of Modbus TCP to establish a communication network of the control system based on the Modbus TCP protocol.
[0120] In some embodiments, the Modbus master station also performs error management. When any Modbus slave station fails to execute the control command as expected or the collected data is abnormal, the Modbus master station performs one of the following management operations: resending the Modbus TCP downlink message including the control command, checking the network connection, and performing fault diagnosis.
[0121] In summary, a building control method embodiment 1 based on AUTBUS bus and Modbus TCP protocol is used for a building control system embodiment 1 based on AUTBUS bus and Modbus TCP protocol. A control system is composed of multiple cascaded controllers based on Modbus TCP protocol, and the message interaction between Modbus TCP master station and ModbusTCP slave station is realized based on the cascade forwarding method. The logical address of the controlled device accessed by Modbus TCP message is mapped to the IO port in each IOM module in the AUTBUS network connected to the Modbus TCP slave station based on the address mapping table, so as to realize the unique addressing of each controlled device, thereby integrating the high reliability and multi-node advantages of AUTBUS bus and the network advantages of compatibility of Modbus TCP protocol, realizing the control of massive controlled devices in complex buildings, which not only reduces the wiring complexity of the building control system, but also improves the real-time and reliability of the building control system.
[0122] Combine the following Figures 4 to 8 A second embodiment of a building control method based on AUTBUS bus and Modbus TCP protocol and a second embodiment of a building control system based on AUTBUS bus and Modbus TCP protocol of the present application are introduced.
[0123] A second embodiment of a building control method based on AUTBUS bus and Modbus TCP protocol is run on the control system described in the second embodiment of a building control system based on AUTBUS bus and Modbus TCP protocol. A second embodiment of a building control system based on AUTBUS bus and Modbus TCP protocol is a detailed implementation of the first embodiment of a building control system based on AUTBUS bus and ModbusTCP protocol, with all its advantages.
[0124] Figure 4 The structure of a second embodiment of a building control system based on AUTBUS bus and Modbus TCP protocol is shown. Figure 1 The server, as the host computer of the control system, configures and manages the control system.
[0125] Each controller is a DDC controller. The master process of the Modbus TCP protocol is deployed on the DDC controller 1 to which the server is physically connected, which is called the Modbus TCP master. Each other DDC controller deploys a slave process of the Modbus TCP protocol, which is called the Modbus TCP slave.
[0126] The server is used to configure the configuration data of the control system, and the configuration data includes at least one of the following: ModbusTCP communication parameters, the device ID of the IOM module connected to the controlled device in the corresponding controller and the corresponding IO port number in the IOM module, and the logical address of each controlled device. The server is also used to send the configuration data to the Modbus TCP master station.
[0127] In some embodiments, the starting address of the logical address in the controller is first configured, and the logical addresses of other controlled devices are generated based on the starting address. The server is also used to obtain the logical address of the controlled device from the starting logical address in the controller that controls the controlled device according to the device ID of the IOM module to which the controlled device is connected, the IO port of the connection port in the IOM module, and the type of the IO port.
[0128] Among them, the Modbus TCP communication parameters include the IP address and TCP port number of each controller, which are used to establish a communication network based on the Modbus TCP protocol for the control system, that is, to set the IP address and TCP port number for the Modbus TCP master station and Modbus TCP slave station.
[0129] The device ID of the IOM module to which the controlled device is connected is used to identify the IO module and is also used to establish the AUTBUS bus to which the IOM module is connected.
[0130] To facilitate the management of the logical addresses corresponding to the controlled devices, the server globally plans the logical addresses corresponding to the controlled devices. The logical addresses corresponding to each controller are configured in the corresponding segments. In the segments of each controller, the logical addresses corresponding to each type of ports of the IOM module connected to the controller are in the corresponding sub-segments.
[0131] The following takes the lighting DDC controller in a certain area on the first floor of the building control system as an example to introduce the process of generating logical addresses.
[0132] (1) First, the Modbus logical address assigned to each controlled device of the lighting DDC controller is 1201XXX, that is, the starting logical address of the DDC controller is 1201000, where the first 1 represents the first floor, 20 represents the area, and the second 1 represents the type of lighting device. The starting logical address of the DDC controller is obtained based on the number of floors, area and function of the building. Different from the traditional Modbus logical address partitioning based on the register type (also called port type) area, this embodiment first partitions based on the DDC controller.
[0133] (2) Assuming that there are at most 100 ports of each type under the lighting DDC controller (or other numbers), 12010XX represents the logical address of the digital input port, 12011XX represents the logical address of the digital output port, 12012XX represents the logical address of the analog input port, and 12013XX represents the logical address of the analog output port; the logical address of each type of port is also called the bitmap of that type of port.
[0134] Each DDC controller is provided with two Ethernet ports and one ATB port. The Ethernet port of each DDC controller is used to form a Modbus TCP protocol network. The ATB port of each DDC controller is connected to each IOM module to form a cascaded AUTBUS network. Each DDC controller is a management node of the AUTBUS network corresponding to the DDC controller, and the IOM module connected to it is a terminal node of the AUTBUS network. The device ID of each IOM module is used to identify the IOM module point in the AUTBUS network.
[0135] The Modbus TCP master runs the control system's application program, which is used to execute the control logic of the control system and perform one of the following tasks: enabling each Modbus TCP slave to perform control operations on the corresponding controlled device and collecting field data from the corresponding controlled device of each Modbus TCP slave.
[0136] The structure definition in the Modbus TCP message is shown in the following table.
[0137]
[0138]
[0139] The Modbus TCP master station also performs error management. When any Modbus TCP slave station fails to execute the control command as expected or the collected data is abnormal, the Modbus TCP master station performs one of the following management operations: resending the Modbus TCP downlink message including the control command, checking the network connection, and performing fault diagnosis.
[0140] The Modbus TCP master station is also used to generate an address mapping table for each DDC controller based on the configuration data generated by the server of the control system, and send the address mapping table of the slave station to each Modbus TCP slave station. The address mapping table of each DDC controller includes the logical address of each controlled device it controls, the device ID of the connected IOM module, the IO port number in the IOM module, and the data type and unit of the input or output data of the IO port (also the data type and unit of the business data corresponding to the logical address).
[0141] When addressing the logical address, each DDC controller uses the local address mapping table to obtain the device ID of the IOM module corresponding to the logical address in the Modbus TCP message and the IO port number of the controlled device connected to the IOM module.
[0142] The Modbus TCP master is also used to verify the local address mapping table of the Modbus TCP slave. The Modbus TCP master sends a test message to any Modbus TCP slave. When the return value of the Modbus TCP slave is the same as the expected value, the address mapping table of the Modbus TCP slave is judged to have passed the verification. The test message is a message that reads the data of the specific logical address of the Modbus TCP slave. A specific port address is saved in each IOM module, and its content is known or obtained according to the agreement, which is used for matching and verification.
[0143] Figure 5 The communication hierarchy of each DDC controller in the control system is shown. Each DDC controller runs a control layer, and sets a communication management layer, a TCP management layer, a TCP protocol stack and an AUTBUS protocol stack, an AUTBUS communication application layer and an AUTBUS management layer.
[0144] The control layer is the application layer of the building control system.
[0145] The communication management layer provides communication management for the control layer and provides a Modbus TCP client interface to the control layer. When the DDC controller acts as a Modbus TCP master, it acts as a client of the TCP management layer. When the DDC controller acts as a Modbus TCP slave, it acts as a server of the TCP management layer.
[0146] The TCP management layer is used to manage TCP / IP stack parameters and implement TCP / IP connection management.
[0147] The TCP / IP protocol stack implements the encapsulation and connection of TCP / IP data packets. The AUTBUS protocol stack implements the encapsulation and connection of AUTBUS data packets.
[0148] The AUTBUS communication application layer provides communication applications for the AUTBUS management layer.
[0149] The AUTBUS management layer is used for AUTBUS connection management and access to IOM modules.
[0150] by Figure 4 In the example of DDC controller 1 (Modbus TCP master) and DDC controller 2 (Modbus TCP slave), the communication process between DDC controllers is described, which includes:
[0151] (1) DDC controller 1 sends the Modbus TCP downlink message to DDC controller 2.
[0152] DDC controller 2 executes a specific control command. DDC controller 1 encapsulates the control command in a ModbusTCP downlink message and sends it to DDC controller 2 via the Modbus TCP network. The message uses the IP address of DDC controller 2 as the target address and includes the logical address of the controlled device.
[0153] (2) The DDC controller 2 converts the Modbus TCP downstream message into an AUTBUS downstream message based on the AUTBUS protocol and sends it to the IOM module.
[0154] Among them, the DDC controller 2 receives and parses the Modbus TCP downstream message sent by the DDC controller 1, and converts the parsed Modbus TCP data into an AUTBUS downstream message that can be recognized by AUTBUS. The AUTBUS downstream message uses the device ID of the IOM module connected to the controlled device as the target node, and the content includes the IO port number connected to the controlled device in the IOM module, the function code and service data parsed from the Modbus TCP downstream message;
[0155] The DDC controller 2 then sends the parsed AUTBUS message to the AUTBUS chip inside the DDC controller 2 through the RGMII interface inside the DDC controller 2;
[0156] The AUTBUS chip then sends the AUTBUS message to the corresponding IOM module through the AUTBUS bus.
[0157] (3) The IOM module device encapsulates the collected data into an AUTBUS uplink message and sends it to the DDC controller 2.
[0158] The IOM module collects the corresponding data and sends it to the AUTBUS chip of the DDC controller 2 through the AUTBUS bus in a periodic or non-periodic manner;
[0159] Among them, the AUTBUS chip of DDC controller 2 forwards the received message to the internal RGMII interface;
[0160] The DDC controller 2 then parses the data into a Modbus TCP uplink message and sends it to the DDC controller 1 again.
[0161] Continue with Figure 2 Taking DDC controller 1 (master station) and DDC controller 2 (slave station) as an example, the process of addressing the controlled device in this embodiment is described, which includes:
[0162] (1) Device Modbus level addressing.
[0163] The DDC controller 1 establishes a connection by specifying the IP address and port number of the DDC controller 2. Each DDC controller has a unique IP address in the network, and the DDC controller 1 can identify and access the DDC controller 2 according to the IP address of the DDC controller 2.
[0164] (2) Device AUTBUS level addressing.
[0165] The DDC controller 2 obtains the device ID of the IOM module connected to the controlled device and the IO port connected in the IOM module according to the logical address in the Modbus downlink message received from the DDC controller 1.
[0166] Among them, the IOM module is divided according to the physical layout and function of the system to determine the hierarchical structure of the equipment. For example, the entire building control system can be divided into different floors, each floor is divided into different areas, each area contains multiple devices, and then distributed to different DDC controllers and different IOM modules. The device ID of the IOM module is used for AUTBUS level addressing. A fixed device address is saved in each IOM module device, which is used to match and verify the address transmitted from the Modbus level.
[0167] (3) Device IO port address allocation and addressing.
[0168] Among them, after each IOM module receives the downlink AUTBUS message sent by the connected DDC controller, it obtains the IO port ID, control command function code and business data of the controlled device in the IOM module, and reads or writes the IO port according to the control function code to complete the control operation on the controlled device.
[0169] The following introduces a second embodiment of a building control method based on the AUTBUS bus and the Modbus TCP protocol. It runs in a second embodiment of a building control system based on the AUTBUS bus and the Modbus TCP protocol. It is a detailed implementation method of the first embodiment of the building control method based on the AUTBUS bus and the Modbus TCP protocol, and has all its advantages.
[0170] Figure 6 The flowchart of Embodiment 2 of a building control method based on AUTBUS bus and Modbus TCP protocol is shown, including steps S610 to S660.
[0171] S610: Configure a converged communication network.
[0172] The fusion communication network is a fusion network of AUTBUS bus and Modbus TCP protocol. This step includes the following processes:
[0173] (1) The server determines the Modbus TCP master.
[0174] The server determines the Modbus TCP master and Modbus TCP slave, and determines that DDC controller 1 is the Modbus TCP master.
[0175] (2) The server determines the Modbus TCP network.
[0176] The server configures the IP address, TCP port number (Modbus TCP502), communication timeout, retry times and other communication parameters of each DDC controller of Modbus TCP, and sends them to the DDC controller master station to establish a Modbus TCP network and cascade each DDC controller.
[0177] (3) The server determines the AUTBUS network
[0178] The server configures the node identification of the IOM module under each DDC controller on the AUTBUS bus and the AUTBUS bus identification of each DDC controller. The node identification of the IOM module corresponds to the device ID and is sent to the DDC controller master station.
[0179] S620: Establish a logical address mapping relationship.
[0180] First, the server configures the device ID of the IOM module to which the controlled device is connected, the port ID of the corresponding IO port in the IOM module, and configures the starting address of the logical address of each type of IO port of each controller.
[0181] Then, the server obtains the logical address of each controlled device according to the starting address of the logical address of each type of IO port of each controller, the device ID of the IOM module to which the controlled device is connected, and the corresponding IO port in the IOM module, and sends the device ID, IO port number and logical address of the IOM module to which each controlled device is connected to the Modbus TCP master station.
[0182] Then, the Modbus TCP master creates an address mapping table for each DDC controller according to the device ID, IO port number and logical address of the IOM module to which each controlled device is connected, and adds the data type and unit of each controlled device to the address mapping table; the Modbus TCP master also sends the address mapping table of each Modbus TCP slave to the Modbus TCP slave.
[0183] Finally, when the converged communication network is established, the Modbus TCP master station also sends a test message to each Modbus TCP slave station. When the return value of the Modbus TCP slave station is the same as the expected value, the address mapping table of the Modbus TCP slave station is judged to have passed the verification. The test message is a message for reading the data of the specific logical address of the Modbus TCP slave station. A specific port address is saved in each IOM module, and its content is known or obtained according to the agreement for matching and verification.
[0184] S630: Start the converged communication network.
[0185] This step includes the following processes:
[0186] (1) Each DDC controller starts the Modbus TCP protocol stack to establish a Modbus TCP network and cascade each DDC controller.
[0187] (2) The Modbus TCP master sends communication parameters such as communication timeout and number of retries to each Modbus TCP slave to ensure the stability and reliability of communication.
[0188] (3) Each DDC controller and each IOM module starts the AUTBUS protocol stack to establish an AUTBUS network under each controller. In each AUTBUS network, the DDC controller is the management node and each IOM module is the terminal node.
[0189] S640: Modbus TCP master operation control strategy.
[0190] The Modbus TCP master runs the control strategy of the control system and sends the corresponding execution logic to the corresponding Modbus TCP slave. The control strategy of the control system is as follows.
[0191] (1) Data collection.
[0192] The Modbus TCP master sends control commands for data collection to each Modbus TCP slave based on the execution logic of the control system. The control commands are sent via Modbus TCP messages, including the logical address of the device being collected. When the cache corresponding to the logical address of the controlled device in the Modbus TCP slave already has the field data of the controlled device, it is obtained from the cache.
[0193] For example, the environmental parameters such as temperature, humidity, light intensity, etc. currently measured by the sensor are collected, as well as the operating status information of the equipment, such as the operating mode of the air conditioner, the speed of the fan, etc.
[0194] (2) Coordinated control decision-making.
[0195] Modbus TCP is based on the execution logic of the control system and decides whether to trigger the control of the controlled device controlled by the corresponding Modbus TCP slave station according to the collected data.
[0196] For example, if the temperatures of multiple zones exceed the set thresholds, the Modbus TCP master decides to increase the cooling power of the air conditioners at the same time, which requires sending control commands to the corresponding Modbus TCP slaves.
[0197] (3) Event trigger control.
[0198] In addition to regular data collection and control, the Modbus TCP master can also set up event trigger mechanisms. For example, when a DDC controller detects a fire alarm signal, the Modbus TCP master immediately sends emergency control commands to all related DDC controllers, such as shutting down ventilation equipment, turning on emergency lighting, etc. The DDC controller then performs corresponding processing operations based on the received instructions and sends them to the IOM. This event-triggered control can improve the security and emergency response capabilities of the building control system.
[0199] S650: Modbus TCP master station executes control and Modbus TCP slave station feedback results.
[0200] Figure 7 The detailed flow of the Modbus TCP master station executing control in this step is shown, including steps S710 to S780. Take collecting field data from a controlled device as an example.
[0201] S710: The application layer sends control information.
[0202] The application layer of the control system runs on the Modbus TCP master station, which generates control command information based on the linkage control decision and sends it to the DDC controller master station. The control information is encapsulated based on the Modbus TCP structure, including the corresponding controller address (when the controller is a Modbus TCP slave station, the address is the Modbus TCP slave station address), the corresponding function code, the logical address of the corresponding controlled device controlled by the controller, and the data to be written.
[0203] Among them, when the Modbus TCP master station is a server, the application layer of the control system runs on the server, and the control information is generated on the server. When the Modbus TCP master station is a DDC controller, the application layer of the control system runs on the DDC controller, and the control information is generated on the DDC controller.
[0204] For example, the function code may be to adjust the air conditioner temperature setting, turn on or off a lighting device, control the fan speed, etc.
[0205] S720: The Modbus TCP master generates a Modbus TCP downstream message.
[0206] This step includes the following processes:
[0207] (1) The Modbus TCP master obtains the IP address of the Modbus TCP slave from the control information;
[0208] (2) Modbus TCP generates a Modbus TCP downlink message based on the control information, wherein the structure thereof includes the control information to determine the IP address of the Modbus TCP slave as the target address.
[0209] S730: The Modbus TCP master sends a Modbus TCP downstream message.
[0210] The Modbus TCP master sends the Modbus TCP downlink message to the Modbus TCP slave through the cascade network according to the IP address of the Modbus TCP slave.
[0211] Among them, each Modbus TCP slave station in the cascade network determines whether the destination address of the received Modbus TCP downlink message is the local machine; when the Modbus TCP slave station determines that the destination address is the local IP address, step S740 is executed; when it is determined that the destination address is not the local IP address, forwarding continues to the next cascaded Modbus TCP slave station.
[0212] S740: Modbus TCP slave performs address mapping, generates and sends AUTBUS downstream messages.
[0213] Wherein, if the Modbus TCP slave station stores the field data of the controlled device, step S770 is directly executed. In this embodiment, if the Modbus TCP slave station does not store the field data of the controlled device, the field data is collected from the controlled device through the IOM module, and this step includes the following process:
[0214] (1) The Modbus TCP slave receives the downlink Modbus TCP message sent to itself from the cascaded DDC controller network according to its IP address.
[0215] (2The Modbus TCP slave uses the local address mapping table to obtain the device ID of the IOM module connected to the controlled device and the IO port connected in the IOM module according to the logical address in the message.
[0216] (3) The Modbus TCP slave generates an AUTBUS downlink message, which includes the IO port to which the controlled device is connected, the function code, and the amount of data read in.
[0217] (4) The Modbus TCP slave generates a target node identifier according to the device ID of the IOM module to which the control device is connected, and the IOM module sends an AUTBUS downlink message.
[0218] S750: The IOM module collects the on-site data of the controlled equipment.
[0219] The IOM module receiving the AUTBUS downlink message collects the field data of the controlled device from the IO port in the message according to the function code in the message.
[0220] S760: The IOM module sends an AUTBUS uplink message to feedback the field data.
[0221] The IOM module encapsulates the collected field data, the corresponding function code and the IO port connected to the controlled device in the AUTBUS uplink message, and sends it to the Modbus TCP slave station with the target node identifier generated by the device ID of the IOM module as the source node identifier.
[0222] S770: Modbus TCP slave feedback result.
[0223] This step includes the following processes:
[0224] (1) The Modbus TCP slave obtains the device ID, IO port, collected field data, and function code of the IOM module connected to the controlled device based on the received AUTBUS uplink message.
[0225] (2) The Modbus TCP slave obtains the corresponding logical address based on the local address mapping table using the parsed device ID and IO port.
[0226] (3) The Modbus TCP slave generates the PDU in the Modbus TCP uplink message according to the logical address, the collected field data, and the function code, and encapsulates it in the Modbus TCP uplink message together with the Modbus TCP master IP address, and sends it to the Modbus TCP master with the Modbus TCP master IP address as the target address. The Modbus TCP slave feeds back the execution result to the DDC controller master through the Modbus TCP uplink message, and performs data type conversion when the data type of the feedback result is inconsistent with the data defined in the address mapping table.
[0227] (4) When other Modbus TCP slave stations receive the Modbus TCP uplink message through the cascade network, if it is determined that the destination address in the Modbus TCP uplink message is not the local address, the Modbus TCP uplink message is forwarded to the cascaded Modbus TCP slave stations in the upstream direction. If it is determined that the destination address is the local address, the Modbus TCP uplink message is processed locally according to the type of the Modbus TCP uplink message.
[0228] S780: The Modbus TCP master station feeds back the result to the application layer.
[0229] The Modbus TCP master obtains the Modbus TCP structure in the Modbus TCP uplink message and feeds it back to the application layer.
[0230] S660: Modbus TCP master for continuous monitoring and maintenance.
[0231] Among them, the Modbus TCP master station monitors the status of the controlled equipment and the communication quality with the Modbus TCP slave station in real time, and regularly checks the accuracy of the address mapping relationship and performs necessary updates and maintenance.
[0232] (1) Real-time monitoring: The Modbus TCP master continuously monitors the status of each Modbus TCP slave and the communication quality with each Modbus TCP slave to ensure the effectiveness of linkage control; and continuously monitors the environmental parameters and equipment operating status of each controlled device.
[0233] (2) Feedback adjustment: If the Modbus TCP master finds that a Modbus TCP slave does not execute the control command as expected, or the collected data is abnormal, the Modbus TCP master can take corresponding measures to make adjustments. For example, resending the control command, checking the network connection, and performing fault diagnosis to ensure the stable operation of the system.
[0234] Figure 8 The flow of Modbus TCP master error management is shown.
[0235] When the Modbus TCP stack of the Modbus TCP master times out while waiting for a response from the Modbus TCP slave or finds a frame error while processing a response, error processing is performed, and the error processing performs one of the following processes: resending a Modbus TCP downlink message including a control command to the Modbus TCP slave, checking the network connection, performing fault diagnosis, etc., to ensure stable operation of the system.
[0236] The effects of this embodiment are described below in combination with four scenarios.
[0237] Scenario 1: The building control system is used to link indoor temperature with the air conditioning / ventilation system.
[0238] (1) Scenario description:
[0239] When the temperature of a certain office area rises, the DDC controller in that area obtains the temperature change of that area through the AUTBUS bus, and first adjusts the air conditioning equipment in that area to increase the cooling power to reduce the temperature. At the same time, if the DDC controller in the adjacent area also detects that the temperature is rising, it may adjust the air conditioning equipment in advance to prevent the temperature from rising further.
[0240] (2) Implementation method:
[0241] The Modbus TCP master detects temperature changes: When the Modbus TCP master detects a temperature rise in a certain office area (Area A) through the fusion network of the Modbus TCP protocol and the AUTBUS bus, it informs the Modbus TCP slaves in the area through the fusion network to adjust the cooling power of the air-conditioning equipment to reduce the indoor temperature.
[0242] Air conditioning adjustment in adjacent areas: At the same time, the Modbus TCP master determines through logical association that the adjacent area (area B) may be affected by the temperature change in area A, so it notifies the Modbus TCP slave in area B through the fusion network to adjust the operating mode of the air conditioning equipment: if the temperature in area B also starts to rise, the air conditioning equipment is adjusted in advance to prevent the temperature from rising further.
[0243] Ventilation system start: If the temperature continues to rise, the Modbus TCP master can coordinate multiple Modbus TCP slaves through the converged network to start the ventilation system, increase air circulation, and help lower the temperature. For example, when the temperature in the office area is too high, not only will the Modbus TCP slaves in the office area increase the cooling of the air conditioner, but the Modbus TCP slaves in the adjacent conference rooms and rest areas will also adjust the air conditioning settings according to the temperature change trend. The ventilation system of the entire floor may be started to lower the temperature by introducing fresh air from the outside.
[0244] Scenario 2: Building control system is used to link light intensity with curtain / shading system.
[0245] (1) Scenario description: When the light intensity in a certain area changes, not only does the IOM module connected to the Modbus TCP slave in that area need to adjust the lighting equipment, but the Modbus TCP slaves in adjacent areas may also need to adjust the opening and closing of the curtains or the operating mode of the air conditioner according to the light conditions.
[0246] (2) Implementation method:
[0247] When the Modbus TCP master detects that the light intensity in a certain office area (Area A) decreases through the fusion network of the Modbus TCP protocol and the AUTBUS bus, the Modbus TCP slave in the area adjusts the brightness of the indoor lighting equipment through the fusion network to keep the indoor light comfortable.
[0248] At the same time, the Modbus TCP station determines through logical association that the adjacent area (area B) may be affected by the changes in light in area A, so it notifies the Modbus TCP slave station in area B through the fusion network to adjust the opening and closing degree of the curtains. If the light in area B is too strong, the curtains are closed to reduce the natural light entering; if the light in area B is weak, the curtains are opened to increase the entry of natural light.
[0249] In addition, if the light intensity in zone A decreases, causing the indoor temperature to rise, the Modbus TCP master can also adjust the operation mode of the air conditioner through the Modbus TCP slaves in zones A and B to maintain a suitable room temperature.
[0250] Scenario 3: Building control system used to link personnel flow and ventilation system
[0251] (1) Scenario description: When the flow of people on a certain floor increases, the ventilation system of that floor and its adjacent floors needs to be adjusted.
[0252] (2) Implementation method:
[0253] The Modbus TCP master station uses the fusion network of the Modbus TCP protocol and the AUTBUS bus to detect the increase in the flow of people on a certain floor (Floor C) through sensors. Then, the IOM module connected to the Modbus TCP slave station on this floor increases the operating frequency of the ventilation equipment to ensure air circulation and quality.
[0254] As the increase in human traffic may affect the air quality of the adjacent floor (D floor), the Modbus TCP slave notifies the DDC controller slave on the D floor through logical association to adjust the working status of its ventilation equipment and increase the number of air changes.
[0255] If the increase in the flow of people on the C floor causes the indoor temperature to rise, the Modbus TCP master station can also adjust the air conditioning operation mode of the C and D floors to maintain a suitable temperature level.
[0256] Scenario 4: Building control system is used to link safety systems in emergency situations
[0257] (1) Scenario description: In the event of an emergency such as a fire, people need to be evacuated quickly and measures need to be taken to prevent the fire from spreading.
[0258] (2) Implementation method:
[0259] After receiving the fire alarm signal using the fusion network of Modbus TCP protocol and AUTBUS bus, the Modbus TCP master station immediately closes all vents and fire doors through the corresponding IOM modules via the Modbus TCP slave stations in the affected area to prevent the spread of smoke.
[0260] At the same time, the Modbus TCP master notifies the Modbus TCP slaves in the affected area and surrounding areas through the fused network to start the emergency lighting through the corresponding IOM modules, and adjusts the elevator to a safe floor, prohibiting further use to ensure the safe evacuation of personnel.
[0261] If necessary, the master station can also adjust the air conditioning system through the relevant Modbus TCP slave station through the corresponding IOM module to reduce the oxygen concentration in the fire source area and slow down the spread of the fire.
[0262] In the above four scenarios, the control strategy of the Modbus TCP master station is used to realize the collaborative work between multiple Modbus TCP slave stations and multiple IOM modules to achieve the purpose of overall optimization. Through this linkage control mechanism, the building control system can respond to temperature changes more intelligently, not only adjusting the air conditioning equipment in time, but also starting the ventilation system in time to ensure the comfort of the indoor environment and the efficiency of energy use.
[0263] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present application, all of which belong to the scope of protection of the present application.
Claims
1. A building control method based on AUTBUS bus and Modbus TCP protocol, characterized in that: A building control system is formed by a plurality of cascaded controllers, the Modbus TCP master station is a server or one of the controllers in the system, the other controllers are both Modbus TCP slave stations and AUTBUS master stations, each controller is connected to a plurality of IOM modules via the AUTBUS bus, and each port of each IOM module is connected to a controlled device, the method comprising: The Modbus TCP slave determines whether the destination address of the received Modbus TCP downlink message is the local machine; When the Modbus TCP slave determines that the destination address is the local IP address, it parses the logical address of the message according to the local address mapping table to obtain the device ID of the IOM module connected to the controlled device accessed by the message and the IO port number connected to the IOM module; The Modbus TCP slave station encapsulates the parsed device ID and IO port number and the business data carried by the Modbus TCP downstream message into an AUTBUS downstream message according to the function code indication of the Modbus TCP downstream message, and then sends it to the IOM module connected to the controlled device accessed by the message, or processes the business data carried by the Modbus TCP downstream message locally.
2. The method according to claim 1, characterized in that: The method further comprises: The Modbus TCP slave station receives the AUTBUS uplink message sent by the IOM module to include the device ID and IO port number of the IOM module and the collected field data; The Modbus TCP slave processes the AUTBUS upstream message locally according to the type of the AUTBUS upstream message, or, according to the address mapping table, converts the device ID and IO port number of the IOM module into a logical address, and then encapsulates it together with the IP address of the Modbus TCP master and the business data carried by the AUTBUS upstream message into a Modbus TCP upstream message and sends it to the ModbusTCP master.
3. The method according to claim 1, characterized in that: The method further comprises: When the function code in the Modbus TCP downlink message indicates writing data to the logical address in the message, encapsulating the device ID and the IO port number with the service data into the AUTBUS downlink message and then sending it to the IOM module connected to the controlled device accessed by the message; When the function code in the Modbus TCP downlink message indicates reading field data, the business data carried by the Modbus TCP downlink message is processed locally, including: reading the field data from a cache corresponding to a logical address in the message in the Modbus TCP slave station.
4. The method according to claim 1, characterized in that: The method further comprises: The Modbus TCP master station receives control information generated by the application layer based on the system control logic, wherein the control information is encapsulated based on the structure of the Modbus TCP message; After determining that the control information includes the IP address of the Modbus TCP slave station, the Modbus TCP master station sends a Modbus TCP downlink message including the control information to the Modbus TCP slave station.
5. The method according to claim 2, characterized in that: After receiving the Modbus TCP uplink message, the Modbus TCP slave station determines that the destination address in the Modbus TCP uplink message is not the local address, and forwards the Modbus TCP uplink message to the cascaded Modbus TCP slave station in the upstream direction. When it is determined that the destination address is the local address, the Modbus TCP uplink message is processed locally according to the type of the Modbus TCP uplink message.
6. The method according to claim 1, characterized in that: The method further comprises: The server configures address configuration information of each controlled device, where the address configuration information of each controlled device includes a logical address of the controlled device, a connected controller, a device ID of an IOM module connected to the controller, and an IO port number in the IOM module; After generating an address mapping table for each controller according to the address configuration information, the Modbus TCP master station sends the address mapping table of each Modbus TCP slave station to the slave station.
7. The method according to claim 6, characterized in that: The address mapping table of each controller also includes a data type of the service data of each logical address in the controller, and the method further includes: Each Modbus TCP slave converts the acquired field data into the data type of the business data of the corresponding logical address in the address mapping table.
8. The method according to claim 6, characterized in that: The method further comprises: After each Modbus TCP slave station obtains a local address mapping table and before using the address mapping table, the Modbus TCP master station sends a test message to the Modbus TCP slave station, wherein the test message is used to read data of a specific logical address of the Modbus TCP slave station; When the return value of the Modbus TCP slave station is the same as the expected value, it is determined that the address mapping table of the Modbus TCP slave station passes the verification.
9. The method according to claim 1, characterized in that: The logical addresses of the controlled devices connected to each controller are configured in the corresponding segments, and the logical addresses corresponding to each type of IO port in the segments of each controller are configured in the corresponding sub-segments.
10. A building control system based on AUTBUS bus and Modbus TCP protocol, characterized in that: include: Server, several cascaded controllers using Modbus TCP protocol, each controller is connected to several IOM modules via AUTBUS bus, each IO port of each IOM module is connected to a controlled device; the Modbus TCP master is the server or one of the controllers is configured as Modbus TCP master, and the other controllers are configured as Modbus TCP slaves and AUTBUS masters at the same time; The Modbus TCP slave station is used to determine whether the destination address of the received Modbus TCP downstream message is the local machine, and when it is determined that the destination address of the received Modbus TCP downstream message is the local IP address, the device ID of the IOM module connected to the controlled device accessed by the message and the IO port number connected to the IOM module are parsed from the logical address of the message according to the local address mapping table; The Modbus TCP slave station is also used to encapsulate the parsed device ID and IO port number and the business data carried by the Modbus TCP downstream message into an AUTBUS downstream message according to the function code indication of the Modbus TCP downstream message, and then send it to the IOM module connected to the controlled device accessed by the message, or to locally process the business data carried by the Modbus TCP downstream message.