技术领域technical field
本发明涉及电力技术领域,更具体地,涉及一种UART串口TTL电平通信双向物理监听系统及方法。The present invention relates to the field of electric power technology, and more specifically, relates to a UART serial port TTL level communication two-way physical monitoring system and method.
背景技术Background technique
电力用户用电信息采集系统为实现其自身功能,要求采集终端与控制模块、本地模块、远程通信模块等功能模块通过UART进行通信。当系统功能异常时需通过监听采集终端与各个功能模块的通信报文来排查故障,比如当终端登录主站失败时需监听终端与远程模块之间的报文交互,以确认问题。而对于用电信息采集终端通信报文的监听,传统的方法包括:In order to realize its own functions, the electricity consumption information collection system of power users requires the collection terminal to communicate with the control module, local module, remote communication module and other functional modules through UART. When the system function is abnormal, it is necessary to monitor and collect communication messages between the terminal and each functional module to troubleshoot. For example, when the terminal fails to log in to the master station, it is necessary to monitor the message interaction between the terminal and the remote module to confirm the problem. As for the monitoring of the communication messages of the electricity consumption information collection terminal, the traditional methods include:
1、扩展采集终端软件功能,在采集终端接收到报文数据时通过其它通道将报文打出。此方法需要扩展软件功能,且各终端厂家扩展软件功能的难易度不同、实现方式也不同,造成使用方法不统一;通过软件的方法监听数据报文的实时性和原始性无法保证,一定程度上不具备客观性;需占用其它通道,影响采集终端正常功能;1. Expand the software function of the acquisition terminal, and print the message through other channels when the acquisition terminal receives the message data. This method needs to expand software functions, and the difficulty of extending software functions of each terminal manufacturer is different, and the implementation methods are also different, resulting in inconsistent usage methods; the real-time and originality of monitoring data messages through software cannot be guaranteed. It is not objective; it needs to occupy other channels, which will affect the normal function of the collection terminal;
2、使用杜绑线USB转TTL,测试过程需焊接线缆,对模块造成硬件损伤、操作不便;只能监听单一方向的数据如接收或者发送,如需监听双向通信,则需两套设备两套软件,即便如此也存在监听到的双向数据报文不同步,查看收发过程不便等问题。2. Use the Duty wire USB to TTL, the test process needs to weld the cable, which will cause hardware damage to the module and inconvenient operation; it can only monitor data in one direction, such as receiving or sending, if you need to monitor two-way communication, you need two sets of equipment. Even so, there are problems such as the monitored two-way data packets are not synchronized, and it is inconvenient to check the sending and receiving process.
同时,在对数据进行查看时,目前绝大多数用电信息采集终端使用的软件平台不支持在线调试,即便是支持在线调试,使用调试程序的方法监听报文数据也存在响应不及时,查看不方便,非产品开发人员无法查看等问题。At the same time, when viewing data, most of the software platforms currently used by electricity consumption information collection terminals do not support online debugging. Convenience, problems such as non-product developers cannot view.
发明内容Contents of the invention
为了解决背景技术存在的现有技术对于用电信息采集终端通信报文的监听设备复杂、实时性和准确性无法保证、双向监听实现困难等问题,本发明提供了一种UART串口TTL电平通信双向物理监听系统及方法;所述系统及方法通过设计TTL双向监听电路,与用电信息采集终端进行连接,在不影响监听双方正常通信的情况下,实现双向监听和电平转换,实时共用户监听接收;所述一种UART串口TTL电平通信双向物理监听系统包括:In order to solve the problems existing in the background technology that the monitoring equipment for the terminal communication message of the electricity information collection terminal is complicated, the real-time performance and accuracy cannot be guaranteed, and the two-way monitoring is difficult to realize, the present invention provides a UART serial port TTL level communication A two-way physical monitoring system and method; the system and method design a TTL two-way monitoring circuit to connect with the power consumption information collection terminal, and realize two-way monitoring and level conversion without affecting the normal communication between the two monitoring parties, and share user information in real time. Monitoring reception; said a kind of UART serial port TTL level communication two-way physical monitoring system includes:
模块连接单元,所述模块连接单元用于与用电信息采集终端的功能接口连接;所述模块连接单元的输入端用于接收所述用电信息采集终端与各功能模块间的通信报文,所述模块连接单元的输出端与所述双向通信单元的输入端相连;所述功能接口包括用电信息采集终端与各功能模块间通信的TTL信号接口;所述通信报文包括发送报文以及接受报文;A module connection unit, the module connection unit is used to connect with the functional interface of the power consumption information collection terminal; the input end of the module connection unit is used to receive the communication message between the power consumption information collection terminal and each functional module, The output end of the module connection unit is connected to the input end of the two-way communication unit; the functional interface includes a TTL signal interface for communication between the power consumption information collection terminal and each functional module; the communication message includes sending a message and accept message;
双向通信单元,所述双向通信单元包括TTL双向监听电路以及信号转换电路;A two-way communication unit, the two-way communication unit includes a TTL two-way monitoring circuit and a signal conversion circuit;
所述TTL双向监听电路用于自动切换发送报文以及接受报文的传送;所述TTL双向监听电路包括发送二极管、接收二极管以及拉高电阻;所述发送二极管的负极端与发送报文的输入端相连,所述接收二极管的负极端与接收报文的输入端相连,所述发送二极管的正极端与接收二极管的正极端相连,并与拉高电阻的一端相连;所述拉高电阻的另一端置于高电平;所述TTL双向监听电路的输出端与所述发送二极管的正极端以及接收二极管的正极端相连;The TTL two-way monitoring circuit is used to automatically switch between sending messages and receiving messages; the TTL two-way monitoring circuit includes sending diodes, receiving diodes and pull-up resistors; the negative end of the sending diodes is connected to the input of sending messages The negative end of the receiving diode is connected to the input end of the received message, the positive end of the sending diode is connected to the positive end of the receiving diode, and is connected to one end of the pull-up resistor; the other end of the pull-up resistor One end is placed at a high level; the output end of the TTL bidirectional monitoring circuit is connected to the positive terminal of the sending diode and the positive terminal of the receiving diode;
所述信号转换电路用于将TTL双向监听电路的TTL电平信号转换为RS232电平信号;The signal conversion circuit is used to convert the TTL level signal of the TTL two-way monitoring circuit into an RS232 level signal;
监听单元,所述监听单元用于RS232电平信号所携带的通信报文进行监听分析,确认监听结果。A monitoring unit, the monitoring unit is used for monitoring and analyzing the communication message carried by the RS232 level signal, and confirming the monitoring result.
进一步的,所述模块连接单元的输入端包括多个输入接头,所述多个输入接头根据用电信息采集终端上各TTL信号接口的位置对应固定布置,并与对应的TTL信号接口通过插接进行连接。Further, the input end of the module connection unit includes a plurality of input connectors, and the plurality of input connectors are fixedly arranged according to the position of each TTL signal interface on the power consumption information collection terminal, and are plugged into the corresponding TTL signal interface. to connect.
进一步的,所述功能接口包括电源接口,所述电源接口用于提供电源向所述双向物理监听系统进行供电。Further, the functional interface includes a power interface, and the power interface is used to provide power to the two-way physical monitoring system.
进一步的,所述模块连接单元包括左盒模块连接子单元以及右盒模块连接子单元;所述左盒模块连接子单元上的多个输入接头与用电信息采集终端的左盒上的TTL信号接口位置对应匹配,通过插接与所述左盒上的TTL信号接口进行连接;所述右盒模块连接子单元上的多个输入接头与用电信息采集终端的右盒上的TTL信号接口位置对应匹配,通过插接与所述右盒上的TTL信号接口进行连接。Further, the module connection unit includes a left box module connection subunit and a right box module connection subunit; a plurality of input connectors on the left box module connection subunit and a TTL signal on the left box of the power consumption information collection terminal The interface positions are correspondingly matched, and are connected to the TTL signal interface on the left box by plugging; the multiple input connectors on the right box module connection subunit are connected to the TTL signal interface positions on the right box of the power consumption information collection terminal Corresponding to the matching, it is connected with the TTL signal interface on the right box by plugging.
进一步的,所述双向通信单元包括收发识别模块,所述收发识别模块用于根据UART数据传输格式对通信报文进行分析,确认所述通信报文为发送报文还是接受报文;所述收发识别模块将所述发送报文输入至TTL双向监听电路的发送报文输入端,将所述接收报文输入至TTL双向监听单路的接收报文输入端。Further, the two-way communication unit includes a sending and receiving identification module, which is used to analyze the communication message according to the UART data transmission format, and confirm whether the communication message is a sending message or an receiving message; the sending and receiving The identification module inputs the sending message to the sending message input terminal of the TTL two-way monitoring circuit, and inputs the receiving message to the receiving message input terminal of the TTL two-way monitoring single circuit.
进一步的,所述监听单元通过RS232通信接口与所述信号转换电路进行连接,根据预设完成通信配置的监听软件对通信报文进行监听分析。Further, the monitoring unit is connected to the signal conversion circuit through the RS232 communication interface, and monitors and analyzes the communication message according to the monitoring software that has completed the communication configuration by default.
所述一种UART串口TTL电平通信双向物理监听方法包括:Described a kind of UART serial port TTL level communication two-way physical monitoring method comprises:
与用电信息采集终端的功能接口连接,采集所述用电信息采集终端与各功能模块间的通信报文;所述功能接口包括用电信息采集终端与各功能模块间通信的TTL信号接口;所述通信报文包括发送报文以及接受报文;Connect with the functional interface of the power consumption information collection terminal, and collect communication messages between the power consumption information collection terminal and each functional module; the functional interface includes a TTL signal interface for communication between the power consumption information collection terminal and each functional module; The communication message includes sending a message and receiving a message;
通过TTL双向监听电路自动切换发送报文以及接受报文的传送,将所述通信报文发送至信号转换单元;Automatically switch the transmission of the sending message and the receiving message through the TTL two-way monitoring circuit, and send the communication message to the signal conversion unit;
通过信号转换单元将所述TTL电平信号转换为RS232电平信号;The TTL level signal is converted into an RS232 level signal by a signal conversion unit;
对所述RS232电平信号携带的通信报文进行监听分析,确认监听结果。Monitor and analyze the communication message carried by the RS232 level signal, and confirm the monitor result.
进一步的,所述通过TTL双向监听电路自动切换发送报文以及接受报文的传送,包括:Further, the transmission of sending and receiving messages is automatically switched by the TTL two-way monitoring circuit, including:
根据UART数据传输格式对通信报文进行分析,确认所述通信报文为发送报文还是接受报文;Analyze the communication message according to the UART data transmission format, and confirm whether the communication message is a sending message or an receiving message;
所述TTL双向监听电路包括发送二极管、接收二极管以及拉高电阻;所述发送二极管的负极端与发送报文的输入端相连,所述接收二极管的负极端与接收报文的输入端相连,所述发送二极管的正极端与接收二极管的正极端相连,并与拉高电阻的一端相连;所述拉高电阻的另一端置于高电平;所述TTL双向监听电路的输出端与所述发送二极管的正极端以及接收二极管的正极端相连;The TTL bidirectional monitoring circuit includes a sending diode, a receiving diode and a pull-up resistor; the negative end of the sending diode is connected to the input end of the sending message, and the negative end of the receiving diode is connected to the input end of the receiving message, so The positive end of the sending diode is connected to the positive end of the receiving diode, and is connected to one end of the pull-up resistor; the other end of the pull-up resistor is placed at a high level; the output end of the TTL bidirectional monitoring circuit is connected to the sending The positive end of the diode is connected to the positive end of the receiving diode;
当所述发送报文输入至TTL双向监听电路的发送报文输入端时,接收报文输入端置于高电平,以屏蔽所述接收报文输入端,实现发送报文输入端至输出端的通信通路;When the sending message is input to the sending message input terminal of the TTL two-way monitoring circuit, the receiving message input terminal is placed at a high level to shield the receiving message input terminal, so as to realize the connection between the sending message input terminal and the output terminal. communication path;
当所述接收报文输入至TTL双向监听电路的接收报文输入端时,发送报文输入端置于高电平,以屏蔽所述发送报文输入端,实现接收报文输入端至输出端的通信通路。When the receiving message is input to the receiving message input terminal of the TTL two-way monitoring circuit, the sending message input terminal is placed at a high level to shield the sending message input terminal to realize the connection between the receiving message input terminal and the output terminal. communication pathway.
进一步的,所述与用电信息采集终端的功能接口连接,包括:Further, the functional interface connection with the electricity consumption information collection terminal includes:
模块连接单元的多个输入接头根据用电信息采集终端上各TTL信号接口的位置对应固定布置,并与对应的TTL信号接口通过插接进行连接。The multiple input connectors of the module connection unit are fixedly arranged according to the position of each TTL signal interface on the power consumption information collection terminal, and are connected with the corresponding TTL signal interface through plugging.
进一步的,采用与用电信息采集终端的左盒上的TTL信号接口位置对应匹配的多个输入接头,通过插接与所述左盒上的TTL信号接口进行连接;Further, a plurality of input connectors corresponding to the position of the TTL signal interface on the left box of the power consumption information collection terminal are used to connect with the TTL signal interface on the left box by plugging;
采用与用电信息采集终端的右盒上的TTL信号接口位置对应匹配的多个输入接头,通过插接与所述右盒上的TTL信号接口进行连接。A plurality of input connectors corresponding to the position of the TTL signal interface on the right box of the electricity consumption information collection terminal are used to connect with the TTL signal interface on the right box by plugging.
进一步的,所述对所述RS232电平信号携带的通信报文进行监听分析,包括:Further, the monitoring and analysis of the communication message carried by the RS232 level signal includes:
通过RS232通信接口与所述信号转换电路进行连接;Connect with the signal conversion circuit through the RS232 communication interface;
根据预设完成通信配置的监听软件对通信报文进行监听分析。The monitoring software that completes the communication configuration according to the preset monitors and analyzes the communication messages.
本发明的有益效果为:本发明的技术方案,给出了一种UART串口TTL电平通信双向物理监听系统及方法,所述系统及方法通过设计TTL双向监听电路,与用电信息采集终端进行连接,在不影响监听双方正常通信的情况下,实现双向监听和电平转换,实时共用户监听接收;无需扩展用电信息采集终端软件的功能,也无需修改焊接其电路,实现即插即用;所述系统及方法通过TTL双向监听电路实现了自动切换发送报文以及接受报文的传送,通过一套系统,在不影响双方正常通信的情况下,实现了对通信双方的双向监听。The beneficial effects of the present invention are: the technical scheme of the present invention provides a UART serial port TTL level communication bidirectional physical monitoring system and method. Connection, without affecting the normal communication between the monitoring parties, realize two-way monitoring and level conversion, real-time monitoring and receiving by users; no need to expand the functions of the terminal software for power consumption information collection, and no need to modify and solder its circuits, realizing plug and play The system and method realize the automatic switching of sending and receiving messages through the TTL two-way monitoring circuit, and realize the two-way monitoring of both communication parties through a set of systems without affecting the normal communication between the two parties.
附图说明Description of drawings
通过参考下面的附图,可以更为完整地理解本发明的示例性实施方式:A more complete understanding of the exemplary embodiments of the present invention can be had by referring to the following drawings:
图1为本发明具体实施方式的一种UART串口TTL电平通信双向物理监听系统的结构图;Fig. 1 is the structural diagram of a kind of UART serial port TTL level communication two-way physical monitoring system of the embodiment of the present invention;
图2为本发明具体实施方式的TTL双向监听电路的原理图;Fig. 2 is the schematic diagram of the TTL two-way monitoring circuit of the embodiment of the present invention;
图3为本发明具体实施方式的一种UART串口TTL电平通信双向物理监听方法的流程图。FIG. 3 is a flowchart of a two-way physical monitoring method for UART serial port TTL level communication according to a specific embodiment of the present invention.
具体实施方式Detailed ways
现在参考附图介绍本发明的示例性实施方式,然而,本发明可以用许多不同的形式来实施,并且不局限于此处描述的实施例,提供这些实施例是为了详尽地且完全地公开本发明,并且向所属技术领域的技术人员充分传达本发明的范围。对于表示在附图中的示例性实施方式中的术语并不是对本发明的限定。在附图中,相同的单元/元件使用相同的附图标记。Exemplary embodiments of the present invention will now be described with reference to the drawings; however, the present invention may be embodied in many different forms and are not limited to the embodiments described herein, which are provided for the purpose of exhaustively and completely disclosing the present invention. invention and fully convey the scope of the invention to those skilled in the art. The terms used in the exemplary embodiments shown in the drawings do not limit the present invention. In the figures, the same units/elements are given the same reference numerals.
除非另有说明,此处使用的术语(包括科技术语)对所属技术领域的技术人员具有通常的理解含义。另外,可以理解的是,以通常使用的词典限定的术语,应当被理解为与其相关领域的语境具有一致的含义,而不应该被理解为理想化的或过于正式的意义。Unless otherwise specified, the terms (including scientific and technical terms) used herein have the commonly understood meanings to those skilled in the art. In addition, it can be understood that terms defined by commonly used dictionaries should be understood to have consistent meanings in the context of their related fields, and should not be understood as idealized or overly formal meanings.
图1为本发明具体实施方式的一种UART串口TTL电平通信双向物理监听系统的结构图;如图1所示,所述系统包括:Fig. 1 is the structural diagram of a kind of UART serial port TTL level communication two-way physical monitoring system of the specific embodiment of the present invention; As shown in Fig. 1, described system comprises:
模块连接单元,所述模块连接单元用于与用电信息采集终端的功能接口连接;所述模块连接单元的输入端用于接收所述用电信息采集终端与各功能模块间的通信报文,所述模块连接单元的输出端与所述双向通信单元的输入端相连;所述功能接口包括用电信息采集终端与各功能模块间通信的TTL信号接口;所述通信报文包括发送报文以及接受报文;A module connection unit, the module connection unit is used to connect with the functional interface of the power consumption information collection terminal; the input end of the module connection unit is used to receive the communication message between the power consumption information collection terminal and each functional module, The output end of the module connection unit is connected to the input end of the two-way communication unit; the functional interface includes a TTL signal interface for communication between the power consumption information collection terminal and each functional module; the communication message includes sending a message and accept message;
本实施例中,所述模块连接单元是与所述用电信息采集终端的功能接口相匹配的,所述模块连接单元的输入端包括多个输入接头,所述多个输入接头根据用电信息采集终端上各TTL信号接口的位置对应固定布置,并与对应的TTL信号接口通过插接进行连接。In this embodiment, the module connection unit matches the functional interface of the power consumption information collection terminal, and the input terminal of the module connection unit includes a plurality of input connectors, and the plurality of input connectors are connected according to the power consumption information. The position of each TTL signal interface on the acquisition terminal corresponds to a fixed arrangement, and is connected with the corresponding TTL signal interface through plugging.
具体的,可以是设置在一个板上的多个输入接头,通过用电信息采集终端上各TTL信号接口的位置对应固定布置,使用时直接将此板与用电信息采集终端的功能接口相插接,就可实现匹配连接。Specifically, it may be a plurality of input connectors arranged on one board, and through the corresponding fixed arrangement of the positions of the TTL signal interfaces on the power consumption information collection terminal, the board is directly inserted into the functional interface of the power consumption information collection terminal when in use Then, a matching connection can be realized.
所述用电信息采集终端的功能模块按区分为左盒和右盒;为了对应监听左盒和右盒中用电信息采集终端与功能区间的通信,所述模块连接单元包括左盒模块连接子单元以及右盒模块连接子单元;所述左盒模块连接子单元上的多个输入接头与用电信息采集终端的左盒上的TTL信号接口位置对应匹配,通过插接与所述左盒上的TTL信号接口进行连接;所述右盒模块连接子单元上的多个输入接头与用电信息采集终端的右盒上的TTL信号接口位置对应匹配,通过插接与所述右盒上的TTL信号接口进行连接。The functional modules of the power consumption information collection terminal are divided into left box and right box; in order to monitor the communication between the power consumption information collection terminal and the functional area in the left box and the right box, the module connection unit includes a left box module connector unit and the right box module connection subunit; the plurality of input joints on the left box module connection subunit match the position of the TTL signal interface on the left box of the power consumption information collection terminal, and are connected to the left box by plugging The TTL signal interface on the right box is connected; the multiple input connectors on the right box module connection subunit are matched with the TTL signal interface positions on the right box of the power consumption information collection terminal, and are connected to the TTL on the right box by plugging. The signal interface is connected.
进一步的,所述功能接口包括电源接口,所述电源接口用于提供电源向所述双向物理监听系统进行供电。本实施例中,所述提供的电源为3.3V,用于供电路运行,并提供稳定的高电平。Further, the functional interface includes a power interface, and the power interface is used to provide power to the two-way physical monitoring system. In this embodiment, the provided power is 3.3V, which is used for circuit operation and provides a stable high level.
双向通信单元,所述双向通信单元包括收发识别模块、TTL双向监听电路以及信号转换电路;A two-way communication unit, the two-way communication unit includes a transceiver identification module, a TTL two-way monitoring circuit and a signal conversion circuit;
所述收发识别模块用于根据UART数据传输格式对通信报文进行分析,确认所述通信报文为发送报文还是接受报文;所述收发识别模块将所述发送报文输入至TTL双向监听电路的发送报文输入端,将所述接收报文输入至TTL双向监听单路的接收报文输入端。The sending and receiving identification module is used to analyze the communication message according to the UART data transmission format, and confirm whether the communication message is a sending message or an receiving message; the sending and receiving identification module inputs the sending message to TTL two-way monitoring The sending message input terminal of the circuit inputs the receiving message to the receiving message input terminal of the TTL two-way monitoring single channel.
所述UART的数据传输格式包括起始位、数据位、传输方向位、校验位、停止位;其中,所述传输方向位用于表征所传输的报文是上行方向还是下行方向(即是发送还是接受);The data transmission format of described UART comprises start bit, data bit, transmission direction bit, parity bit, stop bit; send or receive);
所述TTL双向监听电路用于自动切换发送报文以及接受报文的传送;所述TTL双向监听电路的原理图如图2所示,包括发送二极管D1、接收二极管D2以及拉高电阻R1;所述发送二极管D1的负极端与发送报文的输入端PLC_TXD相连,所述接收二极管D2的负极端与接收报文的输入端PLC_RXD相连,所述发送二极管的正极端与接收二极管的正极端相连,并与拉高电阻R1的一端相连;所述拉高电阻的另一端置于高电平;如图拉高至3.3V;所述TTL双向监听电路的输出端与所述发送二极管的正极端以及接收二极管的正极端相连;Described TTL two-way monitoring circuit is used for automatic switching sending message and the transmission of receiving message; The schematic diagram of described TTL two-way monitoring circuit is as shown in Figure 2, comprises sending diode D1, receiving diode D2 and pulling high resistance R1; The negative terminal of the sending diode D1 is connected to the input terminal PLC_TXD of the sending message, the negative terminal of the receiving diode D2 is connected to the input terminal PLC_RXD of the receiving message, and the positive terminal of the sending diode is connected to the positive terminal of the receiving diode. and connected to one end of the pull-up resistor R1; the other end of the pull-up resistor is placed at a high level; as shown in the figure, it is pulled up to 3.3V; the output end of the TTL bidirectional monitoring circuit is connected to the positive end of the sending diode and The positive terminal of the receiving diode is connected;
通过设置如上所述的TTL双向监听电路,当所述发送报文输入至TTL双向监听电路的发送报文输入端时,接收报文输入端置于高电平,以屏蔽所述接收报文输入端,实现发送报文输入端至输出端的通信通路;By setting the TTL two-way monitoring circuit as described above, when the sending message is input to the sending message input terminal of the TTL two-way monitoring circuit, the receiving message input terminal is placed at a high level to shield the receiving message input terminal, to realize the communication path from the input terminal to the output terminal of the sending message;
当所述接收报文输入至TTL双向监听电路的接收报文输入端时,发送报文输入端置于高电平,以屏蔽所述发送报文输入端,实现接收报文输入端至输出端的通信通路。When the receiving message is input to the receiving message input terminal of the TTL two-way monitoring circuit, the sending message input terminal is placed at a high level to shield the sending message input terminal to realize the connection between the receiving message input terminal and the output terminal. communication pathway.
所述信号转换电路用于将TTL双向监听电路的TTL电平信号转换为RS232电平信号;The signal conversion circuit is used to convert the TTL level signal of the TTL two-way monitoring circuit into an RS232 level signal;
本实施例中,采用SP3232作为信号转换芯片实现TTL电平信号到RS232电平信号的转换。In this embodiment, SP3232 is used as the signal conversion chip to realize the conversion from TTL level signal to RS232 level signal.
监听单元,所述监听单元用于RS232电平信号所携带的通信报文进行监听分析,确认监听结果。A monitoring unit, the monitoring unit is used for monitoring and analyzing the communication message carried by the RS232 level signal, and confirming the monitoring result.
所述监听单元通过RS232通信接口与所述信号转换电路进行连接,根据预设完成通信配置的监听软件对通信报文进行监听分析。The monitoring unit is connected with the signal conversion circuit through the RS232 communication interface, and monitors and analyzes the communication message according to the monitoring software configured with the preset communication.
所述监听软件可以为AccessPort,所述监听单元可以设置与计算机上,通过RS232数据线获得通信报文;还可以设置在系统上,实现一体式系统设计,可运行监听软件即可。The monitoring software can be AccessPort, and the monitoring unit can be set on the computer to obtain communication messages through the RS232 data line; it can also be set on the system to realize an integrated system design, and the monitoring software can be run.
对于一体式的系统设计,还需其具有显示模块,使得使用者可以第一时间获得监听结果。For the integrated system design, it is also required to have a display module, so that users can obtain the monitoring results at the first time.
图3为本发明具体实施方式的一种UART串口TTL电平通信双向物理监听方法的流程图。如图3所示,所述方法包括:FIG. 3 is a flowchart of a two-way physical monitoring method for UART serial port TTL level communication according to a specific embodiment of the present invention. As shown in Figure 3, the method includes:
步骤310,与用电信息采集终端的功能接口连接,采集所述用电信息采集终端与各功能模块间的通信报文,所述功能接口包括用电信息采集终端与各功能模块间通信的TTL信号接口;所述通信报文包括发送报文以及接受报文;Step 310, connect to the functional interface of the power consumption information collection terminal, collect the communication message between the power consumption information collection terminal and each functional module, the functional interface includes the TTL of the communication between the power consumption information collection terminal and each functional module A signal interface; the communication message includes sending a message and receiving a message;
进一步的,所述与用电信息采集终端的功能接口连接,包括:Further, the functional interface connection with the electricity consumption information collection terminal includes:
模块连接单元的多个输入接头根据用电信息采集终端上各TTL信号接口的位置对应固定布置,并与对应的TTL信号接口通过插接进行连接。The multiple input connectors of the module connection unit are fixedly arranged according to the position of each TTL signal interface on the power consumption information collection terminal, and are connected with the corresponding TTL signal interface through plugging.
进一步的,采用与用电信息采集终端的左盒上的TTL信号接口位置对应匹配的多个输入接头,通过插接与所述左盒上的TTL信号接口进行连接;Further, a plurality of input connectors corresponding to the position of the TTL signal interface on the left box of the power consumption information collection terminal are used to connect with the TTL signal interface on the left box by plugging;
采用与用电信息采集终端的右盒上的TTL信号接口位置对应匹配的多个输入接头,通过插接与所述右盒上的TTL信号接口进行连接。A plurality of input connectors corresponding to the position of the TTL signal interface on the right box of the electricity consumption information collection terminal are used to connect with the TTL signal interface on the right box by plugging.
步骤320,通过TTL双向监听电路自动切换发送报文以及接受报文的传送,将所述通信报文发送至信号转换单元;Step 320, through the TTL two-way monitoring circuit to automatically switch the sending of the message and the transmission of the receiving message, and send the communication message to the signal conversion unit;
进一步的,所述通过TTL双向监听电路自动切换发送报文以及接受报文的传送,包括:Further, the transmission of sending and receiving messages is automatically switched by the TTL two-way monitoring circuit, including:
根据UART数据传输格式对通信报文进行分析,确认所述通信报文为发送报文还是接受报文;Analyze the communication message according to the UART data transmission format, and confirm whether the communication message is a sending message or an receiving message;
所述TTL双向监听电路包括发送二极管、接收二极管以及拉高电阻;所述发送二极管的负极端与发送报文的输入端相连,所述接收二极管的负极端与接收报文的输入端相连,所述发送二极管的正极端与接收二极管的正极端相连,并与拉高电阻的一端相连;所述拉高电阻的另一端置于高电平;所述TTL双向监听电路的输出端与所述发送二极管的正极端以及接收二极管的正极端相连;The TTL bidirectional monitoring circuit includes a sending diode, a receiving diode and a pull-up resistor; the negative end of the sending diode is connected to the input end of the sending message, and the negative end of the receiving diode is connected to the input end of the receiving message, so The positive end of the sending diode is connected to the positive end of the receiving diode, and is connected to one end of the pull-up resistor; the other end of the pull-up resistor is placed at a high level; the output end of the TTL bidirectional monitoring circuit is connected to the sending The positive end of the diode is connected to the positive end of the receiving diode;
当所述发送报文输入至TTL双向监听电路的发送报文输入端时,接收报文输入端置于高电平,以屏蔽所述接收报文输入端,实现发送报文输入端至输出端的通信通路;When the sending message is input to the sending message input terminal of the TTL two-way monitoring circuit, the receiving message input terminal is placed at a high level to shield the receiving message input terminal, so as to realize the connection between the sending message input terminal and the output terminal. communication path;
当所述接收报文输入至TTL双向监听电路的接收报文输入端时,发送报文输入端置于高电平,以屏蔽所述发送报文输入端,实现接收报文输入端至输出端的通信通路。When the receiving message is input to the receiving message input terminal of the TTL two-way monitoring circuit, the sending message input terminal is placed at a high level to shield the sending message input terminal to realize the connection between the receiving message input terminal and the output terminal. communication pathway.
步骤330,通过信号转换单元将所述TTL电平信号转换为RS232电平信号;采用SP3232作为信号转换芯片实现TTL电平信号到RS232电平信号的转换Step 330, converting the TTL level signal into an RS232 level signal through a signal conversion unit; using SP3232 as a signal conversion chip to realize conversion from a TTL level signal to an RS232 level signal
步骤340,对所述RS232电平信号携带的通信报文进行监听分析,确认监听结果。进一步的,通过RS232通信接口与所述信号转换电路进行连接;根据预设完成通信配置的监听软件对通信报文进行监听分析。Step 340, monitor and analyze the communication message carried by the RS232 level signal, and confirm the monitor result. Further, the RS232 communication interface is connected to the signal conversion circuit; the monitoring software configured for communication is preset to monitor and analyze the communication messages.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本公开的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the present disclosure may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。本说明书中涉及到的步骤编号仅用于区别各步骤,而并不用于限制各步骤之间的时间或逻辑的关系,除非文中有明确的限定,否则各个步骤之间的关系包括各种可能的情况。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. The step numbers involved in this specification are only used to distinguish each step, and are not used to limit the time or logical relationship between each step. Unless otherwise clearly defined in the text, the relationship between each step includes various possible Happening.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本公开的范围之内并且形成不同的实施例。例如,在权利要求书中所要求保护的实施例的任意之一都可以以任意的组合方式来使用。In addition, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the present disclosure. and form different embodiments. For example, any one of the embodiments claimed in the claims may be used in any combination.
本公开的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本公开还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者系统程序(例如,计算机程序和计算机程序产品)。这样的实现本公开的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present disclosure may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. The present disclosure can also be implemented as an apparatus or system program (eg, computer program and computer program product) for performing a part or all of the methods described herein. Such a program realizing the present disclosure may be stored on a computer-readable medium, or may have the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本公开进行说明而不是对本公开进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本公开可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干系统的单元权利要求中,这些系统中的若干个可以是通过同一个硬件项来具体体现。It should be noted that the above-mentioned embodiments illustrate rather than limit the disclosure, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The disclosure can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several systems, several of these systems can be embodied by one and the same item of hardware.
以上所述仅是本公开的具体实施方式,应当指出的是,对于本领域的普通技术人员来说,在不脱离本公开精神的前提下,可以作出若干改进、修改、和变形,这些改进、修改、和变形都应视为落在本申请的保护范围内。The above descriptions are only specific implementations of the present disclosure. It should be noted that those skilled in the art can make several improvements, modifications, and variations without departing from the spirit of the present disclosure. These improvements, Modifications and deformations should be considered as falling within the scope of protection of this application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910389519.6ACN110209617A (en) | 2019-05-10 | 2019-05-10 | A kind of UART serial ports Transistor-Transistor Logic level communicates two-way physics monitoring system and method |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910389519.6ACN110209617A (en) | 2019-05-10 | 2019-05-10 | A kind of UART serial ports Transistor-Transistor Logic level communicates two-way physics monitoring system and method |
| Publication Number | Publication Date |
|---|---|
| CN110209617Atrue CN110209617A (en) | 2019-09-06 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910389519.6APendingCN110209617A (en) | 2019-05-10 | 2019-05-10 | A kind of UART serial ports Transistor-Transistor Logic level communicates two-way physics monitoring system and method |
| Country | Link |
|---|---|
| CN (1) | CN110209617A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110647490A (en)* | 2019-10-22 | 2020-01-03 | 深圳市康冠智能科技有限公司 | Data transmission method, device, equipment and computer storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101814226A (en)* | 2010-02-23 | 2010-08-25 | 南华大学 | Ammeter wireless monitoring interface devices and wireless monitoring system |
| CN103490814A (en)* | 2013-09-25 | 2014-01-01 | 上海理工大学 | Serial communication device of USB interface LED visible light and system thereof |
| CN104868593A (en)* | 2015-04-15 | 2015-08-26 | 积成电子股份有限公司 | Power utilization information acquisition terminal communication message local real-time monitoring method |
| CN106484588A (en)* | 2015-08-27 | 2017-03-08 | 南京亚士德科技有限公司 | Serial communication monitoring system and method |
| US20180026679A1 (en)* | 2016-07-21 | 2018-01-25 | Ingenico Group | Method for processing data by means of an electronic data-acquisition device, corresponding device and program |
| CN108614789A (en)* | 2018-04-08 | 2018-10-02 | 深圳市未来天使机器人有限公司 | A kind of communication system and method for the serial bus with handshake mechanism |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101814226A (en)* | 2010-02-23 | 2010-08-25 | 南华大学 | Ammeter wireless monitoring interface devices and wireless monitoring system |
| CN103490814A (en)* | 2013-09-25 | 2014-01-01 | 上海理工大学 | Serial communication device of USB interface LED visible light and system thereof |
| CN104868593A (en)* | 2015-04-15 | 2015-08-26 | 积成电子股份有限公司 | Power utilization information acquisition terminal communication message local real-time monitoring method |
| CN106484588A (en)* | 2015-08-27 | 2017-03-08 | 南京亚士德科技有限公司 | Serial communication monitoring system and method |
| US20180026679A1 (en)* | 2016-07-21 | 2018-01-25 | Ingenico Group | Method for processing data by means of an electronic data-acquisition device, corresponding device and program |
| CN108614789A (en)* | 2018-04-08 | 2018-10-02 | 深圳市未来天使机器人有限公司 | A kind of communication system and method for the serial bus with handshake mechanism |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110647490A (en)* | 2019-10-22 | 2020-01-03 | 深圳市康冠智能科技有限公司 | Data transmission method, device, equipment and computer storage medium |
| Publication | Publication Date | Title |
|---|---|---|
| CN109558371B (en) | Method for communicating with a microcontroller, and computing system | |
| CN102752150A (en) | Distributed communication equipment capable of providing remote board card debugging and remote board card debugging method | |
| CN101291261A (en) | In-board device testing method and system | |
| CN104516798A (en) | Wireless one-to-many test system | |
| CN106803792A (en) | Data transfer equipment, electric equipment and electric equipment fault diagnosis system | |
| CN111984486A (en) | CPU network interface performance test board, test system and test method | |
| CN107959806A (en) | A kind of binodal point server KVM switches circuit | |
| WO2025102991A1 (en) | Automatic identification circuit for external device to type-c interface, electronic device, server, and identification method | |
| CN218124727U (en) | Control device and control system | |
| CN111949464A (en) | CPU network interface adaptability test board card, test system and test method | |
| CN114090360B (en) | Server debugging device, method and medium thereof, and server debugger | |
| CN110209617A (en) | A kind of UART serial ports Transistor-Transistor Logic level communicates two-way physics monitoring system and method | |
| CN102761624B (en) | Method and device for debugging Internet access out of panel | |
| CN115525500B (en) | Device debugging method, device, equipment and medium | |
| CN107346295A (en) | A kind of data transmission cable and data transmission method | |
| CN117097614A (en) | Storage system and plug-in card working mode switching device thereof | |
| CN106484588A (en) | Serial communication monitoring system and method | |
| CN110401546A (en) | A device debugging system and method based on NBiot technology | |
| CN216310776U (en) | Interface board card, user equipment and CPU test system | |
| CN213276628U (en) | CPU network interface adaptability test board card and test system | |
| CN212543816U (en) | ARINC 429 bus communication board card of USB specification | |
| CN109002415A (en) | A kind of server and its data transmission device based on BMC | |
| CN107070547A (en) | A kind of CPCI type gigabit Ethernet devices with failure monitoring ability | |
| CN221946487U (en) | USB-to-TTL-to-485 communication system | |
| CN114116584A (en) | Test system for interface boards, user equipment and CPU |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20190906 | |
| RJ01 | Rejection of invention patent application after publication |