Method and system for quick communication of series modules

文档序号:1925246 发布日期:2021-12-03 浏览:5次 中文

阅读说明:本技术 一种串联模块快速通讯的方法及系统 (Method and system for quick communication of series modules ) 是由 沈晔 苏建华 于 2021-11-08 设计创作,主要内容包括:本发明涉及串联模块快速通讯的方法,包括以下步骤:初始状态下,参与串联的模块上的两个数据端口默认为输入状态;控制器的两个数据端口分别从串联的模块组两端同时发送数据组,两组数据组其一的多个数据包顺序排列,另一的多个数据包倒序排列,模块的一个数据端口接收到数据包时,进行数据有效检测,有效检测通过后,对接收到的第一组数据包进行数据采样存储以及切换模块的另一数据端口为输出状态的操作,再通过切换为输出状态后的数据端口对后续接收到的数据包进行数据整形转发;在进行通讯时,可以从串联的模块组的两端同时进行数据的发送动作,从而可以大幅提升通讯效率,且系统连接方式简单,使用方便。(The invention relates to a method for quickly communicating serial modules, which comprises the following steps: in an initial state, default input states of two data ports on modules participating in series connection are set; two data ports of the controller respectively send data groups from two ends of a module group connected in series, a plurality of data packets of one of the two data groups are arranged in sequence, a plurality of data packets of the other data group are arranged in reverse sequence, when one data port of the module receives a data packet, effective data detection is carried out, after the effective detection is passed, data sampling storage is carried out on the received first group of data packets, the operation that the other data port of the module is switched to be in an output state is carried out, and then data shaping and forwarding are carried out on the subsequently received data packets through the data port switched to be in the output state; when the communication is carried out, the data can be sent from the two ends of the module groups connected in series, so that the communication efficiency can be greatly improved, and the system is simple in connection mode and convenient to use.)

1. A method for fast communication of series modules is characterized by comprising the following steps:

the first step is as follows: in an initial state, default input states of two data ports on modules participating in series connection are set;

the second step is that: two data ports of the controller respectively send data groups from two ends of the serially connected module groups at the same time, a plurality of data packets of one of the two data groups are arranged in sequence, a plurality of data packets of the other data group are arranged in reverse sequence, and the sum of the data packets of the two data groups is equal to or more than the total number of the serially connected modules;

the third step: when one data port of the module receives a data packet, effective data detection is carried out, after the effective detection is passed, data sampling storage is carried out on the received first group of data packets, the other data port of the module is switched to be in an output state, and then data shaping forwarding is carried out on the subsequently received data packets through the data port switched to be in the output state.

2. The method for serial module fast communication according to claim 1, further comprising a fourth step of: after one data port of the module receives the communication ending instruction, the two data ports of the module are recovered to be in a default input state to wait for next communication.

3. The method for the serial module fast communication according to claim 2, wherein in the fourth step, the communication end command is represented by a low level.

4. A method for fast serial module communication according to any of claims 1-3, wherein in the third step, the input and output states of the two data ports are adjusted according to the level change of the two data ports on the module.

5. A system for serial module fast communication for implementing a method for serial module fast communication according to any of claims 1-4, comprising a controller and a plurality of serially coupled modules;

the controller simultaneously transmits data groups from two ends of the serially connected module groups by utilizing two data ports of the controller, a plurality of data packets of one of the two data groups are sequentially arranged, a plurality of data packets of the other data group are reversely arranged, and the sum of the data packets of the two data groups is equal to or more than the total number of the serially connected modules;

in the initial state, the module defaults to an input state at two data ports;

the module is used for carrying out effective data detection on the received data packets, carrying out data sampling storage on the received first group of data packets and switching the other data port of the module to be in an output state after the effective detection is passed, and then carrying out data shaping and forwarding on the subsequently received data packets through the data port switched to be in the output state.

6. The system for the serial module fast communication according to claim 5, wherein the module comprises a port output control unit, a data valid detection unit, a data sampling storage unit and a data shaping forwarding unit which are electrically connected in sequence;

the port output control unit is electrically connected with the two data ports of the module and used for adjusting the input and output states of the two data ports according to the level change;

the data effective detection unit is used for receiving the data packets of the two data ports and checking the data packets, and sending the data packets to the data sampling storage unit for storing the first group of data packets after the data packets pass the checking;

and the data shaping and forwarding unit is used for receiving the subsequent data packet sent by the data sampling storage unit and sending the subsequent data packet to the next module through a data port.

