Transmission adapter, adapter cascading host, communication cascading method of adapter cascading host and related equipment
By automatically configuring the communication address in the transmission adapter, the problem of large workload and lack of flexibility caused by manual address configuration in the prior art is solved, realizing the convenience and flexibility of transmission adapter cascading.
Patent Information
- Application Number
- CN202511512844.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2026-02-24
AI Technical Summary
When existing transmission adapters are cascaded, the communication address needs to be manually configured, which results in a large workload and insufficient flexibility and convenience, and makes it impossible to arbitrarily increase or change the number and order of slave devices.
By configuring a communication cascading method in the transmission adapter, each adapter reads the sub-machine address generated by the previous level after connecting to the cascading system, and automatically configures it as its own communication address to determine the address of the next level, thus forming an automatic address allocation mechanism.
It improves the flexibility and ease of use of transmission adapter cascading, reduces the workload of manual debugging, and allows for the addition or reduction of the number of slave units and the reordering of their sequence at any time.
Smart Images

Figure CN121567682A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a transmission adapter, an adapter cascade host, a communication cascade method thereon, and related equipment. Background Technology
[0002] With the development of material network technology and wireless communication technology, the application of handheld devices in various industries is gradually increasing. Especially in important industrial sectors such as power, oil and petrochemicals, and rail transportation, they have become indispensable tools for daily inspections and equipment maintenance. For information security reasons, handheld devices in such scenarios are generally not allowed to conduct wireless data interaction over public networks. To enable efficient and convenient data interaction between handheld devices and computers, transmission adapters have emerged. As a communication medium between handheld devices and host computers, the transmission adapter can send uplink data from the handheld device to the host computer and downlink data from the host computer to the handheld device. It also has the function of charging the handheld device.
[0003] In related technologies, to flexibly handle scenarios with a large number of handheld devices, a combination scheme of one master unit and multiple slave units is typically used to combine transmission adapters, enabling simultaneous transmission of data from multiple handheld devices. Currently, during the on-site installation and commissioning of cascaded transmission adapters, communication addresses need to be configured for the adapter slave units, which increases the workload of relevant personnel. Moreover, after commissioning, the number of adapter slave units cannot be increased or their order changed at will, limiting the flexibility of using combined transmission adapters. Summary of the Invention
[0004] The main objective of this application is to provide a transmission adapter, an adapter cascading host, a communication cascading method thereon, and related equipment, aiming to improve the flexibility and ease of use of transmission adapter cascading.
[0005] To achieve the above objectives, one aspect of this application proposes a communication cascading method for a transmission adapter, comprising the following steps: In response to the startup command of the transmission adapter itself, read the address of the first slave machine generated by the previous level transmission adapter; Configure the first sub-machine address as the local machine's communication address, and determine the second sub-machine address based on the first sub-machine address; The second submachine address is stored in the local machine to wait for the next-level transmission adapter to read the second submachine address.
[0006] In some embodiments, determining the second sub-machine address based on the first sub-machine address includes the following steps: Add a preset first value to the first slave address to generate the second slave address; Alternatively, the second sub-machine address can be generated by subtracting a preset second value from the first sub-machine address.
[0007] To achieve the above objectives, another aspect of this application provides a communication cascading method for adapter-cascaded hosts, comprising the following steps: In response to the cascading configuration command of the adapter cascading host, initialize the default address of the slave machine according to the preset initialization rules; The default address of the submachine is stored in the local machine to wait for the first-level transmission adapter to read the default address of the submachine; the default address of the submachine is used as the first submachine address read by the first-level transmission adapter.
[0008] In some embodiments, the communication cascading method of the adapter cascading host further includes the following steps: Determine the set of sub-machine addresses according to the preset sub-machine address configuration rules; Based on the submachine address set, poll the corresponding transmission adapter to obtain the query feedback from the transmission adapter; The number of transmission adapters connected to the cascaded host of each transmission adapter is determined based on the query feedback from each transmission adapter.
[0009] In some embodiments, determining the number of transmission adapters connected to the cascaded host based on the query feedback of each transmission adapter includes the following steps: Initialize the quantity to zero; The query feedback from the transmission adapter is checked sequentially according to the order of the sub-machine addresses in the sub-machine address set. If the query feedback from the current transmission adapter indicates that the query was successful, increment the quantity by 1; If the query feedback from the current transport adapter indicates that the query failed, output the most recently updated quantity.
[0010] To achieve the above objectives, another aspect of this application provides a transmission adapter, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the communication cascading method of the transmission adapter.
[0011] To achieve the above objectives, another aspect of this application provides an adapter cascading host, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the communication cascading method of the adapter cascading host described above.
[0012] To achieve the above objectives, another aspect of the embodiments of this application proposes a communication cascading system for transmission adapters, including the aforementioned adapter cascading host and at least one of the aforementioned transmission adapters, wherein the communication addresses of the adapter cascading host and the plurality of transmission adapters are cascaded and interact.
[0013] In some embodiments, the data communication interfaces of multiple transmission adapters are connected in parallel to the adapter cascade host via a communication bus, and the communication address configuration interfaces of the multiple transmission adapters are connected serially.
[0014] To achieve the above objectives, another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described communication cascading method for a transmission adapter or adapter-cascaded host.
[0015] The embodiments of this application include at least the following beneficial effects: This application provides a transmission adapter, an adapter cascading host, a communication cascading method thereon, and related equipment. This solution configures a communication cascading method in the transmission adapter. After each transmission adapter is connected to the cascading system and started, it reads the first sub-machine address generated by the previous level transmission adapter, then automatically configures the first sub-machine address as its own communication address, and determines the second sub-machine address based on the first sub-machine address. The second sub-machine address is stored in the local machine so that when the next level transmission adapter is connected to the cascading system, it can also read the second sub-machine address to configure its own communication address. This eliminates the need for manual debugging of the addresses of each transmission adapter in the cascading system, improving the flexibility and ease of use of transmission adapter cascading. Attached Figure Description
[0016] Figure 1 This is a flowchart of the communication cascading method for the transmission adapter provided in the embodiments of this application; Figure 2 This is a flowchart of the communication cascading method for adapter cascading hosts provided in the embodiments of this application; Figure 3 This is a schematic diagram of a communication cascading system provided in an embodiment of this application; Figure 4 This is a schematic diagram of the submachine address allocation logic of the communication cascading system provided in the embodiments of this application; Figure 5 This is a schematic diagram of the overall structure of the communication cascading system provided in the embodiments of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0019] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0020] RS485 communication bus is an industry standard serial communication protocol that uses differential signal transmission. It has high anti-interference capability and long-distance transmission characteristics, and is widely used in industrial automation, building control and other fields.
[0021] CAN (Controller Area Network) bus is a serial communication protocol designed for real-time applications. It uses differential signal transmission, supports multi-node distributed control, and was originally developed for automotive electronic systems. It is now widely used in industrial automation, medical equipment and other fields.
[0022] The RS422 (TIA / EIA-422) communication bus is a differential serial communication standard developed by the Electronic Industries Association (EIA) of the United States. It is designed for long-distance, high-interference-resistant full-duplex communication.
[0023] LIN (Local Interconnect Network) bus is a low-cost, single-master, multi-slave serial communication protocol based on the UART / SCI interface. The master node is responsible for scheduling bus access and sending frame headers (including synchronization signals and protected IDs), while slave nodes only respond to master node commands. .
[0024] In related technologies, different industrial application scenarios have varying requirements for the number of handheld devices. In some power grid testing scenarios, the number of handheld devices is typically between 1 and 4, with a few cases reaching 6 or even 8. A common approach is to use a combination of one master unit and multiple slave units to combine the transmission adapters. The number of slave units (i.e., transmission adapters) is configured according to actual needs to accommodate the data transmission requirements and economic considerations of a certain number of handheld devices in the application scenario. Based on this approach, there may be situations where one master unit is used with 1 to 4 slave units. During on-site installation and commissioning, communication addresses need to be configured for the adapter slave units, inevitably increasing the workload. Moreover, after commissioning, the number of slave units cannot be increased or their order changed at will, making installation, use, and subsequent maintenance quite troublesome.
[0025] In view of this, this application provides a transmission adapter, an adapter cascading host, a communication cascading method, and related devices. This solution configures a communication cascading method in the transmission adapter. After each transmission adapter is connected to the cascading system and started, it reads the first sub-machine address generated by the previous level transmission adapter, then automatically configures the first sub-machine address as its own communication address, determines the second sub-machine address based on the first sub-machine address, and stores the second sub-machine address in its own machine. This allows it to read the second sub-machine address for its own communication address configuration when the next level transmission adapter is connected to the cascading system. This eliminates the need for manual debugging of the addresses of each transmission adapter in the cascading system, improving the flexibility and ease of use of transmission adapter cascading.
[0026] This application provides a transmission adapter, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement, for example... Figure 1 The communication cascading method of the transmission adapter is shown below: S101, in response to the startup command of the transmission adapter itself, reads the first slave address generated by the previous level transmission adapter; S102, configure the first sub-machine address as the local machine's communication address, and determine the second sub-machine address based on the first sub-machine address; S103, store the address of the second slave device in the local machine, and wait for the next level transmission adapter to read the address of the second slave device.
[0027] In some embodiments, the transmission adapter further includes a data communication interface, a communication address configuration interface, at least one key interface, and a charging interface. The data communication interface is connected to the adapter cascade host for data interaction; the data communication interface and the adapter cascade host can be connected via wired or wireless means. The communication address configuration interface may include a communication address reading interface and a communication address output interface. The communication address reading interface is used to read a first slave address from the adapter cascade host or other transmission adapters, and the communication address output interface is used to store a second slave address generated locally. The key interface is used to connect to a handheld device and read data from the handheld device. The charging interface is used to charge the handheld device.
[0028] In step S101 of some embodiments, several transmission adapters are sequentially cascaded to the adapter cascade host to form a communication cascade system. For the first-level transmission adapter, upon power-on (i.e., upon receiving the local startup command), it reads a default slave address generated by the adapter cascade host through its communication address reading interface. This default slave address serves as the first slave address read by the first-level transmission adapter. For the second-level and subsequent transmission adapters, upon power-on (i.e., upon receiving the local startup command), they read the first slave address generated by the previous-level transmission adapter through their communication address reading interface.
[0029] In step S102 of some embodiments, for each transmission adapter, the first slave address it reads is configured as its own communication address, and a second slave address is determined according to the first slave address and certain slave address configuration rules. This second slave address is subsequently used as the communication address of the next-level transmission adapter. It should be noted that all transmission adapters use the same slave address configuration rules.
[0030] In an example of a sub-machine address configuration rule, step S102, determining the second sub-machine address based on the first sub-machine address, may include, but is not limited to, the following steps: S201, add the first preset value to the first slave address to generate the second slave address.
[0031] For example, the transmission adapter acts as a slave unit in a communication cascade system. The host (i.e., the adapter cascade host) and the slave units use three address lines for address configuration. The first slave unit connected to the host is assigned an address by the host, which is 000 by default. Each time the slave unit powers on, it reads the address of the first slave unit from the communication address port as its own communication address, and adds a first value (e.g., 1) to this address to generate the address of the second slave unit. This second slave unit address is then output to the next slave unit, and so on, to complete the address assignment for all slave units.
[0032] In another example of a submachine address configuration rule, step S102, determining the second submachine address based on the first submachine address, may also include, but is not limited to, the following steps: S301, subtract the preset second value from the first slave address to generate the second slave address.
[0033] For example, the first slave device connected to the host is assigned an address by the host, which is 111 by default. Each time the slave device is powered on, it reads the address of the first slave device from the communication address port as its own communication address, and subtracts a second value (e.g., subtract 1) from the address to generate the second slave device address. This second slave device address is then output to the next level slave device, and so on, so that the address assignment of all slave devices can be completed.
[0034] In another example of a submachine address configuration rule, step S102, determining the second submachine address based on the first submachine address, may also include, but is not limited to, the following steps: S401, Traverse the address pool stored in the local machine to determine the first index number corresponding to the first slave address; S402, increment the first index number by 1 to determine the second index number; S403, extract the second slave address from the address pool according to the second index number.
[0035] For example, the host and slave machines use three address lines for address configuration. Based on this, an address pool {000, 001, 010, 011, 100, 101, 110, 111} containing all usable addresses can be preset. It should be noted that the preset address pool can be set according to the address range that the address lines can represent. This application embodiment does not limit the number of addresses or the address order in the address pool, as long as the addresses in the address pool are within the address range that the address lines can represent. The address pools preset in the memory of the host and all slave machines used to form the communication cascade system must be the same.
[0036] Taking an address pool of {100, 101, 110, 111, 000, 001, 010, 011} as an example, the host selects the first address 100 as the first slave address of the first slave machine. Each time the slave machine powers on, it reads the first slave address from the communication address port as its own communication address, and searches the address pool stored in advance based on this address. It then selects the next address 101 as the second slave address, which is subsequently output to the next level slave machine. This process continues until the address allocation for all slave machines is completed.
[0037] It should be noted that the slave address configuration rule used by the transmission adapter in the above embodiments is only exemplary. Other slave address configuration rules can also be used in the embodiments of this application, as long as the slave address configuration rule can determine a second slave address that is different from the first slave address based on the first slave address it reads, and the determined second slave address must be different from the slave address that has been fully configured.
[0038] In step S103 of some embodiments, for each transmission adapter, after determining the second sub-machine address based on the first sub-machine address, the second sub-machine address is stored in the local communication address output interface, so that the next-level transmission adapter can read the second sub-machine address from the communication address output interface of its previous-level transmission adapter as the first sub-machine address read by the next-level transmission adapter.
[0039] According to some embodiments of this application, after configuring the first slave address as the communication address of the local machine, the communication cascading method of the transmission adapter in the embodiments of this application may further include, but is not limited to, the following steps: S501 sends the configured communication address back to the adapter cascade host.
[0040] In this embodiment, after the transmission adapter completes the local communication address configuration, it feeds back the configured communication address to the adapter cascade host, so that the adapter cascade host can manage the slave machines in the communication cascade system, specifically by performing slave machine counts, etc.
[0041] According to some embodiments of this application, the communication cascading method of the transmission adapter in this application may further include the following steps: S601, in response to the disconnect command of the transmission adapter itself, clears the communication address configured in the local machine and the address of the second slave machine stored in the local machine.
[0042] In this embodiment, the disconnect command can refer to the transmission adapter disconnecting from the host, that is, exiting the communication cascade system. At this time, the communication address configured in the local machine and the address of the second slave machine stored in the local machine are cleared to prevent errors when reconnecting to the communication cascade system next time.
[0043] This application provides an adapter cascade host, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement, for example... Figure 2 The following describes the communication cascading method for adapter-cascaded hosts: S701, in response to the cascading configuration command of the adapter cascading host, initializes the default address of the slave machine according to the preset initialization rules; S702 stores the default address of the slave device in the local machine, waiting for the first-level transmission adapter to read the default address of the slave device; the default address of the slave device is used as the first slave device address read by the first-level transmission adapter.
[0044] In some embodiments, the adapter cascading host also includes a first data communication interface, a second data communication interface, a communication address output interface, a display screen, and human-machine interaction buttons. The first data communication interface is wired or wirelessly connected to each transmission adapter in the communication cascading system for data interaction with each transmission adapter; the second data communication interface is wired or wirelessly connected to a host computer or other computer, and can upload handheld device data collected through the transmission adapter to the computer; the communication address output interface is connected to the communication address reading interface of the first-level transmission adapter to assign a communication address (i.e., the default address of the slave device) to the first-level transmission adapter; the display screen and human-machine interaction buttons can implement corresponding functions based on the program configured in the adapter cascading host, such as displaying the number of connected transmission adapters and inputting update commands for transmission adapters.
[0045] In step S701 of some embodiments, a cascading configuration command can be generated at the moment the adapter cascading host is powered on, or the cascading configuration command can be generated via button control. Responding to the cascading configuration command, the adapter cascading host initializes the default address of the slave device according to a preset initialization rule. For example, corresponding to the slave device address configuration rule in step S201 above, the default address of the slave device can be the first address in the address range that can be represented by the address lines, such as 000 in the case of three address lines; corresponding to the slave device address configuration rule in step S301 above, the default address of the slave device can be the last address in the address range that can be represented by the address lines, such as 111 in the case of three address lines; corresponding to the slave device address configuration rules in steps S401 to S403 above, the default address of the slave device can be the first address in the address pool.
[0046] In step S702 of some embodiments, after the adapter cascade host determines the default address of the slave machine, it stores the default address of the slave machine in the communication address output interface of the local machine, so that the first-level transmission adapter can read the default address of the slave machine from the communication address output interface of the adapter cascade host as the first slave machine address read by the first-level transmission adapter.
[0047] According to some embodiments of this application, the communication cascading method of the adapter cascading host in this application may also include, but is not limited to, the following steps: S801 determines the set of sub-machine addresses according to the preset sub-machine address configuration rules; S802: Poll the corresponding transmission adapter based on the sub-machine address in the sub-machine address set to obtain the query feedback from the transmission adapter; S803 determines the number of transmission adapters for the access adapter cascaded host based on the query feedback of each transmission adapter.
[0048] In step S801 of some embodiments, the submachine address set refers to the set of all possible communication addresses that the transmission adapter of the access adapter cascaded host may use. For example, corresponding to the submachine address configuration rules of step S201 or step S301 above, the submachine address set is all addresses within the address range that the address lines can represent. For example, the submachine address set in the case of three address lines is {000, 001, 010, 011, 100, 101, 110, 111}. Corresponding to the submachine address configuration rules of steps S401 to S403 above, the communication addresses included in the submachine address set are the same as those in the address pool.
[0049] In step S802 of some embodiments, the adapter cascade host polls the corresponding transmission adapter based on the sub-machine address in the sub-machine address set to obtain the query feedback from the transmission adapter. The query feedback can be one of the following: query failure or query success or failure. That is, the transmission adapter is queried based on the sub-machine address. If data can be found (i.e., the sub-machine responds), the query is successful; otherwise, the query fails.
[0050] In some embodiments, step S803 may include, but is not limited to, the following steps: S901, initialize the quantity to zero; S902, according to the order of the sub-machine addresses in the sub-machine address set, the query feedback of the transmission adapter is checked in turn; S903, if the query feedback from the current transmission adapter indicates that the query was successful, increment the quantity by 1; S904, if the query feedback from the current transmission adapter indicates that the query failed, output the number of the most recent update.
[0051] In this embodiment, the address order in the submachine address set is the same as the communication address configuration order of the transmission adapter. For example, corresponding to the submachine address configuration rule in step S201 above, the submachine address set in the case of two address lines is {00, 01, 10, 11}. The host polls addresses 00, 01, 10, and 11 in turn. If the submachine does not respond when polling a certain address, it is considered that the address does not exist, and the number of cascaded submachines can be determined. For example, if no submachine responds when polling address 10, it is determined that only 2 submachines are cascaded.
[0052] Please refer to Figure 3This application also provides a communication cascading system for transmission adapters, including the adapter cascading host described in the previous embodiment and at least one transmission adapter described in the previous embodiment. The communication addresses between the adapter cascading host and multiple transmission adapters are cascaded and interacted, that is, the address configuration operations of different transmission adapters are linked together through a hierarchical structure to form a continuous process with dependencies. The communication cascading method of the later accessed transmission adapter depends on the execution of the communication cascading method by the previous accessed transmission adapter.
[0053] Please continue to refer to Figure 3 In this embodiment, the transmission adapter serves as a slave unit in a communication cascade system. The slave unit's data communication interface is connected in parallel to the adapter cascade host via a communication bus, enabling multiple slave units to simultaneously communicate and exchange data with the host, thereby improving the data upload efficiency of the handheld device. The communication address configuration interfaces of multiple transmission adapters are serially connected via address lines, allowing for sequential configuration of the communication addresses of the connected transmission adapters. The address allocation method in this embodiment can be used with RS485 communication buses, CAN buses, RS422 communication buses, LIN buses, etc., including but not limited to the aforementioned bus types.
[0054] In one example, please refer to Figure 5 The diagram shows the overall structure of the communication cascade system. The left side represents the adapter cascade host, and the right side contains three transmission adapters. Each transmission adapter has two key interfaces 100 for inserting handheld devices and a display panel 200. The display panel shows the function being performed by the transmission adapter (such as communication or charging). The adapter cascade host has a display control panel 300, which includes a display screen and human-machine interface buttons. The transmission adapters act as slave units. The host and slave units are cascaded via hard-wired connectors (male and female connectors), and then secured with screws. The entire product is a single unit. Upon power-up, all slave units rescan their addresses and assign addresses to the next level. For details, please refer to [reference needed]. Figure 4 The diagram illustrates the logic for submachine address allocation in a communication cascade system. The host and submachines use 2-bit address lines. The first submachine connected to the host is assigned an address by the host, for example, 00 by default. Each time a submachine powers on, it reads the address of the first submachine from the communication address reading port as its own communication address, increments the address by 1, and outputs it to the next submachine. This process continues until all submachines are assigned addresses.
[0055] Understandably, the number of address lines can be determined based on the maximum number of slave devices that may actually be used. For example, if a maximum of 4 slave devices may be used, then only 2 address lines are needed, with slave device addresses of 00, 01, 10, and 11 respectively. If the number of slave devices exceeds 4 but does not exceed 8, then 3 address lines can be used, with corresponding slave device addresses of 000, 001, 010, 011, 100, 101, 110, and 111 respectively.
[0056] Furthermore, the communication cascading system of the transmission adapter in this application embodiment can periodically re-execute the above-mentioned communication cascading method during normal operation to reallocate slave device addresses. Users can add or remove slave devices or change the cascading order of slave devices at any time during product use, and the device addresses will be automatically reallocated, so that the communication cascading system can maintain normal operation.
[0057] It is understood that the methods described in the above method embodiments are applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0058] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0059] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0060] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0061] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0062] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0063] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0064] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0065] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0066] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0067] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A communication cascading method for a transmission adapter, characterized in that, Includes the following steps: In response to the startup command of the transmission adapter itself, read the address of the first slave machine generated by the previous level transmission adapter; Configure the first sub-machine address as the local machine's communication address, and determine the second sub-machine address based on the first sub-machine address; The second submachine address is stored in the local machine to wait for the next-level transmission adapter to read the second submachine address.
2. The method according to claim 1, characterized in that, Determining the second sub-machine address based on the first sub-machine address includes the following steps: Add a preset first value to the first slave address to generate the second slave address; Alternatively, the second sub-machine address can be generated by subtracting a preset second value from the first sub-machine address.
3. A communication cascading method for adapter-cascaded hosts, characterized in that, Includes the following steps: In response to the cascading configuration command of the adapter cascading host, initialize the default address of the slave machine according to the preset initialization rules; The default address of the submachine is stored locally, waiting for the first-level transmission adapter to read the default address of the submachine; The default address of the submachine is used as the first submachine address read by the first-level transmission adapter.
4. The method according to claim 3, characterized in that, The communication cascading method for the adapter-cascaded host further includes the following steps: Determine the set of sub-machine addresses according to the preset sub-machine address configuration rules; Based on the submachine address set, poll the corresponding transmission adapter to obtain the query feedback from the transmission adapter; The number of transmission adapters connected to the cascaded host of each transmission adapter is determined based on the query feedback from each transmission adapter.
5. The method according to claim 4, characterized in that, Determining the number of transmission adapters connected to the cascaded host based on the query feedback of each transmission adapter includes the following steps: Initialize the quantity to zero; The query feedback from the transmission adapter is checked sequentially according to the order of the sub-machine addresses in the sub-machine address set. If the query feedback from the current transmission adapter indicates that the query was successful, increment the quantity by 1; If the query feedback from the current transport adapter indicates that the query failed, output the most recently updated quantity.
6. A transmission adapter, characterized in that, The transmission adapter includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 2.
7. A cascaded adapter host, characterized in that, The adapter cascade host includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 3 to 5.
8. A communication cascading system for a transmission adapter, characterized in that, It includes the adapter cascading host as described in claim 7 and at least one transport adapter as described in claim 6, wherein the adapter cascading host and the plurality of transport adapters perform cascading interaction of communication addresses.
9. The communication cascading system of the transmission adapter according to claim 8, characterized in that, The data communication interfaces of multiple transmission adapters are connected in parallel to the adapter cascade host via a communication bus, and the communication address configuration interfaces of multiple transmission adapters are connected serially.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.