CN103685370A - MODBUS data processing method and device, gateway server and memory - Google Patents

MODBUS data processing method and device, gateway server and memory Download PDF

Info

Publication number
CN103685370A
CN103685370A CN201210332495.9A CN201210332495A CN103685370A CN 103685370 A CN103685370 A CN 103685370A CN 201210332495 A CN201210332495 A CN 201210332495A CN 103685370 A CN103685370 A CN 103685370A
Authority
CN
China
Prior art keywords
memory
data
modbus
state
unit
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
Application number
CN201210332495.9A
Other languages
Chinese (zh)
Inventor
许冰铃
赵志刚
林成霖
龚钊潮
代伟
李泳霖
申伟刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201210332495.9A priority Critical patent/CN103685370A/en
Publication of CN103685370A publication Critical patent/CN103685370A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses an MODBUS data processing method and device, a gateway server and a memory. The MODBUS data processing method comprises the steps of acquiring collected data from an MODBUS monitor network; classifying the collected data to obtain analog quantity data and state quantity data; controlling the state quantity data to be stored in the memory of the MODBUS gateway server in bits, wherein the memory includes a state quantity storage module; each address space of the state quantity storage module has a multi-bit storage space. The MODBUS data processing method provided by the invention solves the problem that in the prior art storage space is wasted by MODBUS data processing, and can improve the storage space utilization rate of an equipment memory in the gateway server.

Description

