CN108416069A - A kind of data acquisition device and method - Google Patents
A kind of data acquisition device and method Download PDFInfo
- Publication number
- CN108416069A CN108416069A CN201810441575.5A CN201810441575A CN108416069A CN 108416069 A CN108416069 A CN 108416069A CN 201810441575 A CN201810441575 A CN 201810441575A CN 108416069 A CN108416069 A CN 108416069A
- Authority
- CN
- China
- Prior art keywords
- data
- modbus
- xml
- agreement
- parameter
- 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 41
- 238000012986 modification Methods 0.000 claims abstract description 14
- 230000004048 modification Effects 0.000 claims abstract description 14
- 230000002452 interceptive effect Effects 0.000 claims abstract description 7
- 238000004891 communication Methods 0.000 claims description 17
- 230000008569 process Effects 0.000 claims description 14
- 230000006870 function Effects 0.000 claims description 10
- 230000003993 interaction Effects 0.000 claims description 10
- 238000004321 preservation Methods 0.000 claims description 10
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 241001269238 Data Species 0.000 claims description 7
- 238000010276 construction Methods 0.000 claims description 7
- 230000001360 synchronised effect Effects 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 5
- 230000005540 biological transmission Effects 0.000 claims description 4
- 230000004927 fusion Effects 0.000 claims description 4
- 125000004122 cyclic group Chemical group 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 abstract description 5
- 238000012423 maintenance Methods 0.000 abstract description 4
- 238000012217 deletion Methods 0.000 abstract description 3
- 230000037430 deletion Effects 0.000 abstract description 3
- 238000012544 monitoring process Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 3
- 230000010354 integration Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000004378 air conditioning Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000013075 data extraction Methods 0.000 description 1
- 238000013524 data verification Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000007257 malfunction Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000000474 nursing effect Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/80—Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
- G06F16/83—Querying
- G06F16/838—Presentation of query results
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/80—Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention proposes a kind of data acquisition device, including Xml file generating modules, agreement generation module, data acquisition module and interactive module.It considers that the versatility of modbus agreements, one side configuration file frame cover the protocol utilization of various modbus equipment, supports the applicability of various application scenarios under the premise of embedded code zero is changed;On the other hand increase, deletion or the modification for completing data member under the premise of not changing PHP code are may be implemented in, really realizes the demand of maintenance personnel's technology zero gate sill.In addition, the invention also discloses a kind of collecting methods.
Description
Technical field
The present invention relates to internet of things field, more particularly to a kind of data acquisition device and method.
Background technology
With the rapid development of social progress and artificial intelligence industry, wisdom agricultural, wisdom computer room and intelligence community etc.
Novel noun has gradually entered into the visual field of people.And Internet of Things passes through the skills such as sensor, Radio Frequency Identification Technology, global positioning system
Art, any required monitoring of acquisition in real time, connection, interactive object or process, acquires its sound, light, heat, electricity, mechanics, chemistry, life
The information of the various needs such as object, position realizes that object is linked with object, object with the ubiquitous of people by all kinds of possible network insertions, real
Now to intelligent perception, identification and the management of article and process.Currently, Internet of Things framework is usually three-tier architecture, i.e. Internet of Things
System is made of sensing layer, transport network layer and application layer.Internet of Things is widely used, throughout intelligent transportation, environmental protection, government
The multiple fields such as work, public safety, safety home, intelligent fire, industry monitoring, old man's nursing, logistics.
In order to reach increasingly automated and intelligentized purpose, these Internet of Things field are needed to UPS, air-conditioning, distribution more
It is these that the smart machines such as cabinet, Temperature Humidity Sensor and sunshine recorder, which carry out real-time data acquisition and monitoring, Modbus agreements,
The puppy parc of smart machine.Therefore, how to carry out most efficient data acquisition and processing (DAP) to the equipment of modbus agreements becomes
The important topic of each automatic field.The major function of Modbus protocol data collectors be acquisition a certain range internally-powered,
The state and operation data of environment, security and other infrastructure, store after processing locality and upload monitoring server, simultaneously
Monitoring server is instructed and sends controlled device, and by human-computer interaction, realizes field control.
For the method that modbus protocol dynamics can configure, there are also patents of invention to propose solution at present.Example
When as referred to acquire the method, more exchange device for reading configuration file in dynamic base from smart machine in CN103139025A, by
The embedded engineer of profession updates acquisition dynamic link library, and collector after the power is turned on, can read from dynamic base and configure, carry out
Modbus is communicated;A kind of prolongable modbus protocol analysis methods are for another example proposed in patent CN105721451A, pass through control
Communication need between device processed generates protocol analysis configuration file, realizes modbus agreement different editions between multi-controller
It is compatible;A kind of self-described method of the modbus frame formats for another example proposed in patent CN106506307A, controller can pass through
The modbus message structure identification protocol types which defines realize the self-described of modbus agreements.
The modbus protocol dynamics proposed in patent at present can configure method and have some limitations, first two patent
The configuration file mentioned is only applicable to the protocol update between multiprocessor or only the intelligence of modbus standard agreements is supported to set
It is standby, and for some particular protocols or certain special data cells (as register low address in preceding, high address rear)
Equipment did not referred to.The third patent can describe the special part of agreement, but slave computer maintenance personnel is needed to carry out artificially
Classification and protocol integration, are easier to malfunction.
Invention content
The technical problem to be solved by the present invention is to:A kind of data acquisition device and method are provided, can not only be described
The special part of modbus agreements, and slave computer is easier to safeguard.
What the solution of the present invention was realized in:A kind of data acquisition device, including:
Xml file generating modules will automatically generate a configuration file, this document tool by modification to parameter and preservation
Parameter necessary to standby and each modbus equipment communication;
Agreement generation module defines data cell number according to xml document, applies for the space of suitable size in storehouse,
And corresponding structure is filled according to the data unit structure that xml is defined, the modbus agreements for ultimately producing standard carry out downlink
Communication;
Data acquisition module, the gathered data by the way of synchronous, and the data that agreement returns are subjected to preservation and data
The write-in in library;
Interactive module, reads the ID of each data cell in xml document, and number is extracted from database by the ID
According to realize the Dynamic Announce of all real time datas.
Another technical solution of the present invention is that on above-mentioned basis, the Xml file generating modules are by host computer reality
Existing, the configuration information of the data cell includes function code, register address, register capacity shared by forms data, data name, deposits
Store up syllable sequence, unit etc..
Another technical solution of the present invention is that on above-mentioned basis, the agreement generation module is with the pattern of application library
Embedded slave computer;Alternatively, the data acquisition module is realized by the serial port module of slave computer.
Another technical solution of the present invention is that on above-mentioned basis, the interactive module is programmed by PHP and realized, is used for
Carry out the displaying and update of data.
Another technical solution of the present invention is on above-mentioned basis, further includes a kind of collecting method comprising
Following steps:
S1, Xml files are generated, a configuration file, this document tool will be automatically generated by modification to parameter and preservation
Parameter necessary to standby and each modbus equipment communication;
S2, modbus agreements are generated, data cell number is defined according to xml document, applies for suitable size in storehouse
Space, and corresponding structure is filled according to the data unit structure that xml is defined, the modbus agreements for ultimately producing standard carry out
Downlink communication;
S3, data acquisition, the gathered data by the way of synchronous, and the data that agreement returns are subjected to preservation and database
Write-in;
S4, interaction display, read the ID of each data cell in xml document, and extracted from database by the ID
Data, to realize the Dynamic Announce of all real time datas.
Another technical solution of the present invention is that on above-mentioned basis, the step S1 generates the processing stream of Xml files
Journey specifically includes:
S11, the configuration page that sensor is newly added in host computer is opened;
S12, the parameter for inserting sensor with this in sensor configures the page;
S13, etc. after the completion of sensors basic configuration, open data cell and configure the page;
S14, the communication for sequentially inputting each data cell and data store relevant parameter, until all data sheet radix scrophulariae
Number input is completed;
S15, next modbus device configurations page is opened, and repeats S13 and S14 steps, until all devices configure
It completes;
S16, terminate sensor configuration flow, close the page, and xml document is issued to slave computer.
Another technical solution of the present invention is that on above-mentioned basis, the step S2 generates the processing of modbus agreements
Flow specifically includes:
S21, after reading the parameter of sensor by slave computer, it is successively read each back end parameter of sensor,
And it is stored in each type description structure body;
S22, search protocol form is consistent in structure chained list, accesses the adjacent data cell of data;
S23, step 2 is searched out to the data cell progress data fusion come and agreement generation, and is finally constructed in agreement
After construction complete, agreement is put into certain format on the address pre-defined in memory for the cyclic redundancy check of two bytes;
After S24, all agreement construction completes, slave computer will search for all modbus standard agreements of S23 generations, and pass through
485 bus interface are polled transmission.
Another technical solution of the present invention is that on above-mentioned basis, the process flow of the step S4 interactions display has
Body includes:
S41, start web access by web page address, web service request is sent to slave computer by network interface;
S42, slave computer are successively read name, conversion operator and the data of each data cell according to xml document content
Unit;
S43, it is searched in the database according to the name of data cell, finds the data value of this storage;
If S44, finding the data item, data value and conversion operator are subjected to multiplication operation, otherwise, data item filling
NaN;
S45, the data name of reading, data value and the data unit of display are according to fixed format automatically write into web page;
After S46, all data write-in web of waiting, refresh page realizes the update of real time data.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In embodiment provided by the invention, a kind of data acquisition device and method are proposed, consider modbus agreements
Versatility, one side configuration file frame cover the protocol utilization of various modbus equipment, support in embedded code
The applicability of various application scenarios under the premise of zero modification;On the other hand it may be implemented in and completed under the premise of not changing PHP code
The demand of maintenance personnel's technology zero gate sill is really realized in increase, deletion or the modification of data member.The data acquisition device
And method, the demand of collector and the modification of Web software development code zeros after modbus equipment substitutes both was considered, further through rich
The xml document of hierarchy carries out the classification and displaying of characteristic quantity, it is ensured that all modbus equipment is covered, to each type of
Data can be carried out acquiring and show.
Description of the drawings
The attached drawing for constituting the part of the present invention is used to provide further understanding of the present invention, schematic reality of the invention
Example and its explanation are applied for explaining the present invention, is not constituted improper limitations of the present invention.
Fig. 1 is the application schematic diagram of data acquisition device in one embodiment of the present invention;
Fig. 2 is the flow diagram of collecting method in one embodiment of the present invention;
Fig. 3 is the process chart that Xml files are generated in collecting method described in Fig. 2;
Fig. 4 is the process chart that modbus agreements are generated in collecting method described in Fig. 2;
Fig. 5 is the process chart of interaction display in collecting method described in Fig. 2.
Specific implementation mode
Present invention will now be described in detail with reference to the accompanying drawings., and the description of this part is only exemplary and explanatory, is not answered
There is any restriction effect to protection scope of the present invention.In addition, description of the those skilled in the art according to this document, it can be right
Feature in this document in embodiment and in different embodiments carries out the corresponding combination.
Term " first ", " second ", " third " " in description and claims of this specification and above-mentioned attached drawing
The (if present)s such as four " are for distinguishing similar object, without being used to describe specific sequence or precedence.It should manage
The data that solution uses in this way can be interchanged in the appropriate case, so as to the embodiment of the present invention described herein, such as can be with
Sequence other than those of illustrating or describing herein is implemented.In addition, term " comprising " and " having " and their times
What is deformed, it is intended that cover it is non-exclusive include, for example, contain the process of series of steps or unit, method, system,
Product or equipment those of are not necessarily limited to clearly to list step or unit, but may include not listing clearly or for
The intrinsic other steps of these processes, method, product or equipment or unit.Examples of the embodiments are shown in the accompanying drawings,
In from beginning to end same or similar label indicate same or similar element or element with the same or similar functions.Below
The embodiment described by reference to attached drawing is exemplary, and is only used for explaining the present invention, and should not be understood as the limit to the present invention
System.On the contrary, the embodiment of the present invention includes all changes fallen within the scope of the spiritual and intension of attached claims, repaiies
Change and equivalent.The description of this part is only exemplary and explanatory, should not there is any limitation to protection scope of the present invention
Effect.It, can be in embodiment in this document and different embodiments in addition, description of the those skilled in the art according to this document
In feature carry out the corresponding combination.In the description of the present invention, it should be noted that unless otherwise clearly defined and limited,
Term " connected ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or integrally
Connection;It can be mechanical connection, can also be electrical connection;It can be directly connected, it can also be indirectly connected through an intermediary.
For the ordinary skill in the art, the concrete meaning of above-mentioned term in the present invention can be understood with concrete condition.This
Outside, in the description of the present invention, unless otherwise indicated, the meaning of " plurality " is two or more.In flow chart or herein
Any process described otherwise above or method description are construed as, and expression includes one or more for realizing spy
Module, segment or the part of the code of the executable instruction for the step of determining logic function or process, and the preferred reality of the present invention
The range for applying mode includes other realization, include according to involved work(wherein sequence that is shown or discussing can not be pressed
Can by it is basic and meanwhile in the way of or in the opposite order, to execute function, this should be by the embodiment of the present invention technical field
Technical staff understood.
The embodiment of the present invention is as follows, as shown in Figure 1, wherein CPU can select any money smoothness operation linux operating systems
Processor chips.After device power, the kernel mirror image and root file system that are stored in nand flash are copied to by CPU
SDRAM, and loaded;After loading successfully, continue the xml document configured before being read from nand flash and progress
It the generation of modbus agreements and issues.All sensors access RS485 buses, after max485 chips carry out level conversion
Incoming CPU.In addition, by DM9000 network card chips may be implemented host computer for xml document configuration and web page it is real-time
Data acquisition.
The device of the data acquisition comprises the following modules:
Xml file generating modules will automatically generate a configuration file, this document tool by modification to parameter and preservation
Wherein, which is realized parameter necessary to standby and each modbus equipment communication by host computer, is directed to each data sheet
Member needs to cover function code, register address, register capacity, data name, storage syllable sequence, unit shared by forms data etc. and matches
Confidence ceases;
Agreement generation module defines data cell number according to xml document, applies for the space of suitable size in storehouse,
And corresponding structure is filled according to the data unit structure that xml is defined, the modbus agreements for ultimately producing standard carry out downlink
Communication.The module is embedded in slave computer with the pattern of application library, and data sheet can be defined according to xml document convenient for embedded collector
First number;
Data acquisition module, gathered data carry out preservation and database by the way of synchronous, by the data that agreement returns
Write-in.The module is realized by the serial port module of slave computer.
Interactive module, reads the ID of each data cell in xml document, and number is extracted from database by the ID
According to realize the Dynamic Announce of all real time datas.The module is programmed by PHP and is realized, carries out the displaying and update of data.User
When by page access collector, which can read the ID of each data cell in xml document, and by the ID from number
According to data are extracted in library, to realize the Dynamic Announce of all real time datas.
As described in Fig. 2 to 5, a kind of collecting method comprising following steps:
S1, Xml files are generated, a configuration file, this document tool will be automatically generated by modification to parameter and preservation
Parameter necessary to standby and each modbus equipment communication;
S2, modbus agreements are generated, data cell number is defined according to xml document, applies for suitable size in storehouse
Space, and corresponding structure is filled according to the data unit structure that xml is defined, the modbus agreements for ultimately producing standard carry out
Downlink communication;
S3, data acquisition, the gathered data by the way of synchronous, and the data that agreement returns are subjected to preservation and database
Write-in;
S4, interaction display, read the ID of each data cell in xml document, and extracted from database by the ID
Data, to realize the Dynamic Announce of all real time datas.
Specifically, as shown in Fig. 2, being the flow signal with a Temperature Humidity Sensor from configuration parameter to real-time display
Figure.It should be noted that being illustrated with two data cells (temperature and humidity) of a Temperature Humidity Sensor in Fig. 2 is only
Schematically, in the case where the spaces SDRAM are enough, the quantity of sensor and the sensor data block is had no in the present invention
Limitation is illustrated by taking two data cells of a Temperature Humidity Sensor as an example merely to for the sake of clear.
When RS485 buses are linked into a new Temperature Humidity Sensor, user is by host computer by the temperature and humidity sensing
The serial port baud rate of device, verification mode are successively filled from device number and data cell number;Then, by each data cell
Detailed construction carries out typing, and (modbus access functions code, interaction show that name, modbus access address, storage format, data are big
It is small etc.).After completing typing, the xml document generation module of host computer is given, is automatically generated by the parameter list configured by the module
The xml document of one standard.
After Xml files are passed to slave computer, it will be stored in nand flash.After the acquisition of enabled data, collector meeting
The xml document is read first, and data cell region sequence integration, Data Integration and association are carried out by modbus agreement generation modules
View generates work, finally generates one or more standard modbus agreements.
After the completion of the work of modbus agreement generation modules, the agreement of generation, which will be stored in SDRAM, is polled transmission,
This function is completed by data acquisition module.The module can send standard agreement downlink, and the data read are stored in
In the sqlite database tables established in advance, user is waited for access.
When user is by web-query real time data, PHP can first scan for xml document, find out all data sheets
First name (temp in such as Fig. 2 and humidity), then carries out data search by the unit name in sqlite databases, obtains
It takes newest real time data to carry out feedback and MUI to show.
Preferably, as shown in figure 3, the process flow that the step S1 generates Xml files specifically includes:
S11, the configuration page that sensor is newly added in host computer is opened;
S12, the parameter for inserting sensor with this in sensor configures the page;
S13, etc. after the completion of sensors basic configuration, open data cell and configure the page;
S14, the communication for sequentially inputting each data cell and data store relevant parameter, until all data sheet radix scrophulariae
Number input is completed;
S15, next modbus device configurations page is opened, and repeats S13 and S14 steps, until all devices configure
It completes;
S16, terminate sensor configuration flow, close the page, and xml document is issued to slave computer.
Preferably, as shown in figure 4, the process flow that the step S2 generates modbus agreements specifically includes:
S21, after reading the parameter of sensor by slave computer, it is successively read each back end parameter of sensor,
And it is stored in each type description structure body;
S22, search protocol form is consistent in structure chained list, accesses the adjacent data cell of data;
S23, step 2 is searched out to the data cell progress data fusion come and agreement generation, and is finally constructed in agreement
After construction complete, agreement is put into certain format on the address pre-defined in memory for the cyclic redundancy check of two bytes;
After S24, all agreement construction completes, slave computer will search for all modbus standard agreements of S23 generations, and pass through
485 bus interface are polled transmission.
Preferably, as shown in figure 5, the process flow of step S4 interaction displays specifically includes:
S41, start web access by web page address, web service request is sent to slave computer by network interface;
S42, slave computer are successively read name, conversion operator and the data of each data cell according to xml document content
Unit;
S43, it is searched in the database according to the name of data cell, finds the data value of this storage;
If S44, finding the data item, data value and conversion operator are subjected to multiplication operation, otherwise, data item filling
NaN;
S45, the data name of reading, data value and the data unit of display are according to fixed format automatically write into web page;
After S46, all data write-in web of waiting, refresh page realizes the update of real time data.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In embodiment provided by the invention, a kind of data acquisition device and method are proposed, consider modbus agreements
Versatility is that the sensor of support modbus agreements is described in carrier using xml texts, and description value has:Communication baud rate, data
Verification mode, from device number and number of data units.Each data cell item of modbus sensors is carried out using xml texts as carrier
Detailed description, description value have:Function code, MUI display names, initial address, storage format, data type, data length, data sheet
Position and conversion operator.All intelligence sensor data cells for supporting modbus agreements can be covered using this kind of describing mode.
When increasing, changing different types of sensor, it is no longer necessary to change slave computer modbus protocol stack codes.And pass through the libraries PHP
Slave computer transplanting, real time access of the web to slave computer database, when the data item of acquisition changes, page may be implemented
The data value in face also can real-time change.PHP first reads data item name from xml document, then is gone in database by this name
Respective value is extracted, portability of the whole system in terms of human-computer interaction has been greatly reinforced.Moreover, slave computer is according to xml texts
The content of part carries out data extraction and data fusion, may finally automatically generate efficient with downstream sensor data match
Modbus agreements.
The data acquisition device and method, the agreement that one side configuration file frame covers various modbus equipment make
With situation, the applicability of various application scenarios under the premise of embedded code zero is changed is supported;On the other hand it may be implemented in not
Increase, deletion or the modification that data member is completed under the premise of changing PHP code, really realize maintenance personnel's technology zero gate sill
Demand.The data acquisition device and method had both considered collector and Web software development codes after modbus equipment substitutes
The demand of zero modification, the classification and displaying of characteristic quantity is carried out further through the xml document rich in hierarchy, it is ensured that cover all
Modbus equipment can be carried out acquiring and show to each type of data.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (8)
1. a kind of data acquisition device, which is characterized in that including:
Xml file generating modules will automatically generate a configuration file by modification to parameter and preservation, this document have and
Parameter necessary to each modbus equipment communication;
Agreement generation module defines data cell number according to xml document, applies for the space of suitable size in storehouse, and presses
Corresponding structure is filled according to the data unit structure that xml is defined, the modbus agreements for ultimately producing standard carry out downlink communication;
Data acquisition module, the gathered data by the way of synchronous, and the data that agreement returns preserve and database
Write-in;
Interactive module, reads the ID of each data cell in xml document, and data are extracted from database by the ID, with
Realize the Dynamic Announce of all real time datas.
2. data acquisition device according to claim 1, which is characterized in that the Xml file generating modules are by host computer
Realize, the configuration information of the data cell includes function code, register address, register capacity, data name shared by forms data,
Store syllable sequence, unit.
3. data acquisition device according to claim 1, which is characterized in that the agreement generation module is with the mould of application library
Formula is embedded in slave computer;Alternatively, the data acquisition module is realized by the serial port module of slave computer.
4. data acquisition device according to any one of claim 1 to 3, which is characterized in that the interactive module is by PHP
Programming realization, displaying and update for carrying out data.
5. a kind of collecting method, which is characterized in that include the following steps:
S1, Xml files are generated, a configuration file will be automatically generated by modification to parameter and preservation, this document have and
Parameter necessary to each modbus equipment communication;
S2, modbus agreements are generated, data cell number are defined according to xml document, applies for the space of suitable size in storehouse,
And corresponding structure is filled according to the data unit structure that xml is defined, the modbus agreements for ultimately producing standard carry out downlink
Communication;
S3, data acquisition, the gathered data by the way of synchronous, and the data that agreement returns preserve and database is write
Enter;
S4, interaction display, read the ID of each data cell in xml document, and data are extracted from database by the ID,
To realize the Dynamic Announce of all real time datas.
6. collecting method according to claim 5, which is characterized in that the step S1 generates the processing of Xml files
Flow specifically includes:
S11, the configuration page that sensor is newly added in host computer is opened;
S12, the parameter for inserting sensor with this in sensor configures the page;
S13, etc. after the completion of sensors basic configuration, open data cell and configure the page;
S14, the communication for sequentially inputting each data cell and data store relevant parameter, until all data cell parameters are defeated
Enter to complete;
S15, next modbus device configurations page is opened, and repeats S13 and S14 steps, until all devices configuration is completed;
S16, terminate sensor configuration flow, close the page, and xml document is issued to slave computer.
7. collecting method according to claim 5, which is characterized in that the step S2 generates the place of modbus agreements
Reason flow specifically includes:
S21, after reading the parameter of sensor by slave computer, it is successively read each back end parameter of sensor, and deposit
Enter each type description structure body;
S22, search protocol form is consistent in structure chained list, accesses the adjacent data cell of data;
S23, step 2 is searched out to the data cell progress data fusion come and agreement generation, and two is finally constructed in agreement
After construction complete, agreement is put into certain format on the address pre-defined in memory for the cyclic redundancy check of byte;
After S24, all agreement construction completes, slave computer will search for all modbus standard agreements of S23 generations, and pass through 485
Bus interface is polled transmission.
8. collecting method according to claim 5, which is characterized in that the process flow of the step S4 interactions display
It specifically includes:
S41, start web access by web page address, web service request is sent to slave computer by network interface;
S42, slave computer are successively read name, conversion operator and the data unit of each data cell according to xml document content;
S43, it is searched in the database according to the name of data cell, finds the data value of this storage;
If S44, finding the data item, data value and conversion operator are subjected to multiplication operation, otherwise, data item inserts NaN;
S45, the data name of reading, data value and the data unit of display are according to fixed format automatically write into web page;
After S46, all data write-in web of waiting, refresh page realizes the update of real time data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810441575.5A CN108416069A (en) | 2018-05-10 | 2018-05-10 | A kind of data acquisition device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810441575.5A CN108416069A (en) | 2018-05-10 | 2018-05-10 | A kind of data acquisition device and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108416069A true CN108416069A (en) | 2018-08-17 |
Family
ID=63138422
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810441575.5A Pending CN108416069A (en) | 2018-05-10 | 2018-05-10 | A kind of data acquisition device and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108416069A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109245980A (en) * | 2018-11-20 | 2019-01-18 | 厦门科灿信息技术有限公司 | Modbus communication protocol analytic method, system and equipment and storage medium |
CN109302480A (en) * | 2018-10-10 | 2019-02-01 | 江苏卓正环保科技有限公司 | A kind of method of data collecting instrument Remote configuration |
CN109587261A (en) * | 2018-12-18 | 2019-04-05 | 芜湖智久机器人有限公司 | A kind of AGV data transmission system, transmission method |
CN109889481A (en) * | 2018-12-26 | 2019-06-14 | 广州海达安控智能科技有限公司 | Fusion method and device are acquired based on multi-sensor device data |
CN110968323A (en) * | 2019-11-27 | 2020-04-07 | 中国银行股份有限公司 | Method and system for automatically generating APP function code list of mobile terminal |
CN111050235A (en) * | 2019-12-13 | 2020-04-21 | 天健创新(北京)监测仪表股份有限公司 | Automatic sensor identification method and device for water quality monitoring terminal |
CN111865930A (en) * | 2020-06-29 | 2020-10-30 | 浪潮电子信息产业股份有限公司 | Method for automatically extracting character protocols of uninterruptible power supply |
CN112003837A (en) * | 2020-08-05 | 2020-11-27 | 深圳市中物互联技术发展有限公司 | Intelligent equipment adaptation method and device based on Modbus protocol and storage medium |
CN112147963A (en) * | 2020-09-30 | 2020-12-29 | 深圳市天启宇通科技有限公司 | Industrial field data interaction method |
CN112887133A (en) * | 2021-01-21 | 2021-06-01 | 杭州康吉森自动化科技有限公司 | Redundancy switching method for industrial gateway, industrial gateway and storage medium |
CN114518906A (en) * | 2022-01-25 | 2022-05-20 | 厦门锐谷通信设备有限公司 | XML (extensive markup language) description file-based equipment configuration parameter management system and method |
CN115786889A (en) * | 2023-02-13 | 2023-03-14 | 广州志橙半导体有限公司 | Data acquisition method and device of CVD (chemical vapor deposition) equipment |
CN115988104A (en) * | 2023-03-20 | 2023-04-18 | 深圳市鸿明机电有限公司 | Sensor compatibility processing method and system |
CN116627959A (en) * | 2023-07-26 | 2023-08-22 | 合肥思迈科技有限公司 | Method for clearing operation history data of movable ring equipment of machine room |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050216356A1 (en) * | 2003-07-30 | 2005-09-29 | Pearce William M | Method for automatically filling in web forms |
CN103501291A (en) * | 2013-09-24 | 2014-01-08 | 上海汉乾信息科技发展有限公司 | Multi-protocol data collection system and method of various equipment sensors |
CN103763396A (en) * | 2014-02-12 | 2014-04-30 | 浙江大学 | Energy consumption data acquisition unit and method based on multi-protocol parallel acquisition technology |
-
2018
- 2018-05-10 CN CN201810441575.5A patent/CN108416069A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050216356A1 (en) * | 2003-07-30 | 2005-09-29 | Pearce William M | Method for automatically filling in web forms |
CN103501291A (en) * | 2013-09-24 | 2014-01-08 | 上海汉乾信息科技发展有限公司 | Multi-protocol data collection system and method of various equipment sensors |
CN103763396A (en) * | 2014-02-12 | 2014-04-30 | 浙江大学 | Energy consumption data acquisition unit and method based on multi-protocol parallel acquisition technology |
Non-Patent Citations (1)
Title |
---|
周健等: "基于总线配置文件的仿真测试软件通用化设计", 《信息系统工程》 * |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109302480A (en) * | 2018-10-10 | 2019-02-01 | 江苏卓正环保科技有限公司 | A kind of method of data collecting instrument Remote configuration |
CN109245980A (en) * | 2018-11-20 | 2019-01-18 | 厦门科灿信息技术有限公司 | Modbus communication protocol analytic method, system and equipment and storage medium |
CN109245980B (en) * | 2018-11-20 | 2021-08-06 | 厦门科灿信息技术有限公司 | Modbus communication protocol analysis method, system, equipment and storage medium |
CN109587261A (en) * | 2018-12-18 | 2019-04-05 | 芜湖智久机器人有限公司 | A kind of AGV data transmission system, transmission method |
CN109889481B (en) * | 2018-12-26 | 2022-09-20 | 广州市中海达测绘仪器有限公司 | Data acquisition and fusion method and device based on multi-sensor equipment |
CN109889481A (en) * | 2018-12-26 | 2019-06-14 | 广州海达安控智能科技有限公司 | Fusion method and device are acquired based on multi-sensor device data |
CN110968323A (en) * | 2019-11-27 | 2020-04-07 | 中国银行股份有限公司 | Method and system for automatically generating APP function code list of mobile terminal |
CN110968323B (en) * | 2019-11-27 | 2023-06-20 | 中国银行股份有限公司 | Automatic generation method and system for APP function code list of mobile terminal |
CN111050235A (en) * | 2019-12-13 | 2020-04-21 | 天健创新(北京)监测仪表股份有限公司 | Automatic sensor identification method and device for water quality monitoring terminal |
CN111865930A (en) * | 2020-06-29 | 2020-10-30 | 浪潮电子信息产业股份有限公司 | Method for automatically extracting character protocols of uninterruptible power supply |
CN112003837A (en) * | 2020-08-05 | 2020-11-27 | 深圳市中物互联技术发展有限公司 | Intelligent equipment adaptation method and device based on Modbus protocol and storage medium |
CN112147963A (en) * | 2020-09-30 | 2020-12-29 | 深圳市天启宇通科技有限公司 | Industrial field data interaction method |
CN112887133B (en) * | 2021-01-21 | 2022-08-16 | 杭州康吉森自动化科技有限公司 | Redundancy switching method for industrial gateway, industrial gateway and storage medium |
CN112887133A (en) * | 2021-01-21 | 2021-06-01 | 杭州康吉森自动化科技有限公司 | Redundancy switching method for industrial gateway, industrial gateway and storage medium |
CN114518906A (en) * | 2022-01-25 | 2022-05-20 | 厦门锐谷通信设备有限公司 | XML (extensive markup language) description file-based equipment configuration parameter management system and method |
CN115786889A (en) * | 2023-02-13 | 2023-03-14 | 广州志橙半导体有限公司 | Data acquisition method and device of CVD (chemical vapor deposition) equipment |
CN115988104A (en) * | 2023-03-20 | 2023-04-18 | 深圳市鸿明机电有限公司 | Sensor compatibility processing method and system |
CN116627959A (en) * | 2023-07-26 | 2023-08-22 | 合肥思迈科技有限公司 | Method for clearing operation history data of movable ring equipment of machine room |
CN116627959B (en) * | 2023-07-26 | 2023-10-13 | 合肥思迈科技有限公司 | Method for clearing operation history data of movable ring equipment of machine room |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108416069A (en) | A kind of data acquisition device and method | |
CN107967316A (en) | A kind of method of data synchronization, equipment and computer-readable recording medium | |
CN101632050B (en) | Dynamically extensible and automatically configurable building automation system and architecture | |
CN102640156B (en) | For analyzing the system and method for nonstandard facilities operation intracardiac in the data | |
CN106796556A (en) | emulation endpoint configurations | |
CN107562937A (en) | Method and apparatus for managing process data | |
EP2701085A1 (en) | Cloud computing-based data sharing system and method | |
CN108989358B (en) | Method for acquiring running data of textile machine based on TCP/IP protocol | |
CN100428141C (en) | Programmable controller and communication unit, and methods of solving variables and of handing data | |
CN103455591A (en) | Standard data exchange interface method of parallel cooperative system | |
CN103327080A (en) | Method and device for establishing control system of internet of things | |
CN105005800A (en) | Data updating method of electronic paper passive label | |
CN110837387B (en) | Portable power source leasing system, automatic revenue collecting system and updating method thereof | |
CN114358775A (en) | Internet of things source tracing method based on Fabric and IPFS and related equipment thereof | |
CN114281707A (en) | Number making method, service application testing method and related equipment thereof | |
CN102414657A (en) | Shared job scheduling in electronic notebook | |
CN110007905A (en) | A kind of generation method and system of the software development scheme based on big data | |
CN113395180A (en) | Industrial real-time big data acquisition and release method and industrial real-time big data platform | |
CN112685115A (en) | International cue language generating method, system, computer equipment and storage medium | |
CN107566434A (en) | Data cached reading/writing method and system in a kind of distributed system | |
CN101387984B (en) | Memory management method and apparatus | |
CN115712422A (en) | Form page generation method and device, computer equipment and storage medium | |
CN114691782A (en) | Database table increment synchronization method and device and storage medium | |
CN115187110A (en) | Consumable management system | |
WO2021113049A1 (en) | Method and system for communication between blockchains on heterogeneous blockchain networks |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180817 |
|
RJ01 | Rejection of invention patent application after publication |