DI signal multi-terminal data processing method and drainage system adopting sameTechnical Field
The invention belongs to the technical field of digital circuits, and particularly relates to a DI signal multi-terminal data processing method and a drainage system adopting the method.
Background
In a vacuum drainage system, if the difficulty of laying pipelines is high and the distribution range of vacuum wells is wide, a 4G RTU (remote terminal unit) or an industrial 4G router can be applied to transmit the running state of a vacuum valve in a wireless mode, so that the purposes of monitoring, alarming and counting the vacuum valve are achieved. Due to different purposes and different project requirements, when the project is applied, the RTU equipment and the 4G router can be used at the same time, and different equipment has different platform software and different functions;
the 4G router transmits PLC data to the cloud platform, and the cloud platform has functions of configuration, alarming, analysis and the like; the 4G RTU is used for collecting DI signals (digital input signals) of all sensors in the system, directly transmitting the DI signals to the cloud platform, browsing in a webpage mode and having a single function. And because the built-in communication protocols of the two devices and the functions of the cloud platform are different, data cannot be fused together for display and release, which brings inconvenience to operators, and therefore the problem of data fusion on the same platform needs to be solved.
Disclosure of Invention
The technical problem mainly solved by the invention is to provide a DI signal multi-terminal data processing method and a drainage system adopting the method, DI data of an RTU terminal is obtained by analyzing a cloud server A, is converted by Intouch software and then is written into a PLC, all other data in the PLC are uniformly sent to a cloud server B through a 4G router, and are processed and then are issued to the terminal, so that data fusion and uniform issuing can be realized, and convenience and high efficiency are realized.
In order to solve the above technical problems, one technical solution adopted by the present invention is as follows:
a DI signal multi-terminal data processing method, a plurality of DI signals are respectively or simultaneously transmitted to an RTU terminal and a PLC, comprising the following steps: the cloud server A receives and analyzes the DI signal of the RTU terminal to obtain data A, and transmits the data A to the PLC;
and the PLC receives the DI signal, processes the DI signal to obtain data B, transmits the data A and the data B to a cloud server B, and releases the data A and the data B to a terminal through the cloud server B.
Further, the data a and the data B are variables, and all the variables have corresponding values.
Further, the data a and the data B are transmitted to the cloud server B through the 4G router.
Further, the PLC forms a VPN network with the cloud server a through the 4G router to implement an interactive link.
Further, the DI data is wirelessly transmitted to the cloud server A through a TCP/IP or UDP protocol.
The invention also provides a vacuum drainage system which comprises an RTU terminal (3) and a PLC (4) for acquiring DI signals of each sensor, and the drainage system uses any one of the data processing methods.
Further, the cloud server a is installed with: a Communication transformation Server for analyzing the DI signal of the RTU terminal to obtain data A';
industrial configuration software, inteuch: the data A' is converted into the data A through a script and written into the PLC;
SQL Server: for storing said data a';
OPC Server: and extracting the data A 'and sending the data A' to the industrial configuration software Intouch, wherein the OPC Server and the industrial configuration software Intouch communicate through OPC link.
Further, the cloud server a is further installed with: the KEP Server Ex is used for reading or writing the PLC;
and the ECS Manager is used for setting the variable requirements of the data A and the data B.
Further, the PLC and the cloud server A form a VPN network through a 4G router to achieve an interactive link, and the VPN network is built through a cloud BOX virtual network interface tool.
Further, the terminal comprises a PC and/or a handheld mobile device.
The invention has the beneficial effects that:
according to the multi-terminal data processing method, an RTU terminal and a cloud server A are interacted, a 4G router is also interacted with the cloud server A, an OPC (OLE for process control) protocol is used for data transmission between software and used as a data exchange center, after being processed by a script program by an industrial configuration software intouch, the intouch transmits the data A obtained by the RTU terminal to a PLC (programmable logic controller), then the 4G router uniformly sends all data (the data A and the data B) of the PLC to the cloud server B, and the cloud server B performs uniform processing and release on the data, so that the problem that the data among various devices are not communicated in the prior art is solved.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical solutions of the present invention more clearly understood and to implement them in accordance with the contents of the description, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings.
Drawings
FIG. 1 is a block diagram of the construction of a vacuum drainage system of the present invention;
FIG. 2 is a flowchart illustrating a process after a RUT terminal and a PLC terminal respectively receive DI signals in a vacuum drainage system according to the present invention;
FIG. 3 is a unified presentation of the vacuum drainage system after data fusion processing according to the present invention;
FIG. 4 is a data presentation diagram after data fusion processing of the vacuum drainage system of the present invention;
the parts in the drawings are marked as follows:
1: a cloud server A;
2: a cloud server B;
3: an RTU terminal;
4:PLC;
5: and (4) a terminal.
Detailed Description
The following detailed description of the preferred embodiments of the present invention, taken in conjunction with the accompanying drawings, will make the advantages and features of the invention easier to understand by those skilled in the art, and thus will clearly and clearly define the scope of the invention.
Example (b):
a vacuum drainage system, as shown in fig. 1: the vacuum drainage system comprises anRTU terminal 3 and a PLC4 for acquiring DI signals of each sensor, and further comprises a cloud server A1 and a cloud server B2, wherein the cloud server A receives and analyzes the DI signals of the RTU terminal to obtain data A, and transmits the data A to the PLC;
and the PLC receives the DI signal, processes the DI signal to obtain data B, transmits the data A and the data B to a cloud server B, and issues the data A and the data B to aterminal 5 through the cloud server B, wherein the terminal comprises a PC and a handheld mobile device.
The data A and the data B are variables, and all the variables have corresponding values.
For convenience of explanation, the sensor of the vacuum valve is taken as a DI signal generating source, and it should be noted that the present embodiment is also a specific sensor for convenience of explanation of the system and the processing method of the present invention, which is not intended to limit the protection scope of the system and the processing method of the present invention, and can be implemented by replacing any device sensor (such as a power system part; water flow and water pressure detecting sensors; float ball sensors, etc.);
the flow of the sensor signal acquisition and processing for the vacuum valve in this embodiment is thus shown in fig. 2:
the PLC forms a VPN network with the cloud server A through the 4G router to achieve an interactive link.
In addition, the data a and the data B are also transmitted to the cloud server B through the 4G router.
The DI data is wirelessly transmitted to the cloud server A through a TCP/IP or UDP protocol.
Cloud server A has public network IP, public network IP is fixed or adopts the DDNS mapping, cloud server A installs multiple software system, specifically includes:
communication transfer Server (digital signal analysis system, hereinafter referred to as CTS system): the DI signal analysis module is used for analyzing the DI signal of the RTU terminal to obtain data A';
industrial configuration software, inteuch: the data A' is converted into the data A through a script and written into the PLC;
SQL Server (SQL database): for storing said data a';
OPC Server (OLE for Process Control): and extracting the data A 'and sending the data A' to the industrial configuration software Intouch, wherein the OPC Server and the industrial configuration software Intouch communicate through OPC link.
In addition, the CTS system is also responsible for writing the data A into a PLC memory;
the script can be implemented by using a simple IF statement, for example, when the data of the times of fuqiubaojing (variable name), suiyanbaojing or leijicishu is changed, the following script is executed:
IF fuqiubaojing ═ alarm "
THEN
PLCfuqiubaojing=1;
ELSE
PLCfuqiubaojing=0;
ENDIF;
IF shuiyanbaiojing is "alarm"
THEN
PLCshuiyanbaojing=1;
ELSE
PLCshuiyanbaojing=0;
ENDIF;
IF dianchidianyabaojing is "alarm"
THEN
PLCdianchidianyabaojing=1;
ELSE
PLCdianchidianyabaojing=0;
ENDIF;
PLCzuoricishu=zuoricishu;
PLCjinricishu=jinricishu;
PLCxiaoshicishu=xiaoshicishu;
PLCleijicishu=leijicishu;
PLCdianchidianya=dianchidianya;
PLCxinhaoqiangdu=xinhaoqiangdu;
In addition, the cloud server a is further installed with: a KEP Server Ex (OPC communication Server) for reading or writing the PLC; in addition, the system is also used as communication software between the system and industrial configuration software Intouch, and communication is carried out through an OPC protocol;
an ECS Manager (ECS cloud server management system) is configured to collect PLC data, set variable requirements of the data a and the data B, and the like, and can implement real-time data interaction between the cloud server a and the PLC.
The server B is a cloud platform with a development function, and the functions of the server B comprise:
configuration flow pictures, alarm pictures, parameter pictures, curve pictures and the like;
the alarm information is pushed to a mobile phone client APP;
the alarm information is pushed to a WeChat public number, so that a user can respond in time;
user management, data analysis and the like.
The fused data is pushed to the terminal and displayed as shown in fig. 3 and 4, and the data of all the sensors to be monitored in the system can be integrated and displayed.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent structural changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to other related technical fields, are included in the scope of the present invention.