MODBUS data processing method and device and gateway server and memory
Technical field
The present invention relates to data processing field, in particular to a kind of MODBUS data processing method and device and gateway server and memory.
Background technology
In the MODBUS data model that existing GB is listed, with the MODBUS data model of autonomous block, according to the difference of the contained data fundamental type of equipment, be divided into 4 pieces, each piece is separate, by different MODBUS function codes, accesses each piece.Fig. 1 is schematic diagram MODBUS data being conducted interviews based on MODBUS data model of the prior art, as shown in Figure 1, this kind of method is in MODBUS server apparatus 10, the data of different pieces of information model are stored in the different masses of equipment application memory 11, make when MODBUS server receives MODBUS request instruction, in equipment application memory 11, the data of different masses can conduct interviews by different MODBUS function codes 12, easy operating; But in this kind of MODBUS data model when carrying out the data storage processing of coil-type and input discrete magnitude type, the coil of individual bit and discrete magnitude input still need to take an address space in memory, space availability ratio is at most only 1/8, causes the wasting of resources of memory space.
For in correlation technique, the processing of MODBUS data easily being caused the problem of waste of storage space, effective solution is not yet proposed at present.
Summary of the invention
Main purpose of the present invention is to provide a kind of MODBUS data processing method and device and gateway server and memory, to solve the problem that in prior art, the processing of MODBUS data is easily caused waste of storage space.
To achieve these goals, according to an aspect of the present invention, provide a kind of MODBUS data processing method, having comprised: obtain the image data from MODBUS monitor network; Image data is classified, obtain analog data and quantity of state data; And state of a control amount data take a plurality of bits and be stored in the memory of MODBUS gateway server as unit, wherein, memory comprises quantity of state memory module, and each address space of quantity of state memory block all has a plurality of memory spaces.
Further, quantity of state packet is drawn together loop data and input measures of dispersion certificate, and state of a control amount data be take a plurality of bits and comprised as the memory that unit is stored to MODBUS gateway server: control coil data be take byte and are stored in memory as unit; And control inputs measures of dispersion according to this byte be that unit is stored in memory.
To achieve these goals, according to an aspect of the present invention, provide a kind of memory for MODBUS gateway server, having comprised: memorized in analogue piece; And quantity of state memory block, each address space of quantity of state memory block all has a plurality of memory spaces.
Further, quantity of state memory block comprises: loop data storage sub-block, and each address space of loop data storage sub-block all has 8 memory spaces; And input discrete magnitude storage sub-block, each address space of input discrete magnitude storage sub-block all has 8 memory spaces.
To achieve these goals, according to an aspect of the present invention, provide a kind of MODBUS data processing equipment, having comprised: acquiring unit, for obtaining the image data from MODBUS monitor network; Taxon, is connected with acquiring unit, for image data is classified, obtains analog data and quantity of state data; And control unit, be connected with taxon, for state of a control amount data, take a plurality of bits and be stored to the memory of MODBUS gateway server as unit, wherein, memory comprises quantity of state memory module, and each address space of quantity of state memory block all has a plurality of memory spaces.
Further, quantity of state packet is drawn together loop data and input measures of dispersion certificate, and control unit comprises: first controls subelement, is connected with taxon, take byte be stored to memory as unit for control coil data; And second control subelement, be connected with taxon, for control inputs measures of dispersion according to this byte be that unit is stored to memory.
To achieve these goals, according to an aspect of the present invention, provide a kind of MODBUS gateway server, having comprised: any MODBUS data processing equipment that foregoing of the present invention provides; And any memory for MODBUS gateway server of providing of foregoing of the present invention.
By the present invention, adopt and obtain the image data from MODBUS monitor network; Image data is classified, obtain analog data and quantity of state data; And state of a control amount data take a plurality of bits and be stored in the memory of MODBUS gateway server as unit, wherein, memory comprises quantity of state memory module, and each address space of quantity of state memory block all has a plurality of memory spaces.By the image data in MODBUS monitor network, carry out the division of analog quantity and quantity of state, then state of a control amount be take a plurality of bits and is stored in MODBUS gateway server as unit, avoided the quantity of state of individual bit still to need to take an address space of gateway server, solved and in prior art, the processing of MODBUS data has easily been caused the problem of waste of storage space, and then reached the utilance that improves device memory memory space in gateway server.
Accompanying drawing explanation
The accompanying drawing that forms the application's a part is used to provide a further understanding of the present invention, and schematic description and description of the present invention is used for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram to MODBUS data access according to the MODBUS data model of application correlation technique;
Fig. 2 is according to the flow chart of the MODBUS data processing method of the embodiment of the present invention;
Fig. 3 is according to the schematic diagram of the memory of the embodiment of the present invention;
Fig. 4 is the schematic diagram to MODBUS data access according to the MODBUS data processing method of the embodiment of the present invention and memory; And
Fig. 5 is according to the schematic diagram of the data processing equipment of the embodiment of the present invention.
Embodiment
It should be noted that, in the situation that not conflicting, embodiment and the feature in embodiment in the application can combine mutually.Describe below with reference to the accompanying drawings and in conjunction with the embodiments the present invention in detail.
The embodiment of the present invention provides a kind of MODBUS data processing method, below MODBUS data processing method that the embodiment of the present invention is provided be specifically introduced:
Fig. 2 is according to the flow chart of the MODBUS data processing method of the embodiment of the present invention, and as shown in Figure 2, the method comprises that following step S202 is to step S206:
S202: obtain the image data from MODBUS monitor network;
S204: image data is classified, obtain analog data and quantity of state data;
S206: state of a control amount data be take a plurality of bits and are stored in the memory of MODBUS gateway server as unit, and wherein, memory comprises quantity of state memory module, and each address space of quantity of state memory block all has a plurality of memory spaces.
The MODBUS data processing method of the embodiment of the present invention is carried out the division of analog quantity and quantity of state by the image data in MODBUS monitor network, then state of a control amount be take a plurality of bits as unit corresponding stored is to having a plurality of memory spaces (, a plurality of bit storage space) in address space, realized the quantity of state of storing a plurality of single-bit in an address space, avoid the quantity of state of individual bit still to need to take an address space of gateway server, solved and in prior art, the processing of MODBUS data has easily been caused the problem of waste of storage space, and then reached the utilance that improves device memory memory space in gateway server.
Wherein, quantity of state packet is drawn together loop data and input measures of dispersion certificate, and state of a control amount data be take a plurality of bits and specifically can be divided in unit is stored to the memory of MODBUS gateway server: control coil data be take a plurality of bits in unit is stored to above-mentioned memory; And control inputs measures of dispersion according to this plurality of bits be that unit is stored in above-mentioned memory.Analog data comprises save register data and input register data, and the two is all stored in the memorized in analogue module of memory.Particularly, a plurality of bits can be 8 bits, realize control coil data and input measures of dispersion according to this byte be that unit stores, make on Software for Design to computer system is processed easyly and quick, reached the effect of raising inside computer system performance.
The embodiment of the present invention also provides a kind of memory for MODBUS gateway server, below the memory for MODBUS gateway server that the embodiment of the present invention is provided be specifically introduced:
Fig. 3 is according to the schematic diagram of the memory of the embodiment of the present invention, as shown in Figure 3, the memory 30 of this embodiment comprises memorized in analogue module 31 and quantity of state memory module 32, wherein, each address space of quantity of state memory block 32 all has a plurality of memory spaces 321, memorized in analogue module 31 is for storing analog data, and a position memory space 321 of quantity of state memory block 32 is for storing the quantity of state data of a bit.
The memory of the embodiment of the present invention is divided into the structure with a plurality of memory spaces by each address space in quantity of state memory module, after the image data from MODBUS monitor network is classified processing, a plurality of bits of quantity of state data can being take store in a plurality of memory spaces of quantity of state memory module as unit, make to store the quantity of state of a plurality of single-bit in an address space, avoid the quantity of state of individual bit still to need to take an address space of gateway server.
Wherein, quantity of state memory block comprises: loop data storage sub-block, and each address space of loop data storage sub-block all has a plurality of memory spaces, for storing the loop data of a plurality of bits after classification is processed; And input discrete magnitude storage sub-block, same concrete a plurality of the memory spaces of each address space of input discrete magnitude storage sub-block, for storing the input measures of dispersion certificate of a plurality of bits after classification is processed.Wherein, a plurality of memory spaces can be 8 memory spaces, so that loop data and input measures of dispersion are according to all storing with byte form.
Fig. 4 is the schematic diagram to MODBUS data access according to the MODBUS data processing method of the embodiment of the present invention and memory, as shown in Figure 4, have in the MODBUS server apparatus 20 of the memory 30 that the above embodiment of the present invention provides, the data of different pieces of information model are stored in the different masses of memory 30, wherein, loop data is stored in loop data storage sub-block, input measures of dispersion is according to being stored in input discrete magnitude storage sub-block, input register data and save register data are all stored in the memorized in analogue module of memory, when MODBUS server receives MODBUS request instruction, in equipment application memory 30, the data of different masses can conduct interviews by different MODBUS function codes 22.
To apply the MODBUS data processing method of the embodiment of the present invention and memory in air-conditioner system, illustrate the use of the data processing method that the embodiment of the present invention provided below:
In remote air conditioner monitoring system, monitor network adopts MODBUS agreement.In this network, as the MODBUS device server Communication Gateway of bridge joint air-conditioning unit internal network and monitor network, its data that will store are the unit parameter that monitor network will collect and control.Parameter has analog quantity, as electronic expansion valve opening; Quantity of state, as unit fault position.Suppose that the unit fault position that Communication Gateway will be stored has 16, take 8bit as unit storage, be stored as 2 bytes, illustrate as shown in table 1:
Table 1
Figure BDA00002112338400041
Figure BDA00002112338400051
16 fault parameters of air-conditioning unit will take 16 address spaces according to the data model in GB as can be seen from Table 1, adopt MODBUS data processing method of the present invention only to need 2 address spaces.Greatly improved the utilance of memory space.
The embodiment of the present invention also provides a kind of MODBUS data processing equipment, this data processing equipment is for carrying out the data processing method that embodiment of the present invention foregoing provides, below MODBUS data processing equipment that the embodiment of the present invention is provided be specifically introduced:
Fig. 5 is according to the schematic diagram of the data processing equipment of the embodiment of the present invention, and as shown in Figure 5, the data processing equipment of this embodiment comprises acquiring unit 51, taxon 52 and control unit 53.
Wherein, acquiring unit 51 is for obtaining the image data from MODBUS monitor network; Taxon 52 is connected with acquiring unit 51, for image data is classified, obtains analog data and quantity of state data; Control unit 53 is connected with taxon 52, for state of a control amount data, take a plurality of bits and be stored to the memory of MODBUS gateway server as unit, wherein, memory comprises quantity of state memory module, and each address space of quantity of state memory block all has a plurality of memory spaces.
By the image data in MODBUS monitor network, carry out the division of analog quantity and quantity of state, then state of a control amount be take a plurality of bits as unit corresponding stored is to having a plurality of memory spaces (, a plurality of bit storage space) in address space, realized the quantity of state of storing a plurality of single-bit in an address space, avoid the quantity of state of individual bit still to need to take an address space of gateway server, solved and in prior art, the processing of MODBUS data has easily been caused the problem of waste of storage space, and then reached the utilance that improves device memory memory space in gateway server.
Wherein, quantity of state packet is drawn together loop data and input measures of dispersion certificate, and control unit comprises: first controls subelement, is connected with taxon 52, take byte be stored to the memory of MODBUS gateway server as unit for control coil data; And second control subelement, be connected with taxon 52, for control inputs measures of dispersion according to this byte be the memory that unit is stored to MODBUS gateway server.Analog data comprises save register data and input register data, and the two is all stored in the memorized in analogue module of memory.Particularly, a plurality of bits can be 8 bits, realize control coil data and input measures of dispersion according to this byte be that unit stores, make on Software for Design to computer system is processed easyly and quick, reached the effect of raising inside computer system performance.
From above description, can find out, the invention solves the problem of the existing memory space wasting of resources of existing GB data model, by by the coil of individual bit and input measures of dispersion according to this 8 bit Wei Yi units carry out batch process, easy and quick in the software processing of computer system, reached the effect that improves inside computer system performance.
In addition, the embodiment of the present invention also provides a kind of MODBUS gateway server, and the gateway server of this embodiment can be for comprising the gateway server of the MODBUS data processing equipment that the memory for MODBUS gateway server that embodiment of the present invention foregoing provides and embodiment of the present invention foregoing provide; Can also be for comprising the gateway server of the MODBUS data processing method that the memory for MODBUS gateway server that embodiment of the present invention foregoing provides and application embodiment of the present invention foregoing provide.
It should be noted that, in the step shown in the flow chart of accompanying drawing, can in the computer system such as one group of computer executable instructions, carry out, and, although there is shown logical order in flow process, but in some cases, can carry out shown or described step with the order being different from herein.
Each module of the present invention or each step stated can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in storage device and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or a plurality of modules in them or step are made into single integrated circuit module realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (7)

