Anti-interference communication method and system for communication through cable

文档序号:1849482 发布日期:2021-11-16 浏览:12次 中文

阅读说明:本技术 抗干扰的通讯方法、通过线缆进行通讯的系统 (Anti-interference communication method and system for communication through cable ) 是由 关富文 赵越 杨敏恒 于 2021-07-26 设计创作,主要内容包括:本发明公开了一种抗干扰的通讯方法、通过线缆进行通讯的系统。其中抗干扰的通讯方法,包括:上位机将通讯周期内待发送的数据切分成同一固定长度的需应答的短帧数据;上位机将需应答的短帧数据发送给下位机,记录每一帧短帧数据的应答状态;对所收集的应答状态的数据进行分析,得到一个干扰周期内的干扰时间段和非干扰时间段;上位机根据每个干扰周期的干扰时间段及非干扰时间段,对待发送的数据进行处理,决定每次发送数据的时间以及数据的长度。本发明采用动态的通讯策略,将通讯收发控制在干扰较小的时间段,从而保障系统的正常运行。(The invention discloses an anti-interference communication method and a system for communication through cables. The anti-interference communication method comprises the following steps: the upper computer divides the data to be sent in the communication period into short frame data with the same fixed length and needing to respond; the upper computer sends the short frame data to be responded to the lower computer and records the response state of each frame of short frame data; analyzing the collected data of the response state to obtain an interference time period and a non-interference time period in an interference period; and the upper computer processes the data to be transmitted according to the interference time period and the non-interference time period of each interference period, and determines the time for transmitting the data each time and the length of the data. The invention adopts a dynamic communication strategy to control the communication transceiving in a time period with less interference, thereby ensuring the normal operation of the system.)

1. An interference-resistant communication method, comprising the steps of:

step 1, an upper computer divides data to be sent in a communication period into short frame data with the same fixed length and needing to respond;

step 2, the upper computer sends the short frame data to be responded to the lower computer, and the response state of each frame of short frame data is recorded;

step 3, analyzing the collected data of the response state to obtain an interference time period and a non-interference time period in an interference period;

and 4, processing the data to be transmitted by the upper computer according to the interference time period and the non-interference time period of each interference period, and determining the time for transmitting the data each time and the length of the data.

2. The method of claim 1, wherein the host computer sends short frame data for at least one communication cycle to the host computer until the obtained response status can be analyzed for the interference cycle.

3. The method according to claim 1, wherein in step 4, the upper computer suspends data transmission in each interference time period, and determines whether to transmit the short frame data or the framing data according to a time length of a next non-interference time period before the next non-interference time period.

4. The anti-interference communication method according to claim 3, wherein in the step 4, when the upper computer does not receive the response status of the corresponding short frame data or the corresponding framing data in the non-interference time period, the steps 1 to 3 are re-executed, and after the interference time period and the non-interference time period in a new interference cycle are obtained, the step 4 is continuously executed.

5. The method according to any of claims 1 to 4, wherein the steps 1 to 4 are performed when the upper computer receives a user-defined interference rejection mode.

6. The method of claim 1, wherein the upper computer and the lower computer communicate via an RS485 bus.

7. A system for communication via a cable, comprising an upper computer and at least one lower computer, wherein the upper computer and the lower computer communicate with each other using the interference-free communication method according to any one of claims 1 to 6.

8. The system of claim 7, wherein the system is a system comprising a frequency conversion device.

9. The system of claim 7, wherein the system is a hvac system.

10. The system of claim 9, wherein the upper computer is a touch screen capable of interacting with a user in a heating, ventilating and air conditioning system, and the lower computer is a motherboard for controlling a refrigeration system.

Technical Field

The present invention relates to the field of data communication technologies, and in particular, to an anti-interference communication method and a system using the same.

Background

When the existing equipment system communicates through a cable (except an optical fiber), the existing equipment system is generally easily interfered, for example, when the existing equipment system communicates through various buses, the existing equipment system is easily interfered by electromagnetic interference of devices such as a frequency converter, and the interference causes communication data of the equipment system to be easily lost.

