Control apparatus, control method, and storage medium
By introducing connection units and bus units into the control device and using gateways for information exchange, the problems of motor starter communication address allocation and protocol adaptation are solved, which improves work efficiency and reduces costs.
Patent Information
- Application Number
- CN202311403224.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2025-04-29
AI Technical Summary
In the scenario where a large number of motor starters are configured, how to effectively allocate communication addresses and implement communication protocol adaptation solves the problems of excessive system cost and excessive bus data throughput.
By introducing multiple connection units and bus units into the control device, information exchange is performed using the gateway. The bus unit automatically obtains the bus address by acquiring the position identification of the connection unit, realizing information exchange between the bus unit and the controller.
It improves the work efficiency of installation, debugging and maintenance, realizes rapid replacement of bus units and flexible adaptation of multiple communication protocols, reduces the total system cost and improves communication timeliness.
Smart Images

Figure CN119902458A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of electrical devices, and in particular, to a control device, a control method, and a storage medium. Background Art
[0002] With the development of power electronics technology, circuit breakers, contactors, and motor protectors are integrated into one device (e.g., motor starter), thereby reducing the size of the system. In this case, each motor starter communicates with a control device (e.g., a programmable logic controller (PLC)) for automated control and monitoring via a bus. In the scenario of configuring a large number of motor starters, how to allocate communication addresses internally and how to adapt communication protocols externally are issues that need to be resolved. Summary of the invention
[0003] Embodiments of the present disclosure provide a control device, a control method, and a storage medium.
[0004] In a first aspect of the present disclosure, a control device is provided. The device includes: a plurality of connection units, respectively connected to a bus in the control device; one or more bus units, wherein each of the one or more bus units is configured to obtain a bus address for the bus corresponding to a connection unit in the plurality of connection units in response to being connected to the connection unit; and a gateway, connected to the bus and adapted to communicate with a controller, and the gateway is configured to perform information exchange between the controller and the one or more bus units based on the corresponding bus addresses of the one or more bus units.
[0005] In some embodiments of the first aspect, multiple connection units are configured to store corresponding location identifiers, wherein the location identifier stored by each of the multiple connection units is related to the location of the connection unit in the control device, and wherein each of the one or more bus units is configured to obtain a bus address for a bus corresponding to the connection unit in the following manner: obtaining the location identifier stored by the connection unit to which it is connected; and converting the obtained location identifier into a bus address.
[0006] In some embodiments of the first aspect, each of the one or more bus units is further configured to store the acquired location identifier.
[0007] In some embodiments of the first aspect, the gateway is also configured to: in response to the first bus unit being connected to a first connection unit among multiple connection units, obtain a first location identifier stored by the first bus unit; and verify the consistency of the first location identifier with a second location identifier stored by the first connection unit.
[0008] In some embodiments of the first aspect, the gateway is further configured to: in response to the first location identifier being inconsistent with the second location identifier, present first prompt information via the first bus unit, the first prompt information indicating a connection error of the first bus unit.
[0009] In some embodiments of the first aspect, the gateway is further configured to: maintain a mapping relationship between corresponding bus addresses of one or more bus units and corresponding unit identifications of one or more bus units, and the corresponding unit identifications are used by the controller.
[0010] In some embodiments of the first aspect, the gateway is configured to perform information exchange in the following manner: receiving a data access instruction from a controller, the data access instruction including a target unit identifier of a bus unit to be accessed and a first storage address of data to be accessed; determining a target bus address corresponding to the target unit identifier from the corresponding bus address based on a mapping relationship; converting the first storage address into a second storage address suitable for the bus; and executing the data access instruction according to the target bus address and the second storage address.
[0011] In some embodiments of the first aspect, the gateway is further configured to: obtain corresponding operation data in one or more bus units based on corresponding bus addresses of one or more bus units; store the corresponding operation data in the gateway according to the corresponding bus addresses of one or more bus units and the storage address of the operation data applicable to the bus in the corresponding bus unit; and wherein the gateway is configured to execute the data access instruction in the following manner: read the operation data corresponding to the target bus address and the second storage address from the stored corresponding operation data; and send the read operation data to the controller.
[0012] In some embodiments of the first aspect, the gateway is further configured to: obtain corresponding setting information of one or more bus units via the bus; and store the corresponding setting information of the one or more bus units.
[0013] In some embodiments of the first aspect, the gateway is also configured to: in response to determining that a second bus unit connected to a second connection unit among multiple connection units is replaced by a third bus unit, determine whether a model of the third bus unit matches a model of the second bus unit; in response to determining that the model of the third bus unit does not match the model of the second bus unit, present second prompt information indicating a model mismatch via the third bus unit; and in response to determining that the model of the third bus unit matches the model of the second bus unit, configure the third bus unit based on the stored setting information of the second bus unit.
[0014] In some embodiments of the first aspect, the gateway includes a plurality of circuit boards respectively adapted for different communication protocols, and the gateway is further configured to switch between the plurality of circuit boards according to the communication protocol between the gateway and the controller.
[0015] In a second aspect of the present disclosure, a control method is provided. The method includes: each of one or more bus units acquires a bus address for a bus corresponding to a connection unit among a plurality of connection units in response to being connected to the connection unit; and a gateway performs information exchange between a controller and the one or more bus units based on the corresponding bus addresses of the one or more bus units.
[0016] In some embodiments of the second aspect, multiple connection units store corresponding location identifiers, wherein the location identifier stored by each of the multiple connection units is related to the location of the connection unit in the control device, and wherein each of the one or more bus units obtains a bus address for the bus corresponding to the connection unit in the following manner: obtaining the location identifier stored by the connection unit to which it is connected; and converting the obtained location identifier into a bus address.
[0017] In some embodiments of the second aspect, each of the one or more bus units further stores the obtained location identifier.
[0018] In some embodiments of the second aspect, the method also includes: the gateway obtains a first location identifier stored in the first bus unit in response to the first bus unit being connected to a first connection unit among multiple connection units; and verifies the consistency of the first location identifier with the second location identifier stored in the first connection unit.
[0019] In some embodiments of the second aspect, the method further includes: in response to the first location identifier being inconsistent with the second location identifier, the gateway presents first prompt information via the first bus unit, wherein the first prompt information indicates a connection error of the first bus unit.
[0020] In some embodiments of the second aspect, the method further includes: the gateway maintaining a mapping relationship between corresponding bus addresses of one or more bus units and corresponding unit identifications of one or more bus units, and the corresponding unit identifications are used by the controller.
[0021] In some embodiments of the second aspect, the gateway performs information exchange in the following manner: receiving a data access instruction from a controller, the data access instruction including a target unit identifier of a bus unit to be accessed and a first storage address of data to be accessed; determining a target bus address corresponding to the target unit identifier from the corresponding bus address based on a mapping relationship; converting the first storage address into a second storage address suitable for the bus; and executing the data access instruction according to the target bus address and the second storage address.
[0022] In some embodiments of the second aspect, the method also includes: the gateway obtains corresponding operation data in one or more bus units based on the corresponding bus addresses of the one or more bus units; stores the corresponding operation data in the gateway according to the corresponding bus addresses of the one or more bus units and the storage address of the operation data applicable to the bus in the corresponding bus unit; and wherein the gateway executes the data access instruction in the following manner: reads the operation data corresponding to the target bus address and the second storage address from the stored corresponding operation data; and sends the read operation data to the controller.
[0023] In some embodiments of the second aspect, the method further includes: the gateway acquiring corresponding setting information of one or more bus units via the bus; and the gateway storing the corresponding setting information of the one or more bus units.
[0024] In some embodiments of the second aspect, the method also includes: in response to determining that a second bus unit connected to a second connection unit among the multiple connection units is replaced by a third bus unit, the gateway determines whether a model of the third bus unit matches a model of the second bus unit; in response to determining that the model of the third bus unit does not match the model of the second bus unit, the gateway presents second prompt information indicating a model mismatch via the third bus unit; and in response to determining that the model of the third bus unit matches the model of the second bus unit, the gateway configures the third bus unit based on the stored setting information of the second bus unit.
[0025] In some embodiments of the second aspect, the gateway includes a plurality of circuit boards respectively adapted for different communication protocols, and the method further includes: the gateway switching between the plurality of circuit boards according to the communication protocol between the gateway and the controller.
[0026] In a third aspect of the present disclosure, a machine-readable storage medium is provided, wherein a program is stored on the machine-readable storage medium, and the program can be executed by a processor to implement the method of the third aspect.
[0027] It will be understood from the following description that, according to an embodiment of the present disclosure, a communication scheme for obtaining a bus address via a connection unit is provided for a bus unit. The bus unit can work after being connected to the connection unit and powered on, saving the time of configuring the bus address. In this way, the work efficiency of installation, debugging, and maintenance can be improved. Other benefits will be described below in conjunction with the corresponding embodiments.
[0028] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0030] Figure 1 A schematic diagram of a unit of a control device according to some embodiments of the present disclosure is shown;
[0031] Figure 2A and Figure 2B A schematic diagram of a topological structure of a control device according to some embodiments of the present disclosure is shown;
[0032] Figure 3 A schematic diagram showing internal and external communication interactions of a control device according to some embodiments of the present disclosure is shown;
[0033] Figure 4 A schematic diagram showing an example of data aggregation according to some embodiments of the present disclosure; and
[0034] Figure 5 A flow chart of an example control method according to some embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0035] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0036] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.
[0037] As briefly mentioned above, circuit breakers, contactors, and motor protectors can be integrated into one motor starter. A motor control cabinet (e.g., a motor control center MCC) can include several (e.g., 8-16) motor starters. Each motor starter can communicate with the PLC device via the physical protocol interface of the motor protector. With the development of power electronics technology, the motor control cabinet can be equipped with more motor starters, such as 64. In this case, each motor starter is connected to the communication port of the PLC device through a bus, which will face many problems. For example, each motor starter needs to implement a communication protocol adapted to different PLC devices, which results in too high a total system cost. For another example, the existing bus communication protocol is used to support the communication between a large number of motor starters and PLC devices, and the bus data throughput is too high, which greatly affects the overall communication timeliness.
[0038] The above text describes the problem of configuring a large number of bus units for a control device by taking a control device as a motor control cabinet and a bus unit as a motor starter as an example. In order to solve or at least partially solve such a problem, an embodiment of the present disclosure provides a communication scheme for obtaining a bus address for a bus unit via a connection unit. The bus unit can work after being connected to the connection unit and powered on, saving the time of configuring the bus address.
[0039] According to an embodiment of the present disclosure, a control device includes a plurality of connection units, one or more bus units, and a gateway. The plurality of connection units are respectively connected to a bus in the control device. Each bus unit is connected to a connection unit and is configured to obtain a bus address for a bus corresponding to the connection unit in response to being connected to a connection unit. The gateway is connected to the bus and is suitable for communicating with the controller, and the gateway is configured to perform information exchange between the controller and the bus unit based on the corresponding bus address of the bus unit. In this way, the work efficiency of installation, commissioning, and maintenance can be improved.
[0040] Some example embodiments of the present disclosure will be described below with reference to the accompanying drawings. Please note that in some descriptions of the embodiments, certain specific values may be involved in order to better help readers understand. These values are exemplary and may vary according to specific application scenarios, and do not limit the scope of the present disclosure in any way.
[0041] The following will be combined Figure 1 Description includes a schematic diagram of a control device according to some embodiments of the present disclosure, combined with Figure 2A and Figure 2B To describe an example topology of a control device, combined with Figure 3 A schematic diagram is provided to describe the internal and external communication interaction of the control device.
[0042] First reference Figure 1 , the control device 100 may include a plurality of connection units 120. The connection unit 120 may include, for example, a slot, an interface or a port to connect to the bus unit 110. The bus unit 110 may include various suitable devices required in the control device 100. In some embodiments, the bus unit 110 may be implemented in the form of a drawer, and therefore may also be referred to as a drawer. Accordingly, the control device 100 may also be referred to as a drawer cabinet. In some embodiments, the control device 100 may be a motor control cabinet, and the bus unit 110 may be a motor starter.
[0043] The plurality of connection units 120, for example, form part of a backplane connector. The plurality of bus units 110 are physically connected together through the backplane connector so that the bus units 110 can share power and data signals. In addition, the backplane connector also provides mechanical stability and reliability, ensuring that each bus unit is correctly inserted and in good contact.
[0044] The control device 100 may further include a gateway 130. The gateway 130 may be implemented by hardware or software and is used for functions such as address allocation and conversion, data processing and analysis, protocol conversion, and routing selection.
[0045] In some embodiments, the control device 100 may further include a housing, a guide rail, or a partition. The housing is made of, for example, metal or synthetic material to protect the bus unit 110 and the connection unit 120 from physical damage, dust, moisture, and other environmental factors. The guide rail is made of, for example, steel so that the bus unit 110 can be smoothly pushed and pulled in and out. The partition is made of, for example, metal or synthetic material to separate and organize the internal space so as to better accommodate the bus unit 110.
[0046] It should be understood that although Figure 1Only one connection unit 120 and one bus unit 110 are shown in FIG. 1 , but the control device 100 may include a plurality of connection units 120 and one or more bus units 110 .
[0047] Figure 2A and Figure 2B A schematic diagram of the topology of a control device 201 according to some embodiments of the present disclosure is shown. The control device 201 includes a gateway 130, a plurality of bus units 110 (such as bus unit 110-1, bus unit 110-2, ..., bus unit 110-4, which may be collectively or individually referred to as bus unit 110), a plurality of connection units 120 (such as connection unit 120-1, connection unit 120-2, ..., connection unit 120-N, which may be collectively or individually referred to as connection unit 120), and a bus 220 coupled to the gateway 130. The bus 220 is used for communication between various parts within the control device 201, and is therefore also referred to as an internal communication bus.
[0048] A plurality of connection units 120 are respectively connected to the bus in the control device 100. The bus unit 110 is connected to the connection unit 120 and obtains the bus address corresponding to the connected connection unit 120. The bus unit 110 may include, for example, a memory for storing the obtained bus address. The bus address stored in each bus unit 110 is unique, so that the gateway 130 can distinguish the bus unit 110 to which each connection unit 120 is connected.
[0049] In some embodiments, such a bus address may be pre-configured by the gateway 130 and stored in the bus unit 110. For example, the host computer configures and stores the address in the bus unit 110 through the gateway 130. In such a case, the address stored by each bus unit 110 may be changed dynamically. In other embodiments, such a bus address may be related to the location identifier stored by the connection unit 120. In such a case, the connection unit 120 may include a non-volatile memory (NVM) for storing the corresponding location identifier. Each connection unit 120 may store different location identifiers, and such location identifiers will be acquired by the bus unit 110 and converted into a bus address after the bus unit 110 is connected to the connection unit 120. The location identifier stored by each connection unit 120 is fixed.
[0050] In some embodiments, the location identifier stored in each connection unit 120 is related to the location of the connection unit 120 in the control device 100 .
[0051] exist Figure 2AIn the example, multiple connection units 120 are arranged in series along the bus 220 and are respectively suitable for connecting to one bus unit 110. For example, connection unit 120-1 is connected to bus unit 110-1, connection unit 120-2 is connected to bus unit 110-2, connection unit 120-3 is connected to bus unit 110-3, and so on. For the case where the position identifier is fixed, for example, the control device 201 is implemented in the form of a drawer cabinet, and the bus unit 110 is implemented in the form of a drawer. Each slot in the drawer cabinet is fixed to a communication address. The position identifier is pre-set by the connection unit 120 on the slot in an ascending order from left to right. As Figure 2A As shown, the location identifier stored in the connection unit 120-1 is 1, the location identifier stored in the connection unit 120-2 is 2, ..., and the location identifier stored in the connection unit 120-N is N. These connection units 120 are connected in series through the bus 220, thereby forming a T-type topology structure with the bus unit 110. In the embodiment of the present disclosure, the connection unit 120 is suitable for connecting to the bus unit 110, but in some cases, it is not required that each connection unit 120 is connected to the bus unit 110.
[0052] In some embodiments, one or more connection units 120 are not connected to any bus unit 110 (e.g., Figure 2A In the case where the connection unit 120-4 is not connected to the bus unit 110) or the bus unit 110 to which it is connected fails, the location identifiers stored by one or more of such connection units 120 according to the disclosed embodiment remain unchanged. For example, the location identifier stored by the connection unit 120-4 is 4, and the location identifier stored by the connection unit 120-N is N. If the bus unit 110-4 is connected to the connection unit 120-4, the obtained location identifier is 4. If the bus unit 110-4 is connected to the connection unit 120-N, the obtained location identifier is N. It should be understood that such location identifiers are merely exemplary, and any other appropriate styles may be used, such as a combination of letters or a binary number sequence, etc., and the present disclosure is not limited to this.
[0053] In some embodiments, the bus unit 110 may store the acquired location identifier. Figure 2A As shown, the bus unit 110 - 4 is inserted into the slot corresponding to the connection unit 120 -N, and after power-on, obtains the location identifier N stored in the connection unit 120 -N and stores it locally.
[0054] In some embodiments, the gateway 130 can obtain the location identifier (also called the first location identifier) stored by the bus unit 110 (also called the first bus unit) and the location identifier (also called the second location identifier) stored by the connection unit 120 (also called the first connection unit), and verify whether the two location identifiers are consistent. Continuing with the above example, the bus unit 110-4 is first inserted into the slot corresponding to the connection unit 120-N, and the location identifier N is obtained and stored. For example, for the purpose of maintenance or overhaul, the bus unit 110-4 is pulled out. When the bus unit 110-4 is inserted again, it is mistakenly inserted into the slot corresponding to the connection unit 120-4. In this case, the gateway 130 verifies whether the location identifier N stored by the bus unit 110-4 is consistent with the location identifier 4 stored by the connection unit 120-4.
[0055] In some embodiments, the gateway 130 may present a prompt message (also referred to as a first prompt message) via the bus unit 110 in response to the location identifier N stored by the bus unit 110 being inconsistent with the location identifier stored by the connection unit 120. Such prompt message indicates a connection error of the bus unit 110. For example, the bus unit 110 includes a human-machine interface (HMI). Such an HMI interface is implemented as a liquid crystal screen, for example. The bus unit 110 prompts the user via the HMI whether the slot inserted is the original slot. In some scenarios, the bus unit 110 may fail to pass the verification of the gateway 130 due to other reasons (such as surge voltage) causing the stored location identifier to be abnormal. In such a case, the bus unit 110 may also present a prompt message. This can be distinguished by setting appropriate verification rules in the gateway 130 and presenting corresponding prompt messages via the bus unit 110.
[0056] In some embodiments, the gateway 130 may obtain and store corresponding setting information of the bus unit 110 via the bus 220. For example, when the host computer configures the bus unit 110 via the gateway 130, such as configuring the rated current, motor type, protection curve, forward and reverse rotation, whether to soft start, etc. of the bus unit 110, the gateway 130 may store such configuration information.
[0057] In some embodiments, a bus unit 110 (also referred to as a second bus unit) connected to a certain connection unit 120 (also referred to as a second connection unit) is replaced with another bus unit 110 (also referred to as a third bus unit), and the gateway 130 may determine whether the models of the two bus units 110 match. If the models of the two bus units 110 do not match, the gateway 130 may present prompt information (also referred to as second prompt information) indicating that the models do not match via the third bus unit. If the models of the two bus units 110 match, the gateway 130 may configure the third bus unit based on the stored setting information of the second bus unit.
[0058] In this way, a quick replacement configuration of the bus unit can be achieved. For example, after replacing the original bus unit 110, the gateway 130 can compare the model information of the new bus unit 110 and the original bus unit 110. If the models of the two bus units 110 are consistent, the gateway 130 can download the stored setting information to the new bus unit 110 directly or based on the user's instructions. If the models of the two bus units 110 are inconsistent, the gateway 130 can present prompt information via the HMI of the new bus unit 110, such as prompting that the new bus unit 110 needs to be configured.
[0059] Considering the processing capacity of a single bus, if a bus is connected to too many bus units, the overall communication time efficiency may be affected due to excessive data throughput. In order to solve such a problem, the connection units 120 in the control device 110 can be divided into multiple groups, for example, they can be grouped according to the physical location of these connection units in the control device 110. The connection units in the same group are coupled to the gateway 130 through the same bus.
[0060] Figure 2B A schematic diagram of a gateway 130 connecting 64 bus units 110 is shown. The gateway 130, for example, supports 4 internal bus interfaces, and is respectively connected to the bus 220-1 to the bus 220-4. The bus 220-1 to the bus 220-4 may be collectively or individually referred to as the bus 220. The connection unit 120-1 to the connection unit 120-16 are arranged in series along the bus 220-1 and are respectively suitable for connecting to the corresponding bus unit 110-1 to the bus unit 110-16. The connection unit 120-17 to the connection unit 120-32 are arranged in series along the bus 220-2 and are respectively suitable for connecting to the corresponding bus unit 110-32 to the bus unit 110-32. The connection unit 120-33 to the connection unit 120-48 are arranged in series along the bus 220-3 and are respectively suitable for connecting to the corresponding bus unit 110-33 to the bus unit 110-48. The connection units 120-49 to 120-64 are arranged in series along the bus 220-4 and are respectively adapted to be connected to the corresponding bus units 110-49 to 110-64. Thus, each bus 220 (via the connection unit 120) connects 16 bus units 110, and the gateway 130 connects a total of 64 bus units 110 via 4 buses 220 (via the connection unit 120). In this way, fast data interaction between the gateway and the high-density bus units in the cabinet can be achieved.
[0061] exist Figure 2BIn the example, the control device 201 is implemented in the form of a drawer cabinet, for example, and the bus unit 110 is implemented in the form of a drawer. The 64 connection units 120 are arranged in the drawer cabinet in a physical layout of 8 layers × 8 columns, for example. For example, connection units 120-1 to 120-8 are arranged in the first layer of the drawer cabinet from left to right, and connection units 120-9 to 120-16 are arranged in the second layer of the drawer cabinet from left to right. Such 16 connection units 120 share bus 220-1. And so on, in order from top to bottom, every 16 connection units 120 occupy two layers of the drawer cabinet. Each slot corresponding to the 64 connection units 120 is fixed to a communication address. If the position identifier is pre-set in ascending order from left to right and from top to bottom, the position identifier stored in the connection unit 120-1 is 1, the position identifier stored in the connection unit 120-2 is 2, ..., and the position identifier stored in the connection unit 120-64 is 64. As a result, two adjacent layers of drawers share an internal communication bus. The position identifier is implemented in a physical order. If the corresponding slot does not have a drawer inserted, that is, the corresponding connection unit 120 is not connected to the bus unit 110, the position identifier can be skipped. The communication bus of every two layers can be connected to any internal communication bus interface of the gateway 130, and the gateway 130 implements self-adaptation of the internal communication bus address and the position identifier. In this way, the field bus configuration work can be saved and the work efficiency can be improved.
[0062] It should be understood that Figure 2B The specific numerical values involved in the examples (for example, 64, 16, etc.) are merely exemplary and may vary according to specific application scenarios, and the present disclosure does not impose any limitations on this.
[0063] The control device 201 can communicate with the controller 210, receive and execute the instructions of the controller 210, and return corresponding data, etc. Specifically, the control device 201 is connected to the bus 220 through the gateway 130 and communicates with the controller 210. The gateway 130 can perform information exchange between the controller 210 and the bus unit 110 based on the corresponding bus address of the bus unit 110. The gateway 130 may include a non-volatile memory.
[0064] In some embodiments, the communication on the bus 220 is based on a first communication protocol, and the communication between the gateway 130 and the controller 210 is based on a second communication protocol. The first communication protocol may be the same as or different from the second communication protocol. For example, the first communication protocol and the second communication protocol may both be Modbus protocols. For another example, the first communication protocol may be a controller area network (CAN) bus protocol, a controller area network flexible data rate (CANFD) bus protocol, a Modbus protocol, etc. The second communication protocol may be a Modbus protocol, a Profinet protocol, an Ethernet IP protocol, etc. It should be understood that the first communication protocol and the second communication protocol may be any suitable communication protocol existing or appearing in the future, and the present disclosure is not limited to this.
[0065] In some embodiments, the gateway 130 may include multiple circuit boards respectively applicable to different communication protocols. Such a gateway 130 can switch between multiple circuit boards according to the communication protocol between the gateway 130 and the controller 210. For example, the gateway 130 includes a first circuit board supporting the Modbus protocol, a second circuit board supporting the Profinet protocol, and a third circuit board supporting the Ethernet IP protocol. If the gateway 130 communicates with the controller 210 supporting the Modbus protocol, the first circuit board can be used. If the gateway 130 communicates with the controller 210 supporting the Ethernet IP protocol, it can switch to the third circuit board. In this way, different communication boards can be flexibly adapted to achieve rapid iteration of products and rapid delivery of projects.
[0066] In some embodiments, the control device 100 may include multiple gateways 130 to implement active / standby redundant configuration of the gateways 130. In other words, after a gateway 130 fails, it can be quickly switched to another gateway 130, thereby improving the communication stability of the control device 100.
[0067] In an example scenario, the controller 210 may be a PLC. The control device 201 may be a motor control center (MCC), and the gateway 130 may be a head device of the MCC. The connection unit 120 may be a communication slot module (e.g., a T-type communication slot module). The bus unit 110 may be a motor starter (e.g., a motor starter integrating a circuit breaker, a contactor, and a motor protector). The following will take this scenario as an example and combine Figure 3 Describe the internal and external communication interactions of the control device 201.
[0068] Figure 3A schematic diagram of an example 300 of internal and external communication interaction of a control device according to some embodiments of the present disclosure is shown. The example 300 is generally divided into three stages: an address setting stage 301 , a communication debugging stage 302 , and a control stage 303 .
[0069] In the address setting stage 301, the example 300 involves a connection unit 120 and an address setting unit 310. For example, during factory commissioning, the address setting unit 310 (e.g., an address setting drawer) is inserted (322) into a slot in the control device 201 (e.g., a drawer cabinet). In the slot, the address setting unit 310 is connected to the connection unit 120 corresponding to the slot. The address setting unit 310 sets (324) a position identifier of the connection unit 120. The connection unit 120 receives and stores (326) the position identifier. Similarly, the position identifiers of the connection units 120 corresponding to all slots can be set.
[0070] In the communication debugging phase 302, the example 300 involves the bus unit 110, the connection unit 120, and the gateway 130. The bus unit 110 sends (328) a request for a location identifier to the connected connection unit 120, and receives (330) the location identifier stored by the connection unit 120. Further, the bus unit 110 converts (332) the location identifier into a bus address. In order to support error-proofing of the gateway 130, the bus unit 110 can store (334) the location identifier. Further, the bus unit 110 can convert the location identifier into a bus address, initialize (336) the bus protocol stack, and then establish (338) bus communication with the gateway 130.
[0071] In the control phase 303, the example 300 involves the bus unit 110, the gateway 130, and the controller 210. In order to perform information exchange between the controller 210 and the bus unit 110, in some embodiments, the gateway 130 can maintain a mapping relationship between the corresponding bus address of the bus unit 110 and the corresponding unit identification. Such a unit identification is used by the controller 210. The specific form of the unit identification can depend on the protocol used for communication between the gateway 130 and the controller 210. For example, in the case of the Modbus protocol, the unit identification can be the slave device ID (SlaveID) of the slave device to which the controller 210 is connected as a master device. Based on such a mapping relationship, the gateway 130 can receive an instruction from the controller 210 and determine the data location indicated by the instruction that the controller 210 expects to read.
[0072] In some embodiments, the gateway 130 may receive a data access instruction from the controller 210. Such a data access instruction includes a target unit identifier of the bus unit 110 to be accessed and a first storage address of the data to be accessed. Based on the maintained mapping relationship, the gateway 130 may determine the target bus address corresponding to the target unit identifier, and may convert the first storage address into a second storage address suitable for the bus. Further, the gateway 130 executes the data access instruction according to the target bus address and the second storage address. Exemplarily, the bus unit 110 includes, for example, a register. If the bus unit 110 stores the operation data in a register, the first storage address may be the register address of the data to be accessed as perceived by the controller 210. Accordingly, the second storage address may be the address of the data relative to the bus as perceived from the vision of the gateway 130.
[0073] Continue to refer Figure 3 , the gateway 130 receives (340) a data access instruction including a unit identifier and a first storage address of data from the controller 210. The gateway 130 converts (342) the unit identifier into a bus address, and converts (342) the first storage address into a second storage address suitable for the bus. Further, the gateway 130 sends (344) the data access instruction including the bus address and the second storage address to the bus unit 110. The bus unit 110 returns (346) the data stored in the corresponding storage location. Further, the gateway 130 converts (348) the bus address into a unit identifier, and converts (348) the second storage address into the first storage address of the data. Then, the gateway 130 returns (350) the data to the controller 210.
[0074] In some embodiments, the gateway 130 may obtain the corresponding operation data in the bus unit 110 based on the corresponding bus address of the bus unit 110. Further, the gateway 130 stores the corresponding operation data in the gateway 130 according to the corresponding bus address of the bus unit 110 and the storage address of the operation data in the corresponding bus unit 110 applicable to the bus. In this way, the collection of operation data can be achieved.
[0075] Exemplarily, in order to improve the data interaction efficiency between the internal bus unit 110 and the controller 210, the gateway 130 can periodically access and store important or frequently interacted data. In this case, if the gateway 130 receives a data access instruction including a unit identifier and a first storage address of data from the controller 210, the corresponding operation data can be read from the stored corresponding operation data and the read operation data can be sent to the controller 210. For example, the gateway 130 receives (340) a data access instruction including a unit identifier and a first storage address of data from the controller 210. The gateway 130 converts (342) the unit identifier into a bus address, and converts (342) the first storage address into a second storage address suitable for the bus. Further, the gateway 130 reads the corresponding data from the stored corresponding data based on the converted bus address and the second storage address, and then returns (350) the data to the controller 210.
[0076] In other words, the gateway 130 can centrally map the important or frequently interacted operation data of all bus units 110 into a continuous storage address, so that the controller 210 can read them at one time, for example, reading the rated current of all bus units 110 at one time. In this embodiment, the time for accessing the corresponding bus unit 110 is saved. In this way, the communication efficiency between the controller 210 and the control device 201 can be improved.
[0077] Figure 4 A schematic diagram of an example of data aggregation according to some embodiments of the present disclosure is shown. The control device 110, for example, includes a gateway 130, a bus unit 110-A with a unit identification of A, a bus unit 110-B with a unit identification of B, and a bus unit 110-C with a unit identification of C. The bus address of the gateway 130 is 255, and includes storage addresses A.1 to C.4. The bus address of the bus unit 110-A is 1, and includes storage addresses 1-4. The bus address of the bus unit 110-B is 2, and includes storage addresses 1-4. The bus address of the bus unit 110-C is 3, and includes storage addresses 1-4.
[0078] The gateway 130 may periodically access and store part or all of the data stored in all bus units 110. Figure 4As shown in the mapping relationship, the data stored in the gateway 130 has a corresponding relationship with the data stored in the bus unit 110. For example, the gateway 130 (whose bus address is address 255) can read data-1, data-2, data-3 and data-4 from the bus unit 110-A 1 having the bus address of address 1 and store them locally in the gateway 130 as data-A.1, data-A.2, data-A.3 and data-A.4 respectively. For another example, the gateway 130 can read data-1, data-2, data-3 and data-4 from the bus unit 110-B having the bus address of address 2 and store them locally as data-B.1, data-B.2, data-B.3 and data-A.4 respectively. The gateway 130 can periodically access the bus unit 110 and update the corresponding data stored. Therefore, from the perspective of the controller 210, it does not need to care about which bus unit 110 to access, and only needs to send a data access instruction to the gateway 130, and the gateway 130 can quickly return the corresponding data to the controller 210. In particular, when the controller needs to read a certain operation data (for example, rated current) of each bus unit in batches, such a data collection method will greatly improve the query efficiency.
[0079] It should be understood that Figure 4 The specific numerical values involved in the examples (eg, 255, 1-4, etc.) are merely exemplary and may vary according to specific application scenarios, and the present disclosure does not impose any limitations on this.
[0080] In summary, the present disclosure provides a communication solution for the control device internally and externally. For the bus unit, the bus address can be obtained via the connection unit, so that the bus unit can work after being connected to the connection unit and powered on, saving the time of configuring the bus address. In this way, the work efficiency of installation, debugging, and maintenance can be improved. Multiple bus units can be grouped and connected to different buses to avoid the bus data throughput being too high and affecting the communication timeliness. Furthermore, the bus unit and the gateway can store location identifiers to support error-proof identification. The gateway can also store the setting information of the bus unit to support the rapid replacement of the bus unit. Furthermore, the gateway supports multiple communication protocols and can flexibly adapt the controller to achieve rapid iteration of products and rapid delivery of projects.
[0081] Figure 5 1 is a flow chart showing an example method 500 of a control method according to some embodiments of the present disclosure. The method 500 may be implemented, for example, at the control device 100, for example, by a micro control unit of the bus unit 110 and a micro control unit of the gateway 130. Figure 1 Method 500 is described. It should be understood that method 500 may include additional acts not shown and / or may omit acts shown, and the scope of the present disclosure is not limited in this respect.
[0082] At block 510, each of the one or more bus units obtains a bus address for a bus corresponding to a connection unit in the plurality of connection units in response to being connected to the connection unit. At block 520, the gateway performs information exchange between the controller and the one or more bus units based on the corresponding bus addresses of the one or more bus units.
[0083] In some embodiments, multiple connection units store corresponding location identifiers, wherein the location identifier stored by each of the multiple connection units is related to the location of the connection unit in the control device, and wherein each of the one or more bus units obtains a bus address for the bus corresponding to the connection unit in the following manner: obtaining the location identifier stored by the connection unit to which it is connected; and converting the obtained location identifier into a bus address.
[0084] In some embodiments, each of the one or more bus units further stores the obtained location identification.
[0085] In some embodiments, method 500 also includes: the gateway obtains a first location identifier stored in the first bus unit in response to the first bus unit being connected to a first connection unit among multiple connection units; and verifies the consistency of the first location identifier with the second location identifier stored in the first connection unit.
[0086] In some embodiments, the method 500 further includes: in response to the first location identifier being inconsistent with the second location identifier, the gateway presents first prompt information via the first bus unit, wherein the first prompt information indicates a connection error of the first bus unit.
[0087] In some embodiments, the method 500 further includes: the gateway maintaining a mapping relationship between corresponding bus addresses of the one or more bus units and corresponding unit identifications of the one or more bus units, the corresponding unit identifications being used by the controller.
[0088] In some embodiments, the gateway performs information exchange in the following manner: receiving a data access instruction from a controller, the data access instruction including a target unit identifier of a bus unit to be accessed and a first storage address of data to be accessed; determining a target bus address corresponding to the target unit identifier from the corresponding bus address based on a mapping relationship; converting the first storage address into a second storage address suitable for the bus; and executing the data access instruction according to the target bus address and the second storage address.
[0089] In some embodiments, method 500 also includes: the gateway obtains corresponding operation data in one or more bus units based on the corresponding bus addresses of the one or more bus units; the gateway stores the corresponding operation data in the gateway according to the corresponding bus addresses of the one or more bus units and the storage address of the operation data applicable to the bus in the corresponding bus unit; and wherein the gateway executes the data access instruction in the following manner: reading the operation data corresponding to the target bus address and the second storage address from the stored corresponding operation data; and sending the read operation data to the controller.
[0090] In some embodiments, the method 500 further includes: the gateway acquiring corresponding setting information of the one or more bus units via the bus; and the gateway storing the corresponding setting information of the one or more bus units.
[0091] In some embodiments, method 500 also includes: in response to determining that a second bus unit connected to a second connection unit among multiple connection units is replaced by a third bus unit, the gateway determines whether a model of the third bus unit matches a model of the second bus unit; in response to determining that the model of the third bus unit does not match the model of the second bus unit, the gateway presents second prompt information indicating a model mismatch via the third bus unit; and in response to determining that the model of the third bus unit matches the model of the second bus unit, the gateway configures the third bus unit based on the stored setting information of the second bus unit.
[0092] In some embodiments, the gateway includes a plurality of circuit boards respectively adapted for different communication protocols, and the method 500 further includes: the gateway switching between the plurality of circuit boards according to the communication protocol between the gateway and the controller.
[0093] According to an exemplary implementation of the present disclosure, a machine-readable storage medium is also provided, on which machine-executable instructions are stored, wherein the machine-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a program product is also provided, which is tangibly stored on a non-transitory machine-readable medium and includes machine-executable instructions, and the machine-executable instructions are executed by a processor to implement the method described above.
[0094] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment and program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by machine-readable program instructions.
[0095] These machine-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, a server, a single-chip microcomputer and its cluster or other programmable data processing device, so as to produce a machine, so that when these instructions are executed by the machine, the programmable data processing device and / or other equipment, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These machine-readable program instructions can also be stored in a machine-readable storage medium, and these instructions make the machine, the programmable data processing device and / or other equipment work in a specific way, so that the machine-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0096] Machine-readable program instructions may be loaded onto a machine, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the machine, other programmable data processing apparatus, or other device to produce a machine-implemented process, thereby causing the instructions executed on the machine, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0097] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and program product according to multiple implementations of the present disclosure. In this regard, each square frame in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square frame can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square frames can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the function involved. It should also be noted that each square frame in the block diagram and / or flow chart, and the combination of the square frames in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and machine instructions.
[0098] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A control device, comprising: A plurality of connection units, respectively connected to the bus in the control device; one or more bus units, wherein each of the one or more bus units is configured to obtain a bus address for the bus corresponding to a connection unit of the plurality of connection units in response to being connected to the connection unit; as well as A gateway is connected to the bus and is adapted to communicate with the controller, and the gateway is configured to perform information exchange between the controller and the one or more bus units based on the corresponding bus addresses of the one or more bus units.
2. The control device according to claim 1, wherein the plurality of connection units are configured to store corresponding position identifiers, wherein the position identifier stored in each of the plurality of connection units is related to the position of the connection unit in the control device, and Each of the one or more bus units is configured to obtain a bus address for the bus corresponding to the connection unit in the following manner: Acquire the location identifier stored in the connected connection unit; and The acquired location identifier is converted into the bus address. 3 . The control device according to claim 2 , wherein each of the one or more bus units is further configured to store the acquired location identifier.
4. The control device according to claim 3, wherein the gateway is further configured to: In response to a first bus unit being connected to a first connection unit among the plurality of connection units, acquiring a first location identifier stored in the first bus unit; and The consistency of the first location identifier and the second location identifier stored in the first connection unit is verified.
5. The control device according to claim 4, wherein the gateway is further configured to: In response to the first location identifier being inconsistent with the second location identifier, first prompt information is presented via the first bus unit, the first prompt information indicating a connection error of the first bus unit.
6. The control device according to claim 1, wherein the gateway is further configured to: A mapping relationship between corresponding bus addresses of the one or more bus units and corresponding unit identifications of the one or more bus units is maintained, and the corresponding unit identifications are used by the controller.
7. The control device according to claim 6, wherein the gateway is configured to perform the information exchange in the following manner: receiving a data access instruction from the controller, the data access instruction including a target unit identifier of a bus unit to be accessed and a first storage address of data to be accessed; Based on the mapping relationship, determining a target bus address corresponding to the target unit identifier from the corresponding bus addresses; converting the first storage address into a second storage address suitable for the bus; as well as The data access instruction is executed according to the target bus address and the second storage address.
8. The control device according to claim 7, wherein the gateway is further configured to: acquiring corresponding operation data in the one or more bus units based on the corresponding bus addresses of the one or more bus units; storing the corresponding operation data in the gateway according to the corresponding bus addresses of the one or more bus units and the storage addresses of the operation data in the corresponding bus units applicable to the bus; and The gateway is configured to execute the data access instruction in the following manner: reading operation data corresponding to the target bus address and the second storage address from the stored corresponding operation data; and The read operation data is sent to the controller.
9. The control device according to claim 1, wherein the gateway is further configured to: acquiring corresponding setting information of the one or more bus units via the bus; and The corresponding setting information of the one or more bus units is stored.
10. The control device according to claim 9, wherein the gateway is further configured to: In response to determining that a second bus unit connected to a second connection unit among the plurality of connection units is replaced with a third bus unit, determining whether a model of the third bus unit matches a model of the second bus unit; In response to determining that the model of the third bus unit does not match the model of the second bus unit, presenting second prompt information indicating the model mismatch via the third bus unit; as well as In response to determining that the model of the third bus unit matches the model of the second bus unit, the third bus unit is configured based on the stored setting information of the second bus unit.
11. The control device according to claim 1, wherein the gateway comprises a plurality of circuit boards respectively adapted for different communication protocols, and the gateway is further configured to switch between the plurality of circuit boards according to the communication protocol between the gateway and the controller.
12. A control method, comprising: each of the one or more bus units, in response to being connected to a connection unit of the plurality of connection units, obtains a bus address for a bus corresponding to the connection unit; as well as The gateway performs information exchange between the controller and the one or more bus units based on the corresponding bus addresses of the one or more bus units.
13. The control method according to claim 12, wherein the plurality of connection units store corresponding position identifiers, wherein the position identifier stored in each of the plurality of connection units is related to the position of the connection unit in the control device, and Each of the one or more bus units obtains a bus address for the bus corresponding to the connection unit in the following manner: Acquire the location identifier stored in the connected connection unit; and The acquired location identifier is converted into the bus address. 14 . The control method according to claim 13 , wherein each of the one or more bus units further stores the acquired location identifier.
15. The control method according to claim 14, further comprising: In response to the first bus unit being connected to a first connection unit among the plurality of connection units, the gateway acquires a first location identifier stored in the first bus unit; as well as The gateway verifies consistency between the first location identifier and a second location identifier stored in the first connection unit.
16. The control method according to claim 15, further comprising: In response to the inconsistency between the first location identifier and the second location identifier, the gateway presents first prompt information via the first bus unit, where the first prompt information indicates a connection error of the first bus unit.
17. The control method according to claim 12, further comprising: The gateway maintains a mapping relationship between the corresponding bus addresses of the one or more bus units and corresponding unit identifications of the one or more bus units, and the corresponding unit identifications are used by the controller.
18. The control method according to claim 17, wherein the gateway performs the information exchange in the following manner: receiving a data access instruction from the controller, the data access instruction including a target unit identifier of a bus unit to be accessed and a first storage address of data to be accessed; Based on the mapping relationship, determining a target bus address corresponding to the target unit identifier from the corresponding bus addresses; converting the first storage address into a second storage address suitable for the bus; as well as The data access instruction is executed according to the target bus address and the second storage address.
19. The control method according to claim 18, further comprising: The gateway obtains corresponding operation data in the one or more bus units based on the corresponding bus addresses of the one or more bus units; The gateway stores the corresponding operation data in the gateway according to the corresponding bus addresses of the one or more bus units and the storage addresses of the operation data in the corresponding bus units applicable to the bus; and The gateway executes the data access instruction in the following manner: reading operation data corresponding to the target bus address and the second storage address from the stored corresponding operation data; and The read operation data is sent to the controller.
20. The control method according to claim 12, further comprising: The gateway obtains corresponding setting information of the one or more bus units via the bus; as well as The gateway stores the corresponding setting information of the one or more bus units.
21. The control method according to claim 20, further comprising: The gateway determines, in response to determining that a second bus unit connected to a second connection unit among the plurality of connection units is replaced with a third bus unit, whether a model of the third bus unit matches a model of the second bus unit; In response to determining that the model of the third bus unit does not match the model of the second bus unit, the gateway presents second prompt information indicating a model mismatch via the third bus unit; as well as The gateway configures the third bus unit based on the stored setting information of the second bus unit in response to determining that the model of the third bus unit matches the model of the second bus unit.
22. The control method according to claim 12, wherein the gateway comprises a plurality of circuit boards respectively adapted for different communication protocols, and the method further comprises: The gateway switches between the plurality of circuit boards according to a communication protocol between the gateway and the controller.
23. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 12 to 22.