1. a MODBUS data processing method, is characterized in that, comprising:
Obtain the image data from MODBUS monitor network;
Described image data is classified, obtain analog data and quantity of state data; And
Control described quantity of state data and take a plurality of bits and be stored in the memory of MODBUS gateway server as unit, wherein, described memory comprises quantity of state memory module, and each address space of described quantity of state memory block all has a plurality of memory spaces.
2. data processing method according to claim 1, it is characterized in that, described quantity of state packet is drawn together loop data and input measures of dispersion certificate, controls described quantity of state data and take a plurality of bits and comprise as the memory that unit is stored to MODBUS gateway server:
Control described loop data and take byte in unit is stored to described memory; And
Control described input measures of dispersion according to this byte be that unit is stored in described memory.
3. for a memory for MODBUS gateway server, it is characterized in that, comprising:
Memorized in analogue piece; And
Quantity of state memory block, each address space of described quantity of state memory block all has a plurality of memory spaces.
4. memory according to claim 3, is characterized in that, described quantity of state memory block comprises:
Loop data storage sub-block, each address space of described loop data storage sub-block all has 8 memory spaces; And
Input discrete magnitude storage sub-block, each address space of described input discrete magnitude storage sub-block all has 8 memory spaces.
5. a MODBUS data processing equipment, is characterized in that, comprising:
Acquiring unit, for obtaining the image data from MODBUS monitor network;
Taxon, is connected with described acquiring unit, for described image data is classified, obtains analog data and quantity of state data; And
Control unit, be connected with described taxon, for controlling described quantity of state data, take a plurality of bits and be stored to the memory of MODBUS gateway server as unit, wherein, described memory comprises quantity of state memory module, and each address space of described quantity of state memory block all has a plurality of memory spaces.
6. data processing equipment according to claim 5, is characterized in that, described quantity of state packet is drawn together loop data and input measures of dispersion certificate, and described control unit comprises:
First controls subelement, be connected with described taxon, for control described loop data take byte as unit is stored to described memory; And
Second controls subelement, be connected with described taxon, for control described input measures of dispersion according to this byte be that unit is stored to described memory.
7. a MODBUS gateway server, is characterized in that, comprising:
MODBUS data processing equipment, described MODBUS data processing equipment is the MODBUS data processing equipment described in claim 5 or 6; And
Memory, described memory is the memory described in claim 3 or 4.
CN201210332495.9A 2012-09-07 2012-09-07 MODBUS data processing method and device, gateway server and memory Pending CN103685370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210332495.9A CN103685370A (en) 2012-09-07 2012-09-07 MODBUS data processing method and device, gateway server and memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210332495.9A CN103685370A (en) 2012-09-07 2012-09-07 MODBUS data processing method and device, gateway server and memory

