Management method, device and equipment of slave station, and storage medium
By determining the target bus address and function ID in the slave device, the problem of low management efficiency caused by too many bus addresses is solved, the reuse of bus addresses and protocol compatibility are realized, and management efficiency is improved.
Patent Information
- Application Number
- CN202211567951.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-12-07
AI Technical Summary
In existing technologies, each bus protocol corresponds to a bus address, resulting in too many bus addresses for slave stations and leading to low management efficiency.
By determining the target bus address corresponding to the current pending service issued by the master station, and based on the preset mapping relationship between bus address and IO address, the target IO address is determined. Then, based on the mapping relationship between IO address and function ID, the service is transmitted to the slave function module corresponding to the target function ID for processing.
It improves the efficiency of bus address management, reduces the number of bus addresses, and achieves compatibility with any protocol and the reuse of bus addresses.
Smart Images

Figure CN115840401B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial communication, and particularly relates to a slave station management method and device, equipment and a storage medium. BACKGROUND
[0002] With the rapid development of intelligent manufacturing in industry, the convenience and efficiency of industrial production are improved.
[0003] Industrial robots are generally used as slave station equipment, and need to be provided with multiple bus addresses. According to user requirements, different bus connection slave station equipment corresponding function modules are selected, and data transmitted by the master station is received through the bus and then transmitted to the corresponding function position or the work information is fed back to the master station through the bus, thereby meeting different requirements of users. However, all bus addresses in the slave station are not used in actual application, and each bus protocol corresponds to one bus address, so that the bus addresses of the slave station are too many, thereby causing low management efficiency of the slave station on the bus addresses. SUMMARY
[0004] The main purpose of the present application is to provide a slave station management method, device, equipment and storage medium, which aims to solve the technical problem that in the prior art, each bus protocol corresponds to one bus address, so that the bus addresses of the slave station are too many, thereby causing low management efficiency of the slave station on the bus addresses.
[0005] To achieve the above purpose, the present application provides a slave station management method, which comprises the following steps:
[0006] determining a target bus address corresponding to a current to-be-processed service issued by a master station, wherein the current to-be-processed service transmitted in any protocol corresponds to the same bus address in the slave station;
[0007] determining a target IO address corresponding to the target bus address based on the target bus address and a first mapping relationship between a preset bus address and an IO address;
[0008] determining a target function ID corresponding to the target IO address based on the target IO address and a second mapping relationship between a preset IO address and the function ID;
[0009] transmitting the current to-be-processed service to a slave station function module corresponding to the target function ID, so that the slave station function module processes the current to-be-processed service.
[0010] Optionally, before the step of determining the target IO address corresponding to the target bus address based on the target bus address and the first mapping relationship between the preset bus address and the IO address, the method further comprises the following steps:
[0011] obtaining a configuration file, wherein the configuration file is default or set;
[0012] determining a first mapping relationship between the preset bus address and IO address and a second mapping relationship between the preset IO address and function ID based on the configuration file;
[0013] saving the first mapping relationship and the second mapping relationship.
[0014] Optionally, the first mapping relationship between the preset bus address and IO address and the second mapping relationship between the preset IO address and function ID are saved in a mapping table.
[0015] Optionally, before the step of determining the target bus address corresponding to the current to-be-processed service issued by the master station, the method comprises:
[0016] If an update instruction configured by the slave station is received, a target to be updated corresponding to the update instruction is determined, and an update file corresponding to the target to be updated is received;
[0017] The target to be updated comprises at least one of a protocol switch configuration to be updated and a mapping relationship to be updated, the protocol switch configuration is used to control use of various protocols, and the mapping relationship comprises the first mapping relationship between the preset bus address and IO address and the second mapping relationship between the preset IO address and function ID.
[0018] The configuration file of the slave station is updated to the update file, so that a processing strategy corresponding to the current to-be-processed service is determined based on the update file.
[0019] Optionally, the protocol switch configuration is used to control whether various protocols are available and is used to control transmission information when the current to-be-processed service is transmitted in a corresponding protocol.
[0020] Optionally, after the step of transmitting the current to-be-processed service to the slave station function module corresponding to the target function ID, the method further comprises:
[0021] determining feedback information of the slave station function module after processing the current to-be-processed service;
[0022] feeding back the feedback information to the master station in a corresponding protocol when the current to-be-processed service is transmitted based on the target bus address.
[0023] Optionally, the step of transmitting the current to-be-processed service to the slave station function module corresponding to the target function ID for processing the current to-be-processed service by the slave station function module comprises:
[0024] Based on the target function ID, determine the corresponding slave station function module;
[0025] Determine the triggering method of the slave station function module;
[0026] Detect whether the signal triggering method corresponding to the target function ID is the same as the triggering method;
[0027] If the signal triggering method is the same as the triggering method, then the current pending service is transmitted to the slave station function module for the slave station function module to process the current pending service.
[0028] This application also provides a slave station management device, which includes:
[0029] The determination module is used to determine the target bus address corresponding to the current pending service issued by the master station, wherein the current pending service transmitted in any protocol corresponds to the same bus address at the slave station.
[0030] The filtering module is used to determine the target I / O address corresponding to the target bus address based on the target bus address and a first mapping relationship between the preset bus address and I / O address;
[0031] The matching module is used to determine the target function ID corresponding to the target IO address based on the target IO address and a second mapping relationship between a preset IO address and a function ID;
[0032] The transmission module is used to transmit the currently pending service to the slave function module corresponding to the target function ID, so that the slave function module can process the currently pending service.
[0033] This application also provides a slave management device, which is a physical node device. The slave management device includes a memory, a processor, and a program for a slave management method stored in the memory and executable on the processor. When the program for the slave management method is executed by the processor, it can implement the steps of the slave management method as described above.
[0034] This application also provides a storage medium storing a program that implements the above-described slave station management method. When the program for the slave station management method is executed by a processor, it implements the steps of the slave station management method as described above.
[0035] This application provides a slave station management method, apparatus, device, and storage medium. Compared with the prior art where each bus protocol corresponds to a bus address, resulting in too many bus addresses for the slave station and thus low efficiency in managing bus addresses, this application determines the target bus address corresponding to the currently pending service issued by the master station. The currently pending service transmitted using any protocol corresponds to the same bus address on the slave station. Based on the target bus address and a first mapping relationship between preset bus addresses and I / O addresses, the target I / O address corresponding to the target bus address is determined. Based on the target I / O address and a second mapping relationship between preset I / O addresses and function IDs, the target function ID corresponding to the target I / O address is determined. The currently pending service is transmitted to the slave station function module corresponding to the target function ID for processing by the slave station function module. In this application, the bus address corresponding to the current pending service is determined. Based on the mapping relationship between the bus address and the preset bus address and IO address, the corresponding IO address (input / output) is determined. Then, based on the mapping relationship between the preset IO address and the function ID, the function ID corresponding to the IO address is determined. According to the function ID, the current pending service is sent to the slave function module corresponding to the function ID, so that the slave function module can process the current pending service. That is, in this application, after determining the type of the current pending service, the current pending service can be transmitted using any protocol, and the same bus address corresponding to the slave is determined according to the type of the current pending service. It is not necessary to set the bus address according to the type of protocol. Moreover, according to the IO address mapping relationship, the current pending service is transmitted to the corresponding slave function module, so that the bus address and IO address can be reused, thereby improving the management efficiency of the bus address. Attached Figure Description
[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0037] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating the first embodiment of the management method for the slave station in this application;
[0039] Figure 2 This is a schematic diagram of the communication process in the management method of the slave station in this application;
[0040] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application;
[0041] Figure 4 This is a schematic diagram of the multi-bus data stream processing by the slave station in this application;
[0042] Figure 5 This is a flowchart illustrating the second embodiment of the management method for the slave station in this application.
[0043] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0044] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0045] This application provides a slave station management method. In the first embodiment of the slave station management method of this application, refer to... Figure 1 The management methods for the station include:
[0046] Step S10: Determine the target bus address corresponding to the current pending service issued by the master station. The current pending service transmitted in any protocol corresponds to the same bus address at the slave station.
[0047] Step S20: Based on the target bus address and the first mapping relationship between the preset bus address and the I / O address, determine the target I / O address corresponding to the target bus address;
[0048] Step S30: Based on the target IO address and the second mapping relationship between the preset IO address and the function ID, determine the target function ID corresponding to the target IO address;
[0049] Step S40: The current pending service is transmitted to the slave function module corresponding to the target function ID, so that the slave function module can process the current pending service.
[0050] The purpose of this embodiment is to enable each bus address to correspond to multiple bus protocols, thereby reducing the number of bus addresses on the slave side and improving the efficiency of slave station in managing bus addresses.
[0051] In this embodiment, it should be noted that the slave station management method can be applied to a slave station management device, which is subordinate to a slave station management equipment, which is part of a slave station management system.
[0052] The main station can be a control terminal, such as a mobile phone, computer, or tablet, without any specific restrictions.
[0053] The slave station can be a robot, industrial equipment, etc., without any specific restrictions.
[0054] The robot can be industrial equipment, a home intelligent robot, or a service robot, etc., without any specific restrictions.
[0055] For example, service humanoid robots can be food delivery robots, rescue robots, etc., without any specific limitations.
[0056] The protocol can be a bus protocol, such as EIP (Enterprise Information Portal) or EtherCAT (EtherControl Automation Technology).
[0057] It should be noted that each type of pending service corresponds to a bus address, so that the corresponding target bus address can be determined based on the received current pending service, thereby reducing the dependence on the type of protocol.
[0058] It should be noted that after the user selects the current service to be processed on the master station, it can be transmitted to the slave station through any protocol. The slave station determines the corresponding target bus address based on the current service to be processed. In other words, the user indirectly selects the bus address by determining the service to be processed. After the bus address is determined, the service to be processed can be transmitted to the slave station through the corresponding bus address regardless of the protocol used.
[0059] In this embodiment, the target bus address corresponding to the current pending service transmitted by the master station using any protocol is determined. This allows the slave station to receive the pending service transmitted by the master station using any protocol without adding or changing the bus address. Each pending service is associated with a corresponding bus address, and a function ID corresponding to the bus address is determined through a preset first and second mapping relationship. Based on the function ID, a slave station function module capable of processing the current pending service is identified, enabling the slave station function module to process the pending service. In other words, regardless of the protocol used by the user to transmit the pending service, as long as there is a bus address corresponding to the type of pending service, the slave station can receive the pending service and find a slave station function module capable of processing it according to the preset mapping relationship. This allows the bus address to be applicable to any bus protocol, thereby improving the efficiency of bus address management.
[0060] Specifically, refer to Figure 4 , Figure 4 This is a schematic diagram of the multi-bus data stream processing of the slave station in this application.
[0061] The specific steps are as follows:
[0062] Step S10: Determine the target bus address corresponding to the current pending service issued by the master station. The current pending service transmitted in any protocol corresponds to the same bus address at the slave station.
[0063] The pending tasks issued by the main station can be of the same type or multiple types. For example, the pending tasks can be of the same type, such as sweeping, or multiple types such as sweeping, watering, and mopping.
[0064] The pending business can be data that the user needs to send from the master station to the slave station, or it can be a function command issued by the user through the master station, etc., without any specific limitation.
[0065] Among them, the pending services are the pending services sent by the current user through the main station.
[0066] It should be noted that a bus address can correspond to multiple protocols, allowing users to transmit currently pending services according to any protocol to the corresponding bus address, or allowing users using different protocols to transmit currently pending services through their own protocols, thereby reducing the number of bus addresses and improving the management efficiency of bus addresses.
[0067] In this embodiment, the user determines the data or function commands to be sent to the slave station via the master station. Since each pending service corresponds to a bus address on the slave station, and each bus address corresponds to any protocol, the user can select any protocol to transmit the pending service after determining it on the master station. The service is then transmitted to the slave station's receiving module via the target bus address corresponding to the pending service. That is, the one-to-one relationship between protocol and bus address is set to a many-to-many relationship, allowing existing bus addresses to be applicable to each protocol or different users. This reduces the overlap of bus addresses and the configuration of slave station interfaces, thereby improving the management efficiency of slave station interfaces.
[0068] It should be noted that after the user determines the service to be processed at the master station, the corresponding target bus address can be determined. That is, no matter what protocol the user chooses to transmit the current service to be processed, as long as the slave station has a bus address corresponding to the current service to be processed, the slave station can receive the current service to be processed. Thus, the bus address can be reused.
[0069] Step S20: Based on the target bus address and the first mapping relationship between the preset bus address and the I / O address, determine the target I / O address corresponding to the target bus address;
[0070] It should be noted that each bus address may correspond to multiple I / O addresses. Since data or function instructions may be congested when transmitted through a single I / O address channel, the same set of data or the same function instruction may be transmitted through multiple I / O address channels in order to keep the I / O address channel unobstructed. Therefore, each bus address may correspond to multiple I / O addresses.
[0071] The first mapping relationship is a pre-determined mapping relationship between IO addresses and bus addresses, that is, the correspondence between bus addresses and IO addresses.
[0072] In this embodiment, after determining the target bus address, the IO address or IO address group corresponding to the target bus address is determined according to the first mapping relationship between the preset bus address and IO address. The current service to be processed is temporarily stored at the output of the IO address, and the corresponding target function ID is determined according to the IO address or IO address group.
[0073] Step S30: Based on the target IO address and the second mapping relationship between the preset IO address and the function ID, determine the target function ID corresponding to the target IO address;
[0074] It should be noted that each function ID can correspond to multiple IO addresses or one IO address, and the IO address corresponding to each function ID is the same as the IO address corresponding to the bus address. That is, each bus address has a corresponding function ID, which avoids the IO address from transmitting the pending business to the slave function module that cannot handle the current pending business.
[0075] The second mapping relationship is a pre-determined mapping relationship between IO addresses and corresponding function IDs, that is, the correspondence between function IDs and IO addresses.
[0076] It should be noted that the correspondence between function ID and IO address can be set by the user. That is, the user configures the corresponding IO address according to the function ID of each slave station function module so that the current pending business can be processed normally.
[0077] In this embodiment, after determining the IO address corresponding to the bus address, the target function ID corresponding to the IO address or IO address group is determined based on the second mapping relationship between the preset IO address and function ID. The target function ID is sent from the output end of the IO address to the slave function module corresponding to the target function ID. The slave function module that processes the current pending service is determined according to the target function ID.
[0078] Step S40: The current pending service is transmitted to the slave function module corresponding to the target function ID, so that the slave function module can process the current pending service.
[0079] Each slave station function module can correspond to one or more function IDs.
[0080] In this embodiment, the slave station function module can handle the corresponding current pending business, that is, enable the slave station to complete the data processing or function instructions issued by the master station.
[0081] It should be noted that when the master station issues the current pending business, it will also include some pending business that does not need to be processed by the slave station. Therefore, before the slave station function module receives the current pending business, it needs to determine whether the slave station function module needs to process the current pending business. For pending businesses that do not need to be processed, they should be returned to the output of the corresponding IO address.
[0082] For example, if "1" is defined as processing the current pending business and "0" is defined as not processing the current pending business, the current pending business can be composed of code and business data with "1" and "0". The slave processing module will process the business data carrying "1" and return the business data carrying "0" to the output terminal of the IO address.
[0083] In this embodiment, the slave station function module that can handle the pending business is determined by the function ID. When it is determined that the current pending business needs to be processed, the slave station function module processes the current pending business and returns the current pending business that does not need to be processed to the output end of the corresponding IO address, thereby correctly executing the data or function instructions issued by the user through the master station.
[0084] Specifically, the step of transmitting the currently pending service to the slave function module corresponding to the target function ID for processing by the slave function module includes:
[0085] Step S41: Based on the target function ID, determine the corresponding slave station function module;
[0086] Step S42: Determine the triggering method of the slave station function module;
[0087] Step S43: Detect whether the signal triggering method corresponding to the target function ID is the same as the triggering method;
[0088] Step S44: If the signal triggering method is the same as the triggering method, then the current pending service is transmitted to the slave station function module for the slave station function module to process the current pending service.
[0089] The signal triggering method can be the way the signal is processed. For example, level-based, rising-edge-based, and falling-edge-based triggering methods.
[0090] Signal processing refers to the method of handling the business to be processed.
[0091] It should be noted that the target function ID, signal triggering method, and signal handling method are pre-bound. That is, after the corresponding target function ID is determined through the IO address, the signal triggering method or signal handling method will also be determined.
[0092] In this embodiment, the target function ID is determined based on the IO address. That is, the signal triggering method for the current pending service is determined based on the IO address, and the triggering method of the slave function module corresponding to the function ID is determined. When the triggering method of the slave function module is the same as the signal triggering method, the current pending service is processed according to the triggering method of the slave function module. Otherwise, the current pending service is returned to the corresponding IO address.
[0093] It should be noted that each slave station function module has a corresponding triggering method.
[0094] Specifically, after the step of transmitting the currently pending service to the slave functional module corresponding to the target functional ID, the method further includes:
[0095] Step A10: Determine the feedback information after the slave station function module has processed the current pending service;
[0096] Step A20: Based on the target bus address, the feedback information is fed back to the master station using the protocol corresponding to the current pending service.
[0097] The feedback information may include the processing status of the slave functional module for the current pending business, that is, the processing information of the pending business processed by the slave functional module and / or pending businesses that do not need to be processed and are returned to the IO address output terminal.
[0098] In this embodiment, the processing information of the pending service processed by the slave functional module is determined and / or returned to the output terminal of the IO address (corresponding to...). Figure 4 The pending service (the "virtual IO OUT address") receives feedback information from the main station and sends the feedback information back to the main station using the corresponding IO address and protocol when transmitting the current pending service, so as to avoid the protocol used when sending the feedback information being incompatible with the main station.
[0099] In this embodiment, the target bus address corresponding to the current pending service issued by the master station is first determined. From the preset first mapping relationship, the IO address or IO address group corresponding to the target bus address is found, and the current pending service is transmitted to the input terminal of the corresponding IO address (corresponding to...). Figure 4The process involves "reading protocol stack data into the corresponding virtual IO IN address", then determining the function ID corresponding to the IO address or IO address group according to the preset second mapping relationship, transmitting the current service to be processed to the output end of the IO address through the IO address, determining the signal triggering method corresponding to the service to be processed according to the function ID, and checking whether the signal triggering method is the same as the triggering method of the slave function module corresponding to the function ID. If they are the same, the corresponding signal processing method is triggered through the triggering method of the slave function module so that the slave function module can process the current service to be processed.
[0100] In this embodiment, each protocol corresponds to any bus address, that is, each bus address corresponds to multiple protocols, which reduces the dependence of bus addresses on protocols, allows each bus address to accept pending services transmitted by any protocol, and enables each bus address to be reused for any protocol, thereby reducing the number of bus addresses and improving the management efficiency of bus addresses.
[0101] This application provides a slave station management method, apparatus, device, and storage medium. Compared with the prior art where each bus protocol corresponds to a bus address, resulting in too many bus addresses for the slave station and thus low efficiency in managing bus addresses, this application determines the target bus address corresponding to the currently pending service issued by the master station. The currently pending service transmitted using any protocol corresponds to the same bus address on the slave station. Based on the target bus address and a first mapping relationship between preset bus addresses and I / O addresses, the target I / O address corresponding to the target bus address is determined. Based on the target I / O address and a second mapping relationship between preset I / O addresses and function IDs, the target function ID corresponding to the target I / O address is determined. The currently pending service is transmitted to the slave station function module corresponding to the target function ID for processing by the slave station function module. In this application, the bus address corresponding to the current pending service is determined. Based on the mapping relationship between the bus address and the preset bus address and IO address, the IO address corresponding to the bus address is determined. Then, based on the mapping relationship between the preset IO address and the function ID, the function ID corresponding to the IO address is determined. According to the function ID, the current pending service is sent to the slave function module corresponding to the function ID so that the slave function module can process the current pending service. That is, in this application, after determining the type of the current pending service, the current pending service can be transmitted using any protocol, and the same bus address corresponding to the slave is determined according to the type of the current pending service. It is not necessary to set the bus address according to the type of bus protocol. Moreover, according to the IO address mapping relationship, the current pending service is transmitted to the corresponding slave function module, so that the bus address and IO address can be reused, thereby improving the management efficiency of the bus address.
[0102] Furthermore, based on the above embodiments of this application, another embodiment of this application is provided, in which reference is made to... Figure 5 and Figure 2 Before the step of determining the target I / O address corresponding to the target bus address based on the target bus address and the first mapping relationship between the preset bus address and I / O address, the method further includes:
[0103] Step S01: Obtain the configuration file, wherein the configuration file is either default or configured.
[0104] In this embodiment, the configuration file may include the mapping relationship between bus address and IO address and / or the mapping relationship between user-defined function ID and IO address; it may also include the mapping relationship between bus address and IO address and / or the default mapping relationship between slave function ID and IO address, i.e., the default configuration file.
[0105] In this embodiment, the user can set the mapping relationship between function ID and IO address on the master station, and then connect to the slave station through the physical interface so that the slave station can obtain the configuration file set by the user. Alternatively, the user can set it directly on the slave station.
[0106] Step S02: Based on the configuration file, determine the first mapping relationship between the preset bus address and the IO address, and determine the second mapping relationship between the preset IO address and the function ID;
[0107] In this embodiment, if the mapping relationship between function ID and IO address is set by the user, the mapping relationship between bus address and IO address and / or the mapping relationship between bus address and IO address in the configuration file are read directly.
[0108] In this embodiment, if the user sets the mapping relationship between function ID and IO address, the mapping relationship between function ID and IO address and / or the mapping relationship between bus address and IO address are generated according to the default configuration file.
[0109] In this embodiment, the configuration file can be freely set by the user or automatically generated based on the slave's default settings, thus realizing the flexibility of the slave in managing the bus address.
[0110] Step S03: Save the first mapping relationship and the second mapping relationship.
[0111] In this embodiment, the first mapping relationship and the second mapping relationship are stored in the same storage space, or the first mapping relationship and the second mapping relationship are organized into a first mapping relationship table and the second mapping relationship table and stored in the same storage space, and the storage space is used as a transit station for the current pending business.
[0112] In this embodiment, a user-defined configuration file or a configuration file generated based on default settings is first obtained. Then, a first mapping relationship between a preset bus address and an I / O address, and a second mapping relationship between a preset I / O address and a function ID are determined from the configuration file. The first and second mapping relationships are stored in the same storage space, so that the storage space can serve as a relay station for the current pending business. After determining the target function ID based on the second mapping relationship in the storage space, the current pending business can be directly transmitted, reducing instruction transmission time and thus improving transmission efficiency. Furthermore, the configuration file can be freely set by the user, and a configuration file is automatically generated based on default settings when the user does not set a configuration file, improving the flexibility of bus address and / or I / O address management.
[0113] Specifically, the first mapping relationship between the preset bus address and the IO address, and the second mapping relationship between the preset IO address and the function ID, are stored in a mapping table.
[0114] In this embodiment, storing the first mapping relationship and the second mapping relationship in the same mapping table allows for the direct determination of the target function ID corresponding to the IO address after determining the IO address based on the bus address, thereby improving the speed of finally matching the function ID corresponding to the bus address.
[0115] Furthermore, based on the above embodiments of this application, another embodiment of this application is provided, in which reference is made to... Figure 2 Before the step of determining the target bus address corresponding to the currently pending service issued by the master station, the following steps are included:
[0116] Step B10: If an update instruction configured by the slave station is received, determine the target to be updated corresponding to the update instruction, and receive the update file corresponding to the target to be updated;
[0117] The target to be updated includes at least one of the protocol switch configuration to be updated and the mapping relationship to be updated. The protocol switch configuration is used to control the use of various protocols. The mapping relationship includes a first mapping relationship between a preset bus address and an I / O address and a second mapping relationship between a preset I / O address and a function ID.
[0118] Step B20: Update the configuration file of the target to be updated on the slave station to the updated file, so as to determine the processing strategy for the current pending business based on the updated file.
[0119] In this embodiment, when updating the configuration of the slave station, the target to be updated corresponding to the update instruction is determined, and the update file corresponding to the target is accepted. If the target to be updated is a mapping relationship to be updated, the first mapping relationship between the preset bus address and the I / O address, and / or the second mapping relationship between the preset I / O address and the function ID, which are to be added or updated, are read from the update file. If the first mapping relationship between the preset bus address and the I / O address is updated, and / or the second mapping relationship between the preset I / O address and the function ID is to be added or updated, the first mapping relationship replaces the slave station's first mapping relationship, and / or the second mapping relationship replaces the slave station's second mapping relationship. If the first mapping relationship between the preset bus address and the I / O address is added, and / or the second mapping relationship between the preset I / O address and the function ID is to be added or updated, the first mapping relationship is added to the slave station's first mapping relationship, and / or the second mapping relationship is added to the slave station's second mapping relationship, thus simplifying the process of updating the mapping relationship.
[0120] In this embodiment, if the target to be updated is the protocol switch configuration of the mapping relationship to be updated, then the newly added or updated protocol switch configuration is read from the update file. If a new protocol switch configuration is added, then the new protocol switch configuration is added to the slave protocol switch configuration; if a protocol switch configuration is updated, then the protocol switch configuration is updated to the slave protocol switch configuration.
[0121] Specifically, the protocol switch configuration is used to control whether various protocols are available and to control the transmission information when transmitting the currently pending service using the corresponding protocol.
[0122] In this embodiment, the protocol switch configuration can control whether various protocols are available and determine the transmission information such as transmission frequency, transmission speed, and transmission period of the corresponding protocol when transmitting the current pending service.
[0123] In this embodiment, when updating the configuration, updating the first mapping relationship and / or the switch configuration can simplify the update process, reduce changes to the bus address, and thus improve the management efficiency and maintenance efficiency of the bus address.
[0124] It should be noted that during the configuration update process, each switch configuration or mapping can be updated before updating the next switch configuration or mapping relationship that needs to be updated, and so on, until the update data is completed.
[0125] Reference Figure 3 , Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.
[0126] like Figure 3As shown, the management device of the slave station may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to establish communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM or a stable, non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0127] Optionally, the management device of the slave station may also include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, etc. The rectangular user interface may include a display screen and an input submodule such as a keyboard; optionally, the rectangular user interface may also include a standard wired interface or a wireless interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0128] Those skilled in the art will understand that Figure 3 The slave station management equipment shown does not constitute a limitation on the slave station management equipment, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0129] like Figure 3 As shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, and a slave station management program. The operating system is a program that manages and controls the hardware and software resources of the slave station's management device, supporting the operation of the slave station's management program and other software and / or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as communication with other hardware and software in the slave station's management system.
[0130] exist Figure 3 In the slave station management device shown, the processor 1001 is used to execute the slave station management program stored in the memory 1005 to implement the steps of any of the above-mentioned slave station management methods.
[0131] The specific implementation method of the slave station management device in this application is basically the same as the above-described slave station management method embodiments, and will not be repeated here.
[0132] This application also provides a slave station management device, which includes:
[0133] The determination module is used to determine the target bus address corresponding to the current pending service issued by the master station, wherein the current pending service transmitted in any protocol corresponds to the same bus address at the slave station.
[0134] The filtering module is used to determine the target I / O address corresponding to the target bus address based on the target bus address and a first mapping relationship between the preset bus address and I / O address;
[0135] The matching module is used to determine the target function ID corresponding to the target IO address based on the target IO address and a second mapping relationship between a preset IO address and a function ID;
[0136] The transmission module is used to transmit the currently pending service to the slave function module corresponding to the target function ID, so that the slave function module can process the currently pending service.
[0137] Optionally, the management device of the slave station further includes:
[0138] The module retrieves a configuration file, wherein the configuration file is either default or configured.
[0139] The preset module is used to determine, based on the configuration file, a first mapping relationship between the preset bus address and the I / O address, and a second mapping relationship between the preset I / O address and the function ID;
[0140] A storage module is used to store the first mapping relationship and the second mapping relationship.
[0141] Optionally, the storage module includes:
[0142] A storage submodule is used to store the first mapping relationship between the preset bus address and the IO address and the second mapping relationship between the preset IO address and the function ID in a mapping table.
[0143] Optionally, the management device of the slave station further includes:
[0144] The receiving module is used to determine the target to be updated corresponding to the update instruction if it receives an update instruction configured by the slave station, and to receive the update file corresponding to the target to be updated;
[0145] The target to be updated includes at least one of the protocol switch configuration to be updated and the mapping relationship to be updated. The protocol switch configuration is used to control the use of various protocols. The mapping relationship includes a first mapping relationship between a preset bus address and an I / O address and a second mapping relationship between a preset I / O address and a function ID.
[0146] The update module is used to update the configuration file of the target to be updated on the slave station to the update file, so as to determine the processing strategy for the corresponding current business to be processed based on the update file.
[0147] Optionally, the protocol switch is configured to control whether various protocols are available and to control the transmission information when transmitting the currently pending service using the corresponding protocol.
[0148] Optionally, the management device of the slave station further includes:
[0149] The first determining submodule is used to determine the feedback information after the slave station functional module processes the current pending service;
[0150] The feedback module is used to send the feedback information back to the master station based on the target bus address and the protocol corresponding to the current pending service.
[0151] Optionally, the transmission module includes:
[0152] The second determining submodule is used to determine the corresponding slave station function module based on the target function ID;
[0153] The third determining submodule is used to determine the triggering method of the slave station function module;
[0154] The detection module is used to detect whether the signal triggering method corresponding to the target function ID is the same as the triggering method;
[0155] The transmission submodule is used to transmit the currently pending service to the slave station function module only if the signal triggering method is the same as the triggering method, so that the slave station function module can process the currently pending service.
[0156] This application provides a storage medium that stores one or more programs, which can be executed by one or more processors to implement the steps of the slave station management method described above.
[0157] The specific implementation of the storage medium in this application is basically the same as the various embodiments of the slave station management method described above, and will not be repeated here.
[0158] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0159] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0160] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0161] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention’s specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for managing slave stations, characterized in that, The management method for the slave station includes: Determine the target bus address corresponding to the current pending service issued by the master station. Each pending service corresponds to a bus address, and each bus address corresponds to a slave station functional module. After the master station determines the type of the current pending service, the master station transmits the current pending service in any protocol and determines the same bus address corresponding to the slave station according to the type of the current pending service. Different protocols correspond to different physical buses. Based on the target bus address and the first mapping relationship between the preset bus address and the I / O address, the target I / O address corresponding to the target bus address is determined; Based on the target IO address and the second mapping relationship between the preset IO address and the function ID, the target function ID corresponding to the target IO address is determined; Based on the target function ID, determine the corresponding slave station function module; Determine the triggering method of the slave station function module; Detect whether the signal triggering method corresponding to the target function ID is the same as the triggering method; If the signal triggering method is the same as the triggering method, then the current pending service is transmitted to the slave station function module for the slave station function module to process the current pending service.
2. The slave station management method as described in claim 1, characterized in that, Before the step of determining the target I / O address corresponding to the target bus address based on the target bus address and the first mapping relationship between the preset bus address and I / O address, the method further includes: Obtain the configuration file, wherein the configuration file is either default or configured. Based on the configuration file, a first mapping relationship between the preset bus address and the I / O address is determined, and a second mapping relationship between the preset I / O address and the function ID is determined. Save the first mapping relationship and the second mapping relationship.
3. The slave station management method as described in claim 2, characterized in that, The first mapping relationship between the preset bus address and the IO address, and the second mapping relationship between the preset IO address and the function ID, are stored in a mapping table.
4. The slave station management method as described in claim 1, characterized in that, Before the step of determining the target bus address corresponding to the currently pending service issued by the master station, the following steps are included: If an update instruction configured by the slave station is received, the target to be updated corresponding to the update instruction is determined, and the update file corresponding to the target to be updated is received; The target to be updated includes at least one of the protocol switch configuration to be updated and the mapping relationship to be updated. The protocol switch configuration is used to control the use of various protocols. The mapping relationship includes a first mapping relationship between a preset bus address and an I / O address and a second mapping relationship between a preset I / O address and a function ID. The configuration file of the target to be updated on the slave station is updated to the updated file, so as to determine the processing strategy for the corresponding current pending business based on the updated file.
5. The slave station management method as described in claim 4, characterized in that, The protocol switch configuration is used to control whether various protocols are available and to control the transmission information when transmitting the currently pending service using the corresponding protocol.
6. The slave station management method as described in claim 1, characterized in that, After the step of transmitting the currently pending service to the slave station functional module, the method further includes: Determine the feedback information after the slave station functional module processes the currently pending service; Based on the target bus address, the feedback information is fed back to the master station using the protocol corresponding to the current pending service.
7. A management device for a slave station, characterized in that, The management device of the slave station includes: The determination module is used to determine the target bus address corresponding to the current pending service issued by the master station. Each pending service corresponds to a bus address, and each bus address corresponds to a slave station functional module. After the master station determines the type of the current pending service, the master station transmits the current pending service in any protocol and determines the same bus address corresponding to the slave station according to the type of the current pending service. Different protocols correspond to different physical buses. The filtering module is used to determine the target I / O address corresponding to the target bus address based on the target bus address and a first mapping relationship between the preset bus address and I / O address; The matching module is used to determine the target function ID corresponding to the target IO address based on the target IO address and a second mapping relationship between a preset IO address and a function ID; The transmission module includes: The second determining submodule is used to determine the corresponding slave station function module based on the target function ID; The third determining submodule is used to determine the triggering method of the slave station function module; The detection module is used to detect whether the signal triggering method corresponding to the target function ID is the same as the triggering method; The transmission submodule is used to transmit the currently pending service to the slave station function module only if the signal triggering method is the same as the triggering method, so that the slave station function module can process the currently pending service.
8. A management device for a slave station, characterized in that, The slave station's management equipment includes: a memory, a processor, and a program stored in the memory for implementing the slave station's management methods. The memory is used to store the program that implements the management method of the slave station; The processor is used to execute a program that implements a slave management method to implement the steps of the slave management method as claimed in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium stores a program that implements a slave station management method, and the program that implements the slave station management method is executed by a processor to implement the steps of the slave station management method as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Industrial field bus virtualization system, method and apparatus
CN109002405A
Data transmission method and device, broadband field bus equipment, system and medium
CN114338269A