7. The system according to claim 6, wherein the data valid detection unit is electrically connected to both data ports of the module, and the data transmission direction is from the data port to the data valid detection unit.

8. The system according to claim 6, wherein the data shaping and forwarding unit is electrically connected to both data ports of the module, and the data transmission direction is from the data valid detection unit to the data port.

Technical Field

The invention relates to the technical field of serial module communication, in particular to a method and a system for fast communication of serial modules.

Background

A conventional series module system generally comprises a controller having a data output and a plurality of series modules having a data input and a data output, the series system communicating in such a way that the data output of the controller is connected to the input of a first module and the output of that module is connected to the input of the next module, in such a way that the plurality of modules are connected in series.

When communication is needed, the controller continuously and serially sends data of each module from the data output end, the first module starts to receive the first group of data after receiving the data sent by the controller, the received subsequent data is forwarded and output from the output end of the module to the next stage after the receiving is finished, the input end of the next module starts to receive the first group of data of the forwarded data after receiving the data forwarded by the previous module, the subsequently received data is forwarded and output from the output end to the next stage after the receiving is finished, and the data sending from the controller to the plurality of modules is realized by analogy.

The total time length of one communication is related to the length of data received by each module, the number of modules connected in series and the data sending rate of the controller. The communication protocol has determined the communication data rate and the length of each group of data, so the more the number of the serial modules is, the longer the communication is often, and the communication efficiency of the system is affected.

Disclosure of Invention

The present invention provides a method for fast communication between serial modules and a system for fast communication between serial modules, which are directed to overcome the above-mentioned drawbacks of the prior art.

The technical scheme adopted by the invention for solving the technical problems is as follows:

a method for constructing a serial module rapid communication is provided, wherein the method comprises the following steps:

the first step is as follows: in an initial state, default input states of two data ports on modules participating in series connection are set;

the second step is that: two data ports of the controller respectively send data groups from two ends of the serially connected module groups at the same time, a plurality of data packets of one of the two data groups are arranged in sequence, a plurality of data packets of the other data group are arranged in reverse sequence, and the sum of the data packets of the two data groups is equal to or more than the total number of the serially connected modules;

the third step: when one data port of the module receives a data packet, effective data detection is carried out, after the effective detection is passed, data sampling storage is carried out on the received first group of data packets, the other data port of the module is switched to be in an output state, and then data shaping forwarding is carried out on the subsequently received data packets through the data port switched to be in the output state.

The invention relates to a method for quickly communicating serial modules, which further comprises the following steps: after one data port of the module receives the communication ending instruction, the two data ports of the module are recovered to be in a default input state to wait for next communication.

In the method for the rapid communication of the serial module, in the fourth step, the communication ending instruction is represented by a low level.

In the third step, the input and output states of the two data ports are adjusted according to the level change of the two data ports on the module.

A system for the quick communication of the serial modules is used for realizing the method for the quick communication of the serial modules, and comprises a controller and a plurality of modules which are connected in series;

the controller simultaneously transmits data groups from two ends of the serially connected module groups by utilizing two data ports of the controller, a plurality of data packets of one of the two data groups are sequentially arranged, a plurality of data packets of the other data group are reversely arranged, and the sum of the data packets of the two data groups is equal to or more than the total number of the serially connected modules;

in the initial state, the module defaults to an input state at two data ports;

the module is used for carrying out effective data detection on the received data packets, carrying out data sampling storage on the received first group of data packets and switching the other data port of the module to be in an output state after the effective detection is passed, and then carrying out data shaping and forwarding on the subsequently received data packets through the data port switched to be in the output state.

The invention relates to a system for quickly communicating serial modules, wherein each module comprises a port output control unit, a data effective detection unit, a data sampling storage unit and a data shaping and forwarding unit which are electrically connected in sequence;

the port output control unit is electrically connected with the two data ports of the module and used for adjusting the input and output states of the two data ports according to the level change;

the data effective detection unit is used for receiving the data packets of the two data ports and checking the data packets, and sending the data packets to the data sampling storage unit for storing the first group of data packets after the data packets pass the checking;

and the data shaping and forwarding unit is used for receiving the subsequent data packet sent by the data sampling storage unit and sending the subsequent data packet to the next module through a data port.

According to the system for the quick communication of the serial modules, the data effective detection unit is electrically connected with the two data ports of the modules, and the data transmission direction is from the data ports to the data effective detection unit.

The system for the quick communication of the serial modules is characterized in that the data shaping and forwarding unit is electrically connected with two data ports of the modules, and the data transmission direction is from the data effective detection unit to the data ports.