Taking the current large-scale commercial heating ventilation air-conditioning system as an example, the air-conditioning system equipment is equipped with a high-power frequency converter, and the working frequency of a compressor is adjusted by the frequency converter when the unit equipment runs, so that the frequency conversion control is realized. When the frequency converter works, electromagnetic interference can be generated, and the electromagnetic interference enters into hardware of each controller of the unit through a power supply. When the interference is serious, the communication of the controller equipment of the unit can be influenced, so that each controller module cannot normally communicate, communication data is lost, and the unit cannot normally operate.

Therefore, how to provide an anti-interference communication method is an urgent technical problem to be solved in the industry.

Disclosure of Invention

The invention provides an anti-interference communication method and a system for communication through a cable, aiming at solving the technical problem that communication in the prior art is easily interfered by electromagnetism and the like.

The anti-interference communication method provided by the invention comprises the following steps:

step 1, an upper computer divides data to be sent in a communication period into short frame data with the same fixed length and needing to respond;

step 2, the upper computer sends the short frame data to be responded to the lower computer, and the response state of each frame of short frame data is recorded;

step 3, analyzing the collected data of the response state to obtain an interference time period and a non-interference time period in an interference period;

and 4, processing the data to be transmitted by the upper computer according to the interference time period and the non-interference time period of each interference period, and determining the time for transmitting the data each time and the length of the data.

Further, the upper computer sends short frame data of at least one communication period to the lower computer until the obtained response state can be analyzed to obtain the interference period.

Further, in the step 4, the upper computer suspends data transmission in each interference time period, and determines whether to transmit short frame data or framing data according to the time length of the next non-interference time period before the next non-interference time period comes.

Further, in the step 4, when the upper computer does not receive the response state of the corresponding short frame data or the framing data in the non-interference time period, the steps 1 to 3 are re-executed, and the step 4 is continuously executed after the interference time period and the non-interference time period in a new interference period are obtained.

Further, when the upper computer receives an anti-interference mode set by a user, executing the steps 1 to 4.

Further, the upper computer and the lower computer are communicated through an RS485 bus.

The system for communicating through the cable comprises an upper computer and at least one lower computer, wherein the upper computer and the lower computer are communicated by adopting the anti-interference communication method in the technical scheme.

Further, the system is a system comprising frequency conversion equipment.

Further, the system is a heating ventilation air conditioning system.

Furthermore, the upper computer is a touch screen capable of interacting with a user in the heating, ventilating and air conditioning system, and the lower computer is a mainboard for controlling a refrigeration system.

The invention obtains the interference period by segmenting the data, so that the upper computer can transmit the data by avoiding the interference time period, and the length (namely the size of the data and the occupied time length) of the transmitted data is determined according to the time length of the non-interference time period. The invention can detect and analyze the communication interference time sequence in the interference environment, adopt a dynamic communication strategy, avoid the interference part of the communication time period and concentrate the communication control receiving and transmitting in the time period with less interference. When the air conditioning system is applied to a specific system, such as a heating ventilation air conditioning system, the normal operation of a unit can be guaranteed.

Drawings

The invention is described in detail below with reference to examples and figures, in which:

fig. 1 is a communication structure diagram of the hvac system of the present invention.

Fig. 2 is a flow chart of the method of the present invention.

Fig. 3 is a specific example of an interference period of the present invention.

Detailed Description

In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

Thus, a feature indicated in this specification will serve to explain one of the features of one embodiment of the invention, and does not imply that every embodiment of the invention must have the stated feature. Further, it should be noted that this specification describes many features. Although some features may be combined to show a possible system design, these features may also be used in other combinations not explicitly described. Thus, the combinations illustrated are not intended to be limiting unless otherwise specified.

The principles of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.