Publications (1)

Publication Number Publication Date
CN103685370A true CN103685370A (en) 2014-03-26

Family

ID=50321677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210332495.9A Pending CN103685370A (en) 2012-09-07 2012-09-07 MODBUS data processing method and device, gateway server and memory

Country Status (1)

Country Link
CN (1) CN103685370A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105276762A (en) * 2015-10-15 2016-01-27 珠海格力电器股份有限公司 Method for determining faults of controller jumper caps and air conditioner controller
RU2756138C1 (en) * 2020-11-06 2021-09-28 Общество С Ограниченной Ответственностью "Озна-Диджитал Солюшнс" Method for collecting and transmission of data used for calculation of parameters of multi-phase product flow of oil and gas wells

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105276762A (en) * 2015-10-15 2016-01-27 珠海格力电器股份有限公司 Method for determining faults of controller jumper caps and air conditioner controller
CN105276762B (en) * 2015-10-15 2017-12-15 珠海格力电器股份有限公司 Controller jumper cap fault determination method and air-conditioner controller
RU2756138C1 (en) * 2020-11-06 2021-09-28 Общество С Ограниченной Ответственностью "Озна-Диджитал Солюшнс" Method for collecting and transmission of data used for calculation of parameters of multi-phase product flow of oil and gas wells