The invention has the beneficial effects that: by applying the method, a data output end is added on the controller, and the modules participating in series connection are configured, so that the two data ports on the controller can automatically switch input and output states according to the existence of data reception, and can carry out verification, sampling storage and forwarding of data packets, the reliability of the system is enhanced, and when communication is carried out, data sending actions can be simultaneously carried out from the two ends of the module groups connected in series, so that the communication efficiency can be greatly improved, and the system is simple in connection mode and convenient to use.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention will be further described with reference to the accompanying drawings and embodiments, wherein the drawings in the following description are only part of the embodiments of the present invention, and for those skilled in the art, other drawings can be obtained without inventive efforts according to the accompanying drawings:

FIG. 1 is a flow chart of a method for fast serial module communication in accordance with a preferred embodiment of the present invention;

FIG. 2 is a schematic diagram of a system for fast serial module communication according to a preferred embodiment of the present invention;

FIG. 3 is a block diagram of a system for fast serial module communication in accordance with a preferred embodiment of the present invention;

FIG. 4 is a diagram illustrating the composition of a controller packet according to a preferred embodiment of the present invention;

FIG. 5 is a diagram illustrating the transmission of a controller packet according to a preferred embodiment of the present invention;

FIG. 6 is a schematic diagram of another controller packet transmission according to a preferred embodiment of the present invention;

fig. 7 is a diagram illustrating further controller packet transmission according to a preferred embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without inventive step, are within the scope of the present invention.

The method for the serial module fast communication according to the preferred embodiment of the present invention, as shown in fig. 1, includes the following steps:

s01: in an initial state, default input states of two data ports on modules participating in series connection are set;

s02: two data ports of the controller respectively send data groups from two ends of the serially connected module groups at the same time, a plurality of data packets of one of the two data groups are arranged in sequence, a plurality of data packets of the other data group are arranged in reverse sequence, and the sum of the data packets of the two data groups is equal to or more than the total number of the serially connected modules;

s03: when one data port of the module receives a data packet, effective data detection is carried out, after the effective detection is passed, data sampling storage is carried out on the received first group of data packets, the other data port of the module is switched to be in an output state, and then data shaping and forwarding are carried out on the subsequently received data packets through the data port switched to be in the output state;

by applying the method, a data output end is added on the controller, and the modules participating in series connection are configured, so that the two data ports on the controller can automatically switch input and output states according to the existence of data reception, and can carry out verification, sampling storage and forwarding of data packets, the reliability of the system is enhanced, and when communication is carried out, data sending actions can be simultaneously carried out from the two ends of the module groups connected in series, so that the communication efficiency can be greatly improved, and the system is simple in connection mode and convenient to use.

Preferably, the method further comprises S04: after one data port of the module receives a communication ending instruction, two data ports of the module are recovered to be in a default input state to wait for next communication; preferably, the communication ending command is represented by a low level; the smooth operation of the next communication is ensured;

preferably, in the third step, the input and output states of the two data ports are adjusted according to the level change of the two data ports on the module; the response speed is fast, the setting is simple, and the reliability is good.

A system for fast serial module communication, for implementing the method for fast serial module communication as described above, as shown in fig. 2, while participating in fig. 3, comprises a controller and a plurality of serially connected modules;

the controller simultaneously transmits data groups from two ends of the serially connected module groups by utilizing two data ports of the controller, a plurality of data packets of one of the two data groups are sequentially arranged, a plurality of data packets of the other data group are reversely arranged, and the sum of the data packets of the two data groups is equal to or more than the total number of the serially connected modules;

in the initial state, the module defaults to an input state at two data ports;

the module is used for carrying out effective data detection on the received data packets, carrying out data sampling storage on the received first group of data packets and switching the other data port of the module to be in an output state after the effective detection is passed, and then carrying out data shaping and forwarding on the subsequently received data packets through the data port switched to be in the output state;

by applying the method, a data output end is added on the controller, and the modules participating in series connection are configured, so that the two data ports on the controller can automatically switch input and output states according to the existence of data reception, and can carry out verification, sampling storage and forwarding of data packets, the reliability of the system is enhanced, and when communication is carried out, data sending actions can be simultaneously carried out from the two ends of the module groups connected in series, so that the communication efficiency can be greatly improved, and the system is simple in connection mode and convenient to use.

Preferably, the module includes a port output control unit 100, a data validity detection unit 101, a data sampling storage unit 102 and a data shaping forwarding unit 103, which are electrically connected in sequence;

