CN117880377A - Computer room movable ring monitoring data acquisition method based on intelligent protocol converter - Google Patents
Computer room movable ring monitoring data acquisition method based on intelligent protocol converter Download PDFInfo
- Publication number
- CN117880377A CN117880377A CN202311673198.5A CN202311673198A CN117880377A CN 117880377 A CN117880377 A CN 117880377A CN 202311673198 A CN202311673198 A CN 202311673198A CN 117880377 A CN117880377 A CN 117880377A
- Authority
- CN
- China
- Prior art keywords
- data
- communication
- serial port
- reading
- executing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 238000012544 monitoring process Methods 0.000 title claims abstract description 32
- 230000006854 communication Effects 0.000 claims abstract description 161
- 238000004891 communication Methods 0.000 claims abstract description 151
- 230000006870 function Effects 0.000 claims abstract description 114
- 230000008569 process Effects 0.000 claims abstract description 41
- 238000005516 engineering process Methods 0.000 claims abstract description 5
- 230000011664 signaling Effects 0.000 claims description 29
- 230000005540 biological transmission Effects 0.000 claims description 10
- 238000007405 data analysis Methods 0.000 claims description 6
- 230000008859 change Effects 0.000 claims description 5
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 238000005538 encapsulation Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 6
- 230000003321 amplification Effects 0.000 description 3
- 238000003199 nucleic acid amplification method Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000007654 immersion Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
Abstract
The intelligent protocol converter adopts a multi-process acquisition technology, adopts a plurality of different processes to communicate with a plurality of local devices, each process acquires data from the corresponding local device and sends the data to a unified shared memory area, other subprocess programs read the data from the shared memory area in a unified way, and the received data is sent to a corresponding cache area of a machine room dynamic ring monitoring server through IEC104 communication. The method can solve the problem that the acquisition terminal cannot be manually configured due to internal encapsulation, and changes the required communication function by modifying the communication program of the configuration file open source, so that the method improves the flexibility of data acquisition.
Description
Technical Field
The invention relates to the technical field of environmental monitoring, in particular to a computer room moving ring monitoring data acquisition method based on an intelligent protocol converter.
Background
The data acquisition terminal is used for carrying out data acquisition on the power and environment monitoring quantity of the local equipment, maintenance personnel can carry out remote monitoring at a power environment monitoring center of the machine room, the running condition, the machine room environment and the safety condition of the local power equipment of the dispatching automation system are known at any time, faults are found in time, and the maintenance personnel are prompted to take corresponding solving measures, so that the unattended operation or the less man of the machine room is realized.
At present, MODBUS serial communication is generally adopted for machine room power environment monitoring data acquisition, the inside of an acquisition terminal is packaged, an internal communication program cannot be modified and checked, the acquisition terminal can only realize serial communication of local equipment, and communication between the acquisition terminal and an upper computer of a monitoring system cannot be realized. Therefore, to realize this function, it is necessary to newly purchase the relevant function device.
In summary, the intelligent acquisition terminal is hoped to be provided, and the intelligent acquisition terminal can be used as a communication machine and a protocol converter at the same time, and each serial port communication program of the upper computer is compiled and operated as a data acquisition device to acquire local data through MODBUS serial port communication and then is sent to the intelligent protocol converter so as to realize the function of the upper computer at the main station side; the function stores the field data into the corresponding shared memory, and then writes IEC104 communication protocol or other communication protocol programs to read the real-time data in the shared memory real-time library in the intelligent protocol converter so as to realize the protocol conversion function of the lower computer. Based on the functions, the power environment data of the machine room can be conveniently, flexibly and rapidly acquired.
Disclosure of Invention
The invention provides a computer room moving ring monitoring data acquisition method based on an intelligent protocol converter, which overcomes the defects of an existing computer room moving ring system acquisition terminal.
In order to solve the technical problems, the invention adopts the following technical scheme: the intelligent protocol converter adopts a multi-process acquisition technology, adopts a plurality of different processes to communicate with a plurality of local devices, each process acquires data from the corresponding local device and sends the data to a unified shared memory area, other subprocess programs read the data from the shared memory area in a unified way, and the received data is sent to a corresponding cache area of a machine room dynamic ring monitoring server through IEC104 communication.
The local device communication processes are mutually independent, the exit of any process does not influence the operation of other two processes, the data of the other two processes in the shared memory area are not influenced, the sub-processes are mutually independent, the operation of other sub-processes is not influenced when any sub-process is dead, and the data of other sub-processes are still completely sent to the corresponding buffer area of the machine room dynamic ring monitoring server.
Preferably, the intelligent protocol converter comprises a communication machine operation mode and a protocol converter operation mode;
the communication machine operation mode is the same as the operation mode of the host machine of the master station layer of the upper computer, the function is consistent with that of the host machine of the master station layer, the IEC104 communication protocol is operated in the communication machine, and a broadcasting process is started, wherein the process comprises a network receiving bus process and a network transmitting bus process, the network receiving bus process completes information receiving on the network, the network transmitting bus process completes information transmission of the host machine, and the difference between the communication machine and the host machine of the master station layer is that no monitoring system picture exists;
the protocol converter running mode is applied to a mode that a network configuration mode or a use environment is not applicable to the broadcasting of the same network, and at the moment, the intelligent acquisition terminal is used as the protocol converter to realize local data acquisition. When the data volume of the main station layer is huge and a plurality of intelligent acquisition terminals are needed, the intelligent acquisition terminals cannot acquire data in the same database and the same network broadcasting mode as the main station layer due to the limitation of hardware, so that the intelligent acquisition terminals are configured to operate in a protocol converter mode; in this usage mode, all intelligent acquisition terminals are configured identically.
Preferably, the monitoring system does not need to start a broadcasting process in the operation mode of the protocol converter, and MODBUS serial port communication of different local equipment manufacturers is realized by shifting a communication configuration file, a communication point table and related registers in a program by combining with the MODBUS serial port protocol communication principle; the operation mode directly transmits the data acquired in the local equipment to a unified shared memory area of the intelligent acquisition terminal, the IEC104 slave station communication protocol program reads the data from the shared memory area, and the received data is transmitted to a corresponding buffer area of a machine room movable ring monitoring center server through IEC104 communication.
Preferably, a MODBUS communication program based on a communication configuration document is arranged in the intelligent protocol converter, and the steps are as follows:
step 1: according to the field specific actual acquisition equipment, establishing a point table of a dynamic ring system database of a main station system of the upper computer, and adding a point table file into database configuration software;
step 2: synchronizing the dynamic ring database point table of the machine room into the shared memory, and checking whether the real-time database point table of the shared memory is normal or not;
step 3: reading whether the MODBUS communication parameter configuration file comm_config.def is normal, if so, executing the next step, otherwise, exiting the program flow;
step 4: reading whether the communication point table file device is normal or not, if so, exiting the program flow, otherwise, executing the next step;
step 5: reading the MODBUS communication serial port, if the MODBUS communication serial port is successful, executing the next step, otherwise initializing the serial port, executing a serial port initialization function until the serial port is successfully read, and executing the next step;
step 6: after the serial port is successfully read, judging whether the MODBUS communication function is successfully executed, if so, executing the MODBUS communication function, and if not, closing the MODBUS communication serial port.
Step 7: the MODBUS communication main function flow ends.
Preferably, the serial port initialization includes the following steps:
step 1: detecting whether the MODBUS communication serial port is opened, executing the next step if the MODBUS communication serial port is opened, and ending the program flow if the MODBUS communication serial port is not opened;
step 2: selecting serial port communication baud rate, judging whether the serial port communication baud rate meets the requirement, executing the next step if the serial port communication baud rate meets the requirement, otherwise, exiting the program structure flow;
step 3: selecting data bits, judging whether the requirements are met, executing the next step if the requirements are met, and otherwise, exiting the program structure flow;
step 4: selecting a check bit, judging whether the requirement is met, executing the next step if the requirement is met, otherwise, exiting the program structure flow;
step 5: circularly detecting and reading the DEV_NUM value of the number of communication devices of the communication configuration file comm_config;
step 6: circularly reading the telemetering and remote signaling file names of the communication device, judging whether the file names are empty, opening the file if the file names are not empty, otherwise, exiting the function flow;
step 7: and circularly reading a telemetry and remote signaling data point list file device_YC/device_YX.txt of each device, reading the file according to a row, wherein the reading content comprises a logic name, a Chinese name, a point address and a magnification factor, copying the logic name, the Chinese name, the point address and the magnification factor into a telemetry and remote signaling information body array info [ i ]/yx [ id ] after the reading is finished, judging whether the logic name of the point information body array is empty, if so, exiting the function flow, otherwise, reading data from a shared memory according to the parameters of the data list, and writing the data only after the change of the data value exceeds a set dead zone.
Step 8: and ending the serial port initialization function flow.
Preferably, the steps of the MODBUS communication function are as follows:
step 1: circularly reading each communication device according to the communication device quantity parameter DEV_NUM in the communication configuration file comm_config.def, and on the basis of each device, circularly reading the same device times according to the specific requirements and according to the CYC_NUM parameter configuration in the communication configuration file comm_config.def, and circularly reading the register of the communication device;
step 3: judging whether the serial port communication transmission frame function is successfully executed, if so, executing the next step of the function flow, otherwise, exiting the MODBUS communication function flow;
step 4: judging whether the remote sensing and remote signaling point table data reading function is successfully executed, if so, setting the flag bit flag to 1, executing the next step of the function flow, otherwise, setting the flag bit flag to 0, and exiting the MODBUS communication function flow;
step 5: executing a telemetry and telemetry data analysis function;
step 6: the MODBUS communication function flow ends.
Preferably, the telemetry and remote signaling data point table reading steps are as follows:
step 1: initializing the memory space and opening up a buffer area;
step 2: defining the total length ReadLen of serial port data reading, wherein the data length comprises the number of registers, address bits, function codes, data length and CRC check codes according to the MODBUS communication principle;
step 3: reading serial port data and returning the data length RcvLen, judging whether the ReadLen is equal to the RcvLen, if so, executing the next step of the remote signaling and remote measuring point table data reading function flow, otherwise, exiting the function flow;
step 4: judging whether the parity check is successful, if so, executing the next step of the function flow, otherwise, exiting the function flow;
step 5: judging whether the serial port equipment address return value is correct, if so, executing the next step of the function flow, otherwise, exiting the function flow;
step 6: judging the reading times of the point table file according to the parameter CYC_NUM in the communication configuration file comm_config.def, reading data according to the definition of the configuration file, and storing the read data into a newly opened memory;
step 7: storing the returned data in the memory into anabuf [ i ];
step 8: and (5) ending the remote signaling and remote measuring point table data reading function flow.
Preferably, the telemetry and telemetry information analysis includes the steps of:
step 1: circularly analyzing the received serial port data code value;
step 2: combining two adjacent single-word data in an anabuf [ i ] array into double-word hexadecimal data, removing the highest symbol bit of the data, adding signs in front of the data according to actual conditions, and performing multiplying power conversion on telemetry data according to a point table file;
step 3; judging whether the logic name of the breakpoint table file is empty, if not, executing the next step of the function flow; otherwise, the function flow exits;
step 4; and judging whether the read new data is consistent with the old data in the previous period, and if not, judging whether the read new data is consistent with the old data in the previous period. Executing the next step of the function flow; otherwise, the function flow exits;
step 5: the execution function WrANA () puts the read new data into the shared memory, namely the data is unchanged and is not written into the real-time library, and the real-time library is written after the change;
step 6: the function flow ends.
The computer room movable ring monitoring center server is connected with the plurality of protocol converters through the switch to realize data acquisition and interaction, and the plurality of protocol converters can divide according to the actual object of communication to acquire corresponding equipment data information respectively.
The invention provides a computer room moving ring monitoring data acquisition method based on an intelligent protocol converter, which has the following beneficial effects:
(1) The method can solve the problem that the acquisition terminal cannot be manually configured due to internal encapsulation, and changes the required communication function by modifying the communication program of the configuration file open source, so that the method improves the flexibility of data acquisition;
(2) The multi-process acquisition technology can ensure that the exit of any process can not influence the operation of other two processes, the data of the other two processes in a shared memory area, the death of any subprocess can not influence the operation of other subprocesses, and the data of the other subprocesses can still be completely sent to a corresponding buffer area of a movable ring monitoring server of a machine room.
(3) The invention can be used as a communication machine or a protocol converter at the same time so as to meet the requirements of convenient, flexible and rapid acquisition of the power environment data of the machine room.
Drawings
The invention is further illustrated by the following examples in conjunction with the accompanying drawings:
FIG. 1 is a schematic diagram of the operation of a communication device program of an intelligent protocol converter;
FIG. 2 is a diagram illustrating an exemplary telemetry point table definition format;
FIG. 3 is a diagram illustrating an exemplary definition format of a remote signaling point table;
FIG. 4 is a flow chart of the main function of the machine room moving ring system;
FIG. 5 is a flow chart of a serial port initialization function;
FIG. 6 is a flow chart of a MODBUS communication function;
FIG. 7 is a flow chart of a telemetry data reading function for telemetry;
FIG. 8 is a flow chart of a telemetry data parsing function for telemetry;
fig. 9 is a schematic diagram of a device connection topology of a machine room moving ring system.
Detailed Description
The machine room movable ring monitoring system consists of a machine room movable ring monitoring center server, a switch, an intelligent protocol converter, a temperature and humidity sensor, a water immersion sensor, an alternating current acquisition meter, a switching signal collector, a power adapter, a precise air conditioner, a UPS system on-line monitor and the like.
The intelligent protocol converter adopts a multi-process acquisition technology, adopts a plurality of different processes to communicate with a plurality of local devices, each process acquires data from the corresponding local device and transmits the data to a unified shared memory area, other subprocess programs read the data from the shared memory in a unified way, and the received data is transmitted to a corresponding buffer area of the machine room movable ring monitoring server through IEC104 communication. The local device communication processes are mutually independent, the exit of any process does not influence the operation of other two processes, the data of the other two processes in the shared memory area are not influenced, the sub-processes are mutually independent, the operation of other sub-processes is not influenced when any sub-process is dead, and the data of other sub-processes are still completely sent to the corresponding buffer area of the machine room dynamic ring monitoring server. The working principle diagram is shown in figure 1.
The intelligent protocol converter is divided into two use cases in file configuration and database structure: a communicator mode configuration and a protocol converter mode configuration.
The communication machine operation mode is established when the data volume is smaller, the operation mode is the same as the operation mode of the communication host machine at the master station side, the function is consistent with that of the communication host machine at the master station side, the IEC104 communication protocol is operated in the communication machine operation mode, the broadcasting process is started, the process comprises a network receiving bus process and a network transmitting bus process, wherein the network receiving bus process completes information receiving on the network, the network transmitting bus process completes information transmission of the communication machine, and the difference between the communication machine and the master station side host machine is that no monitoring system picture exists.
The operation mode of the communication machine comprises the following steps:
step 1, defining the host names and the sequence of the computer room dynamic ring system. Wherein the number of hosts is added and deleted according to the specific use condition of the site.
And 2, defining a host name and an ip address to which the monitoring system belongs, defining a broadcast address, adding a system lan_inb as a network receiving bus process, and completing information receiving on the network by the service as the network receiving bus service. The addition system lan_outb is a network transmission bus process, and the service is a network transmission bus service to complete information transmission of the local machine. The adding system dbwrite is a real-time library writing process, and the service completes the processing of system information, including message processing, writing into the real-time library, submitting events and the like.
And 3, executing an IEC104 communication protocol program in the system to realize the operation mode of the communication machine at the master station side.
The protocol converter mode is applied to a network configuration mode or a mode that the use environment is not applicable to the same network broadcasting, and at the moment, the intelligent acquisition terminal can be used as a protocol converter to realize local data acquisition. When the data volume of the main station layer is huge and a plurality of intelligent acquisition terminals are needed, the intelligent acquisition terminals cannot acquire data in the same database and the same network broadcasting mode as the main station layer due to the limitation of hardware, so that the intelligent acquisition terminals are configured to operate in a protocol converter mode. In this usage mode, all intelligent acquisition terminals are configured identically.
The protocol converter operates in a mode in which the monitoring system does not need to start a broadcast process. And by combining a related MODBUS serial port protocol communication principle, the MODBUS serial port communication of different local equipment manufacturers is realized by shifting related registers in a communication configuration file, a communication point table and a program. The protocol converter running mode is used for directly transmitting the data acquired in the local equipment to a unified shared memory area of the intelligent acquisition terminal, the IEC104 slave station communication protocol program reads the data from the shared memory area, and the received data is transmitted to a corresponding buffer area of the machine room movable ring monitoring center server through IEC104 communication.
Wherein, the configuration file includes the following parameters:
port=/dev/ttyAM 0 (serial number definition, serial numbers 1 to 8 are respectively defined as ttyAM0 to ttyAM 7); MODE (serial communication interface MODE, 0 means 232 MODE, 1 means 485 two-wire MODE, 2 means 422 MODE, 3 means 485 four-wire MODE); BAUD (communication BAUD rate); data_bits (DATA bit length); PARITY (0 indicates no PARITY, 1 indicates even, 2 indicates odd); dev_num (defined number of devices connected by serial); dev1_yc=device_yc.txt (device remote table, definition corresponding to the number of devices, 1 dot table file per device); dev1_yx=device x_yx.txt (device remote signaling point table, definition corresponding to the number of devices, 1 point table file per device); dev_adr (device communication address, definition corresponding to the number of devices, 1 address per device); read_num (number of READs of register), which requires multiple READs when reading multiple register values due to the length limitation of each packet in serial communication; start_adr (START address of register, definition corresponds to read times, START address is defined for each read); LEN (length word read per time, definition corresponds to number of reads).
The definition format of the device remote table is shown in fig. 2. The amplification factor represents the amplification factor of the transmission code value to the original value, for example, the 1 st path power value acquired by the device is 12.34, the amplification factor is 100 times, the transmission is changed into 1234, and the communication program correspondingly reduces after receiving the code value, so as to acquire the acquired actual value.
The definition format of the remote signaling point table of the device is shown in fig. 3. The remote signaling quantity point table is defined, the number of the point table is defined as an integral multiple of 16, and the points are not filled with empty standby points. The amount of communication acquisition required is in different register addresses for different communication devices. And transplanting the address values of the telemetry and remote signaling registers into a telemetry and remote signaling receiving area array respectively in a program for further processing.
In the protocol converter mode, a MODBUS communication program based on a communication configuration document is arranged in the intelligent protocol converter, a main function flow chart is shown in fig. 4, and the main function flow chart has the following program main structure logic:
step 1: according to the field specific actual acquisition equipment, establishing a point table of a dynamic ring system database of a main station system of the upper computer, and adding a point table file into database configuration software;
step 2: synchronizing the dynamic ring database point table of the machine room into the shared memory, and checking whether the real-time database point table of the shared memory is normal or not;
step 3: reading whether the MODBUS communication parameter configuration file comm_config.def is normal, if so, executing the next step, otherwise, exiting the program flow;
step 4: reading whether the communication point table file device is normal or not, if so, exiting the program flow, otherwise, executing the next step;
step 5: reading the MODBUS communication serial port, if the MODBUS communication serial port is successful, executing the next step, otherwise initializing the serial port, executing a serial port initialization function until the serial port is successfully read, and executing the next step;
step 6: after the serial port is successfully read, judging whether the MODBUS communication function is successfully executed, if so, executing the MODBUS communication function, and if not, closing the MODBUS communication serial port.
Step 7: the MODBUS communication main function flow ends.
The serial port initialization function flow chart is shown in fig. 5, and the serial port initialization function program logic structure is as follows:
step 1: detecting whether the MODBUS communication serial port is opened, executing the next step if the MODBUS communication serial port is opened, and ending the program flow if the MODBUS communication serial port is not opened;
step 2: selecting serial port communication baud rate, judging whether the serial port communication baud rate meets the requirement, executing the next step if the serial port communication baud rate meets the requirement, otherwise, exiting the program structure flow;
step 3: selecting data bits, judging whether the requirements are met, executing the next step if the requirements are met, and otherwise, exiting the program structure flow;
step 4: selecting a check bit, judging whether the requirement is met, executing the next step if the requirement is met, otherwise, exiting the program structure flow;
step 5: circularly detecting and reading the DEV_NUM value of the number of communication devices of the communication configuration file comm_config;
step 6: circularly reading the telemetering and remote signaling file names of the communication device, judging whether the file names are empty, opening the file if the file names are not empty, otherwise, exiting the function flow;
step 7: and circularly reading a telemetry and remote signaling data point table file device_YC/device_YX.txt of each device, reading the file according to a row, wherein the reading content comprises a logic name, a Chinese name, a point address and a magnification factor, copying the logic name, the Chinese name, the point address and the magnification factor into a telemetry (remote signaling) information body array info [ i ]/info [ i ]. Yx [ id ], judging whether the logic name of the point information body array is empty, if so, exiting the function flow, otherwise, reading data from a shared memory according to the data table parameters, and writing the data only after the data value changes beyond a set dead zone.
Step 8: and ending the serial port initialization function flow.
The flow chart of the MODBUS communication function is shown in fig. 6, and the logic structure flow of the MODBUS communication function program is as follows:
step 1: circularly reading each communication device according to the communication device quantity parameter DEV_NUM in the communication configuration file comm_config.def, and on the basis of each device, circularly reading the same device times according to the specific requirements and according to the CYC_NUM parameter configuration in the communication configuration file comm_config.def, and circularly reading the register of the communication device;
step 3: judging whether the serial port communication transmission frame function is successfully executed, if so, executing the next step of the function flow, otherwise, exiting the MODBUS communication function flow;
step 4: judging whether the remote sensing and remote signaling point table data reading function is successfully executed, if so, setting the flag bit flag to 1, executing the next step of the function flow, otherwise, setting the flag bit flag to 0, and exiting the MODBUS communication function flow;
step 5: executing a telemetry and telemetry data analysis function;
step 6: the MODBUS communication function flow ends.
The remote signaling telemetry data reading function flow chart is shown in fig. 7, and the logic structure flow of the remote signaling telemetry point table data reading function is as follows:
step 1: initializing the memory space and opening up a buffer area;
step 2: defining the total length ReadLen of serial port data reading, wherein the data length comprises the number of registers, address bits, function codes, data length and CRC check codes according to the MODBUS communication principle;
step 3: reading serial port data and returning the data length RcvLen, judging whether the ReadLen is equal to the RcvLen, if so, executing the next step of the remote signaling and remote measuring point table data reading function flow, otherwise, exiting the function flow;
step 4: judging whether the parity check is successful, if so, executing the next step of the function flow, otherwise, exiting the function flow;
step 5: judging whether the serial port equipment address return value is correct, if so, executing the next step of the function flow, otherwise, exiting the function flow;
step 6: judging the reading times of the point table file according to the parameter CYC_NUM in the communication configuration file comm_config.def, reading data according to the definition of the configuration file, and storing the read data into a newly opened memory;
step 7: storing the returned data in the memory into anabuf [ i ];
step 8: and (5) ending the remote signaling and remote measuring point table data reading function flow.
The telemetry data analysis function flow chart of telemetry information is shown in fig. 8, and the telemetry data analysis function logic structure flow chart is as follows:
step 1: circularly analyzing the received serial port data code value;
step 2: combining two adjacent single-word data in an anabuf [ i ] array into double-word hexadecimal data, removing the highest symbol bit of the data, adding signs in front of the data according to actual conditions, and performing multiplying power conversion on telemetry data according to a point table file;
step 3; judging whether the logic name of the breakpoint table file is empty, if not, executing the next step of the function flow; otherwise, the function flow exits;
step 4; and judging whether the read new data is consistent with the old data in the previous period, and if not, judging whether the read new data is consistent with the old data in the previous period. Executing the next step of the function flow; otherwise, the function flow exits;
step 5: the execution function WrANA () puts the read new data into the shared memory, namely the data is unchanged and is not written into the real-time library, and the real-time library is written after the change;
step 6: the function flow ends.
The monitoring center server is connected with the plurality of protocol converters through the switch to realize data acquisition and interaction, the plurality of protocol converters can be divided according to the actual object of communication to respectively acquire corresponding equipment data information, and a topology structure diagram of the computer room dynamic ring system is shown in fig. 9.
The above embodiments are only preferred embodiments of the present invention, and should not be construed as limiting the present invention, and the scope of the present invention should be defined by the claims, including the equivalents of the technical features in the claims. I.e., equivalent replacement modifications within the scope of this invention are also within the scope of the invention.
Claims (8)
1. The intelligent protocol converter adopts a multi-process acquisition technology, a plurality of different processes are adopted to communicate with a plurality of local devices, each process acquires data from the corresponding local device and sends the data to a unified shared memory area, other subprocess programs read the data from the shared memory area in a unified way, and the received data is sent to a corresponding cache area of a machine room movable ring monitoring server through IEC104 communication.
2. The computer room moving ring monitoring data acquisition method based on the intelligent protocol converter according to claim 1, wherein the intelligent protocol converter comprises a communication machine operation mode and a protocol converter operation mode;
the communication machine operation mode internally operates an IEC104 communication protocol and starts a broadcasting process, wherein the process comprises a network receiving bus process and a network sending bus process, the network receiving bus process completes information receiving on a network, and the network sending bus process completes information sending of a host machine, and is different from a host machine of a master station layer in that no monitoring system picture exists;
the protocol converter running mode is applied to a mode that a network configuration mode or a use environment is not applicable to the broadcasting of the same network, and at the moment, the intelligent acquisition terminal is used as the protocol converter to realize local data acquisition.
3. The method for collecting the monitoring data of the machine room moving ring based on the intelligent protocol converter according to claim 2, wherein the monitoring system does not need to start a broadcasting process in the operation mode of the protocol converter, and the MODBUS serial port communication of different site equipment manufacturers is realized by shifting a communication configuration file, a communication point table and related registers in a program in combination with the MODBUS serial port protocol communication principle; the operation mode directly transmits the data acquired in the local equipment to a unified shared memory area of the intelligent acquisition terminal, the IEC104 slave station communication protocol program reads the data from the shared memory area, and the received data is transmitted to a corresponding buffer area of a machine room movable ring monitoring center server through IEC104 communication.
4. The computer room moving ring monitoring data acquisition method based on the intelligent protocol converter according to claim 2, wherein a MODBUS communication program based on a communication configuration document is arranged in the intelligent protocol converter, and the steps are as follows:
step 1: according to the field specific actual acquisition equipment, establishing a point table of a dynamic ring system database of a main station system of the upper computer, and adding a point table file into database configuration software;
step 2: synchronizing the dynamic ring database point table of the machine room into the shared memory, and checking whether the real-time database point table of the shared memory is normal or not;
step 3: reading whether the MODBUS communication parameter configuration file comm_config.def is normal, if so, executing the next step, otherwise, exiting the program flow;
step 4: reading whether the communication point table file device is normal or not, if so, exiting the program flow, otherwise, executing the next step;
step 5: reading the MODBUS communication serial port, if the MODBUS communication serial port is successful, executing the next step, otherwise initializing the serial port, executing a serial port initialization function until the serial port is successfully read, and executing the next step;
step 6: after the serial port is successfully read, judging whether the MODBUS communication function is successfully executed, if so, executing the MODBUS communication function, otherwise, closing the MODBUS communication serial port;
step 7: the MODBUS communication main function flow ends.
5. The computer room moving ring monitoring data acquisition method based on the intelligent protocol converter as claimed in claim 4, wherein the serial port initialization comprises the following steps:
step 1: detecting whether the MODBUS communication serial port is opened, executing the next step if the MODBUS communication serial port is opened, and ending the program flow if the MODBUS communication serial port is not opened;
step 2: selecting serial port communication baud rate, judging whether the serial port communication baud rate meets the requirement, executing the next step if the serial port communication baud rate meets the requirement, otherwise, exiting the program structure flow;
step 3: selecting data bits, judging whether the requirements are met, executing the next step if the requirements are met, and otherwise, exiting the program structure flow;
step 4: selecting a check bit, judging whether the requirement is met, executing the next step if the requirement is met, otherwise, exiting the program structure flow;
step 5: circularly detecting and reading the DEV_NUM value of the number of communication devices of the communication configuration file comm_config;
step 6: circularly reading the telemetering and remote signaling file names of the communication device, judging whether the file names are empty, opening the file if the file names are not empty, otherwise, exiting the function flow;
step 7: circularly reading a telemetry and remote signaling data point table file device_YC/device_YX.txt of each device, reading the file according to a row, wherein the reading content comprises a logic name, a Chinese name, a point address and a magnification factor, copying the logic name, the Chinese name, the point address and the magnification factor into a telemetry and remote signaling information body array info [ i ]/yx [ id ] after the reading is finished, judging whether the logic name of the point information body array is empty, if so, exiting the function flow, otherwise, reading data from a shared memory according to the parameters of the data table, and writing the data only after the change of the data value exceeds a set dead zone;
step 8: and ending the serial port initialization function flow.
6. The method for collecting monitoring data of a machine room moving ring based on an intelligent protocol converter according to claim 4, wherein the steps of the MODBUS communication function are as follows:
step 1: circularly reading each communication device according to the communication device quantity parameter DEV_NUM in the communication configuration file comm_config.def, and on the basis of each device, circularly reading the same device times according to the specific requirements and according to the CYC_NUM parameter configuration in the communication configuration file comm_config.def, and circularly reading the register of the communication device;
step 3: judging whether the serial port communication transmission frame function is successfully executed, if so, executing the next step of the function flow, otherwise, exiting the MODBUS communication function flow;
step 4: judging whether the remote sensing and remote signaling point table data reading function is successfully executed, if so, setting the flag bit flag to 1, executing the next step of the function flow, otherwise, setting the flag bit flag to 0, and exiting the MODBUS communication function flow;
step 5: executing a telemetry and telemetry data analysis function;
step 6: the MODBUS communication function flow ends.
7. The method for collecting the monitoring data of the machine room moving ring based on the intelligent protocol converter according to claim 5, wherein the step of reading the telemetering and remote signaling data point table is as follows:
step 1: initializing the memory space and opening up a buffer area;
step 2: defining the total length ReadLen of serial port data reading, wherein the data length comprises the number of registers, address bits, function codes, data length and CRC check codes according to the MODBUS communication principle;
step 3: reading serial port data and returning the data length RcvLen, judging whether the ReadLen is equal to the RcvLen, if so, executing the next step of the remote signaling and remote measuring point table data reading function flow, otherwise, exiting the function flow;
step 4: judging whether the parity check is successful, if so, executing the next step of the function flow, otherwise, exiting the function flow;
step 5: judging whether the serial port equipment address return value is correct, if so, executing the next step of the function flow, otherwise, exiting the function flow;
step 6: judging the reading times of the point table file according to the parameter CYC_NUM in the communication configuration file comm_config.def, reading data according to the definition of the configuration file, and storing the read data into a newly opened memory;
step 7: storing the returned data in the memory into anabuf [ i ];
step 8: and (5) ending the remote signaling and remote measuring point table data reading function flow.
8. The computer room moving ring monitoring data acquisition method based on the intelligent protocol converter as claimed in claim 6, wherein the telemetry and remote signaling data analysis comprises the following steps:
step 1: circularly analyzing the received serial port data code value;
step 2: combining two adjacent single-word data in an anabuf [ i ] array into double-word hexadecimal data, removing the highest symbol bit of the data, adding signs in front of the data according to actual conditions, and performing multiplying power conversion on telemetry data according to a point table file;
step 3; judging whether the logic name of the breakpoint table file is empty, if not, executing the next step of the function flow; otherwise, the function flow exits;
step 4; and judging whether the read new data is consistent with the old data in the previous period, and if not, judging whether the read new data is consistent with the old data in the previous period. Executing the next step of the function flow; otherwise, the function flow exits;
step 5: the execution function WrANA () puts the read new data into the shared memory, namely the data is unchanged and is not written into the real-time library, and the real-time library is written after the change;
step 6: the function flow ends.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311673198.5A CN117880377A (en) | 2023-12-07 | 2023-12-07 | Computer room movable ring monitoring data acquisition method based on intelligent protocol converter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311673198.5A CN117880377A (en) | 2023-12-07 | 2023-12-07 | Computer room movable ring monitoring data acquisition method based on intelligent protocol converter |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117880377A true CN117880377A (en) | 2024-04-12 |
Family
ID=90583793
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311673198.5A Pending CN117880377A (en) | 2023-12-07 | 2023-12-07 | Computer room movable ring monitoring data acquisition method based on intelligent protocol converter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117880377A (en) |
-
2023
- 2023-12-07 CN CN202311673198.5A patent/CN117880377A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100511160C (en) | Method for diagnosing segmentation of process control network | |
CN110502467B (en) | Universal acquisition interface software system based on serial port modbus communication protocol | |
US8793366B2 (en) | Method and arrangement for diagnosing networks including field bus systems | |
CN106814657B (en) | Embedded real-time EtherCAT main website construction method based on ARM | |
CN111366208B (en) | Data acquisition method based on upper and lower layer communication among platform, remote transmission equipment and water meter | |
CN105606922A (en) | Multi-frequency-converter aging test method and system based on LabVIEW | |
CN109637108A (en) | A kind of Lathe networking information acquisition system and method based on touch screen | |
CN117880377A (en) | Computer room movable ring monitoring data acquisition method based on intelligent protocol converter | |
CN115657646B (en) | Test method and device of CAN controller | |
KR101312035B1 (en) | System for supervisory control | |
CN113341853B (en) | IP core, FPGA chip, alternating current servo driver and communication method | |
CN107230263B (en) | WTB bus data frame recorder and recording method | |
CN114785659A (en) | Instruction configuration method and device, electronic equipment and computer-readable storage medium | |
US8554966B2 (en) | Method for data exchange | |
CN114488871A (en) | Control method, frequency converter and computer readable storage medium | |
CN1303162A (en) | Communication management device of measuring and control unit in automatization system of transformer station | |
CN108769072A (en) | Establish the method, apparatus and communication system of connection | |
CN212183548U (en) | IEC61850 protocol and Modbus protocol keysets | |
CN211181050U (en) | Comprehensive state intelligent collector for electric control cabinet | |
CN109212346B (en) | Debugging method of low-voltage intelligent power distribution cabinet | |
CN209373376U (en) | A kind of implanted control system data acquisition facility | |
CN111930582A (en) | System management bus detection platform, processor and system management bus detection method | |
CN110753111B (en) | Information sharing system of reactor physical start test equipment | |
CN115665017A (en) | Communication packet capturing device and communication packet capturing method based on single chip microcomputer | |
CN110995490B (en) | In-situ module device and configuration-free method |
Legal Events
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 |