As shown in fig. 1, in an embodiment of the present invention, an anti-interference communication method is applied to an hvac system, which has a touch screen capable of interacting with a user and at least one refrigeration system. In one embodiment, a refrigeration system refers to a compressor and other components, such as a motherboard, an inverter, etc., that operate in conjunction with the compressor. A user adopts a touch screen as an HMI upper computer, corresponding settings are input through the touch screen, and a mainboard of the refrigeration system can correspondingly control the refrigeration system according to the settings of the user. In this embodiment, the communication between the touch screen and the motherboard is performed through the RS485 bus, but the communication method is not limited to this bus communication method, and the communication methods of other cables (except the optical fiber cable) are easily interfered, and the method of the present invention can be used for performing interference-proof communication.

As shown in fig. 2, the anti-interference communication method of the present invention requires the upper computer to divide the data to be sent in the communication period into the short frame data with the same fixed length and requiring response. Then, the upper computer sequentially sends the short frame data to be responded to the lower computer, records the response state of each frame of short frame data, and obtains an interference time period and a non-interference time period in the interference period by analyzing the response states of all the short frame data in at least one communication period, as shown in fig. 3. For example, when the time length of the communication cycle is longer than the time length of the interference cycle, and two completely consistent interference cycles can be obtained after the short frame data in one communication cycle is sent, the interference time period and the non-interference time period of each interference cycle can be determined. For example, when the time length of the communication cycle is less than or equal to the time length of the interference cycle, and two completely consistent interference cycles can be obtained after the short frame data in the plurality of communication cycles are transmitted, the interference time period and the non-interference time period of each interference cycle can be determined.

And then the upper computer judges whether short frame data sent at corresponding time needs to be framed according to the length of the non-interference time period of each interference period, and the non-interference time period is avoided to send the data to be sent in the communication period to the lower computer. For example, after the current upper computer determines that the period of interference time has elapsed, the current upper computer is a non-interference time period of about 5 seconds, and then is an interference time period of 1 second, and if it is assumed that each frame of short frame data occupies 1 second, the upper computer can perform framing on the 5 frames of short frame data to be sent, and send the data together in the 5 second non-interference time period, so as to improve the communication efficiency. And then, continuously judging the time length of the non-interference time period after the interference time period of 1 second, then framing according to the situation, if the non-interference time period is only 1 second, not framing, and still sending the short frame data.

In a specific embodiment, all data (including short frame data and framing data) sent to the lower computer by the upper computer needs to be responded by the lower computer, when the upper computer does not receive the response state of the corresponding short frame data or framing data in a non-interference time period, the short frame data of at least one communication period is sent again in sequence and the corresponding response state is recorded, and a rule of a new interference period is found based on the response state of the lower computer so as to improve the communication efficiency and the success rate.

In other embodiments, after the interference period is obtained, the lower computer is not required to respond, taking the heating ventilation air conditioning system as an example, because the interference is relatively fixed and regular, when the working condition is not changed, the interference period is difficult to change once found. When the working condition changes, the upper computer obtains the response state of the lower computer through sending of short frame data of at least one communication period, so that a corresponding new rule of the interference period is found, and the purpose of timely updating can be achieved.

The heating, ventilating and air conditioning system can be carried out in a specific mode when executing the anti-interference communication method, for example, a user can set the anti-interference mode through the touch screen, the anti-interference communication method is executed only when the user sets the anti-interference mode, and otherwise, the upper computer and the lower computer carry out communication according to a conventional communication mode.

The anti-interference communication mode is not limited to be used in heating, ventilating and air conditioning systems, and can also be applied to other systems for carrying out sexual communication through cables, an upper computer and at least one lower computer are arranged in the systems, and the upper computer and the lower computer of the systems can carry out communication by adopting the anti-interference communication method. For example, the system may be a system including a frequency conversion device, because the frequency conversion device is prone to generate electromagnetic interference, and may generate corresponding interference on wired cable communication other than optical fiber, such as corresponding interference on all communication systems using buses (including but not limited to RS485 bus), so that the interference-free communication method of the present invention may be used.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:配用电通信的测试系统及测试方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!