a port output control unit 100 electrically connected to the two data ports of the module, for adjusting the input and output states of the two data ports according to the level variation;

the data effective detection unit 101 is used for receiving the data packets of the two data ports and checking the data packets, and sending the data packets to the data sampling storage unit 102 to store the first group of data packets after the data packets pass the checking;

the data shaping and forwarding unit 103 is configured to receive a subsequent data packet sent by the data sampling and storing unit 102 and send the subsequent data packet to a next module through a data port;

the system has simple structure, high response speed and good data processing reliability.

Preferably, the data validity detection unit 101 is electrically connected to both data ports of the module, and the data transmission direction is from the data ports to the data validity detection unit 101.

Preferably, the data shaping and forwarding unit 103 is electrically connected to both data ports of the module, and the data transmission direction is from the data shaping and forwarding unit 103 to the data ports.

As shown in fig. 2-7, specific examples are illustrated below:

the technical scheme of the patent comprises a controller and 2n modules, the system is composed as shown in figure 2, and the controller is provided with two data output ends DA/DB. As shown in fig. 3, the serial communication module has two ports default to input, and the module automatically adjusts input and output states according to level changes of the two data ports IO _ a and IO _ B. Each module only stores the received first group (namely m bits) of data in each communication process, subsequently received data are directly forwarded from another port and output to the next-stage module, and each module restores the respective two data ports to the default input state after receiving the low level (namely the RESET state) which is longer than the TR time, and waits for the next communication.

The A end of the controller is connected with one data end of the module 1, one data end of the other data end module 2 of the module 1, and so on, 2n modules are connected in series, and one data end of the 2n module is connected with the B end of the controller;

the communication data used by the system represents the state of the data 0/1 by high and low level changes, and common coding modes such as return-to-zero codes and non-return-to-zero codes can be used, and the coding type is not the content of the invention and is not described in detail.

The output end of the controller outputs a low level, namely a RESET state by default, the RESET state which is longer than TR time represents the end of communication, and the controller needs T time for sending a module data.

If the serial system is based on the usual communication mode, the controller sends serial data format as shown in fig. 4, 2n modules connected in series at least need 2 nxt + TR time to complete one communication;

according to the scheme of the patent, two ends of controllers DA and DB transmit data simultaneously, the data of the DA end is arranged according to the sequence of series modules, namely D1, D2 and D3 … … Dn, and the data of the DB end is arranged according to the reverse sequence, namely D2n, D2n-1 and D2n-2 … … Dn +1, as shown in FIG. 5.

The DA end starts to output data, the IO _ a end of the module 1 receives data sent by the DA end of the controller, so that the IO _ B is configured as an output end, and simultaneously receives the first group of received data D1, and after the reception is completed, the subsequent received data is forwarded from the IO _ B end and output to the next stage. The IO _ a end of the module 2 receives the data output by the module 1, so that the IO _ B is configured as an output end, and at the same time, the received first group of data D2 is received and stored, and after the reception is completed, the subsequent received data is forwarded from the IO _ B end and output to the next stage.

The DB end starts to output data, the IO _ B end of the module 2n receives data sent by the DB end of the controller, so that the IO _ a is configured as an output end, and receives the first group of received data D2n at the same time, and after receiving, the subsequent received data is forwarded from the IO _ a end to the next stage. The IO _ B end of the module 2n-1 receives the data output by the module 2n, so that the IO _ A is configured as an output end, the received first group of data D2n-1 is received and stored at the same time, and after the receiving is finished, the subsequent received data is forwarded and output to the next stage from the IO _ A end.

And by analogy, data is transmitted to the module n, the IO _ A end of the module n receives data Dn forwarded from the DA end of the controller step by step, the IO _ B is configured to be an output end, the data Dn is received and stored, a RESET state is waited after the receiving is completed, and the communication is completed.

According to the communication mode, the one-time communication time is n multiplied by T + TR, and the n multiplied by T time is reduced compared with the traditional mode;

because the two data ports of the serial module can automatically configure input and output, the two ends of the DA and the DB do not need to output the same number of data packets in each communication of the controller. As shown in fig. 6, the controller DA side sends a group of data Dn +1 more, and the module n +1 receives the data Dn +1 forwarded from the DA side step by step. Similarly, as shown in fig. 7, the module n and the module n-1 will receive the data forwarded from the DB end step by step;

it will be understood that modifications and variations can be made by persons skilled in the art in light of the above teachings and all such modifications and variations are intended to be included within the scope of the invention as defined in the appended claims.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:BIERv6报文转发的方法、设备以及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!