Similar Documents

Publication Publication Date Title
WO2021063033A1 (en) Energy consumption model training method for air conditioner and air conditioning system control method
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
CN104660682B (en) A kind of OPC data collection and monitoring intelligent terminal based on TD-LTE
CN102473115B (en) Apparatus and method for efficient data processing
CN112888268B (en) Energy-saving control method, device and equipment for data center machine room and storage medium
TWI547817B (en) Method, system and apparatus of planning resources for cluster computing architecture
CN102473117B (en) Apparatus and method for memory management and efficient data processing
CN103957237A (en) Architecture of elastic cloud
US20160065486A1 (en) Software load balancer to maximize utilization
CN104158699B (en) A kind of collecting method based on priority and segmentation
CN103916396A (en) Method for automatic expansion of application examples of cloud platform based on load self-adaption
CN107729137B (en) Server, block chain signature verification decryption method and storage medium
CN110149377A (en) A kind of video service node resource allocation methods, system, device and storage medium
CN110969198A (en) Distributed training method, device, equipment and storage medium for deep learning model
US20130054857A1 (en) Reducing latency at a network interface card
CN109587072A (en) Distributed system overall situation speed limiting system and method
WO2014194704A1 (en) A grouping processing method and system
CN110831039A (en) Data transmission method and transmission server in multi-path concurrent system
TW201527942A (en) System and method of adaptive voltage frequency scaling
WO2016197458A1 (en) Traffic control method and apparatus
CN102118361B (en) Method and device for controlling data transmission based on network protocol
CN102811152A (en) Method for realizing real-time transaction and data exchange of multiple main bus network communication
Jiang et al. Design and implementation of smart-home monitoring system with the Internet of Things technology
CN107004003A (en) model parameter fusion method and device
CN103685370A (en) MODBUS data processing method and device, gateway server and memory

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140326

RJ01 Rejection of invention patent application after publication