CN111142451A - Multi-channel data acquisition method and system - Google Patents

Multi-channel data acquisition method and system Download PDF

Info

Publication number
CN111142451A
CN111142451A CN202010044744.9A CN202010044744A CN111142451A CN 111142451 A CN111142451 A CN 111142451A CN 202010044744 A CN202010044744 A CN 202010044744A CN 111142451 A CN111142451 A CN 111142451A
Authority
CN
China
Prior art keywords
sensor
data acquisition
command
address
communication
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
CN202010044744.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.)
Institute of Cotton Research of Chinese Academy of Agricultural Sciences
Original Assignee
Institute of Cotton Research of Chinese Academy of Agricultural Sciences
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 Institute of Cotton Research of Chinese Academy of Agricultural Sciences filed Critical Institute of Cotton Research of Chinese Academy of Agricultural Sciences
Priority to CN202010044744.9A priority Critical patent/CN111142451A/en
Publication of CN111142451A publication Critical patent/CN111142451A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)

Abstract

The invention discloses a multi-channel data acquisition method and a multi-channel data acquisition system, which aim to solve the technical problems that the number of sensors connected with the existing acquisition device is small and the sensors cannot be replaced. The invention comprises sending scan command to all communication addresses; receiving return information of the communication address, wherein the return information comprises hardware information of a sensor connected to the communication address; sending an acquisition command to the communication address connected with the sensor; and receiving and storing the sensing data of the sensor to finish data acquisition. The invention has the beneficial technical effects that: user programming is not needed when the sensors are added or replaced, the number of the sensors which can be accessed is greatly expanded, and the operation is convenient.

Description

Multi-channel data acquisition method and system
Technical Field
The invention relates to the technical field of data acquisition, in particular to a multi-channel data acquisition method and a multi-channel data acquisition system.
Background
The existing data collector delivery program and functions are usually customized according to requirements, and interface information is defined according to the types and the number of connected sensors.
The products mainly comprise CR1000, CR300, EM50 and the like of campbell company, wherein EM50 is simple to use, can be used in a plug-and-play mode, can be connected with only 5 sensors and is high in cost; CR1000, CR300 are more functional, but the built-in programs are also fixed, adding or replacing sensors requires internal programming, and is not operable by the user.
Disclosure of Invention
The invention provides a multi-path data acquisition device and a method, which aim to solve the technical problems that the existing acquisition device is small in the number of connected sensors and cannot be replaced.
In order to solve the technical problems, the invention adopts the following technical scheme:
designing a multipath data acquisition method, comprising the following steps:
sending a scanning command to all theoretical communication addresses;
receiving return information of a sensor connected with a theoretical address, wherein the return information comprises hardware information of the sensor connected with the communication address;
sending an acquisition command to the communication address connected with the sensor;
and receiving and storing the sensing data of the sensor.
Further, the scanning command includes sending an inquiry command to all communication addresses, and if a sensor is arranged on a certain address, returning an address code of the sensor.
Furthermore, a query command is sent to the sensor, and the hardware information of the sensor is returned.
Further, the communication address where no sensor is connected accepts the scan command but does not return any information.
Furthermore, the scanning command and the acquisition command both conform to SDI-12 standard communication protocol.
A multiplexed data acquisition system comprising:
the main control module is used for sending a control command and receiving return information;
the communication module is used for connecting the sensor to the main control module;
and the storage module is used for storing the sensing data of the sensor and is correspondingly connected with the main control module.
Further, the main control module comprises an STC single chip microcomputer.
Further, the communication module comprises a USB interface module.
Further, the storage module comprises a file management module and a storage module.
Further, the file management chip includes a CH378Q chip, which is correspondingly connected with a MiniSD card.
Compared with the prior art, the invention has the beneficial technical effects that:
1. the invention does not need to define the type and the number of the sensors by additional programming, automatically scans the sensors when being electrified, collects data according to the scanning result, sets time intervals in an interface mode, is visual and easy to master, stores the collected data into a local SD card, only needs to copy the data out in the later period, and can watch the working state through a display screen in the working process; the operation is visual and simple.
2. The invention automatically scans and identifies various sensors, then automatically collects and stores the sensors without user programming, and can conveniently increase or replace the sensors.
Drawings
FIG. 1 is a system flow diagram of one embodiment of the present invention.
Fig. 2 is a circuit diagram of a main control module according to an embodiment of the invention.
FIG. 3 is a circuit diagram of a sensor interface according to an embodiment of the present invention.
Fig. 4 is a circuit diagram of a power module according to an embodiment of the invention.
FIG. 5 is a circuit diagram of a file management module according to an embodiment of the present invention.
FIG. 6 is a circuit diagram of an SD card module according to an embodiment of the present invention.
FIG. 7 is a circuit diagram of a USB interface according to an embodiment of the present invention.
Fig. 8 is a circuit diagram of a communication module according to an embodiment of the invention.
Fig. 9 is a circuit diagram of a driving module according to an embodiment of the invention.
Detailed Description
The following examples are intended to illustrate the present invention in detail and should not be construed as limiting the scope of the present invention in any way.
The programs referred to or relied on in the following embodiments are all conventional programs or simple programs in the art, and those skilled in the art can make routine selection or adaptation according to specific application scenarios.
The unit modules (components, structures, and mechanisms) and the devices such as sensors in the following examples are all conventional commercial products unless otherwise specified.
Example 1: a data acquisition method, see fig. 1, mainly comprising:
step 100: the single chip microcomputer is used as a main control module to send scanning commands to all communication addresses, the address code in the SDI12 communication protocol is 1 bit and is represented by 0-9, a-Z and A-Z;
step 101: if a sensor is arranged in a certain address correspondingly, for example, the sensor is connected to the 'a', the 'a' is returned to the single chip microcomputer, then the single chip microcomputer confirms commands to the sensors, and hardware information of the sensors is returned, wherein the hardware information comprises brands, models, serial numbers and the like; the single chip microcomputer can know the number of sensors accessed by the collector and the types of the accessed sensors;
step 102: the single chip microcomputer sends an acquisition command to the sensor to wait for receiving data;
step 103: and after receiving the acquisition command, the sensor sends data information to the singlechip to complete data acquisition.
The sensor that scanning system inserts is regularly come through setting for time interval, and this time interval is very short for when need insert or change new sensor at every turn, all can be rescanned, conveniently expand the kind and the quantity of sensor, need not become again, directly with new sensor insert binding post can, convenient to use.
Example 2: a multi-channel data acquisition system comprises a main control module, a communication module and a storage module.
Referring to fig. 2, the main control module adopts an STC8A8K64S4a12 single chip microcomputer for sending control commands and receiving sensing data. The sensors are connected with the single chip microcomputer through the wiring terminal strip shown in fig. 3, and the sensors are connected in parallel and are jointly connected to the SDI pins of the single chip microcomputer. The single chip microcomputer is connected with a 0.96-inch OLED 12864 liquid crystal display screen through an IIC interface and used for checking the working state of the data acquisition system.
Referring to fig. 8, the communication module adopts a CH340G USB interface conversion chip, the input end is connected with the USBTXD and the USBRXD of the single chip microcomputer, and the output end is connected with the USB interface shown in fig. 7. Through the module, the system can perform data interaction with the most common USB interface and devices such as a computer, a USB flash disk and the like, and the operation is convenient.
Referring to fig. 5, the storage module adopts a CH378Q file management chip for the single chip microcomputer system to read and write files in the usb disk or SD card quickly. The chip is connected with a MiniSD memory card shown in figure 6, CH378 supports a USB device mode and a USB host mode, is internally provided with a basic firmware of a USB communication protocol, is internally provided with a firmware of a special communication protocol for processing Mass-Storage Mass Storage equipment, is internally provided with a communication interface firmware of an SD card, is internally provided with a management firmware of FAT16, FAT32 and FAT12 file systems, and supports common USB memory equipment (comprising a U disk/USB hard disk/USB flash disk/USB card reader) and SD cards (comprising a standard capacity SD card, a high capacity HC-SD card and an MMC card and a TF card compatible with the protocols).
The power supply of the system is shown in fig. 4, the AD12V power supply is converted into AD8V by LM2596-ADJ at the first stage to supply power to the sensor, the AD12V power supply voltage is obtained from a 12V solar panel, the AD8V is converted into AD5V by REG-1117 at the second stage to supply power to the single chip microcomputer and the USB interface, and the AD5V is converted into AD3.3V by REG-1117 at the third stage to supply power to the file management chip CH 378Q.
After the system finishes data acquisition, the external equipment is controlled by the driving circuit shown in fig. 9, a triode QR1 in the circuit is connected to an output port JDQ1 of the singlechip through an optical coupler, an emitting electrode is grounded, and a collecting electrode controls a relay K1. External functional components such as a water pump, an electromagnetic valve and the like are connected to the relay, and when the relay K1 is closed, the peripheral starts to operate.
The working mode of the multi-channel data acquisition system is as follows:
the singlechip controls the P3.2 pin to simulate SDI-12 time sequence and sends corresponding acquisition command, such as sending command to the sensor
Figure 425289DEST_PATH_IMAGE002
The sensor will automatically return the address of the sensor, send "aI |" (a is the sensor address) to the sensor, the sensor returns sensor information including brand, model, serial number, etc., and then send a command "aD 0 |" (a is the sensor address) to return the data of the sensor to store according to the read address, and the collection is completed.
The single chip microcomputer receives data returned by the sensor and adopts an interrupt mode. First, configuring a P3.2 pin to trigger interruption for both a rising edge and a falling edge, if it is detected that the P3.2 is a high level in an interruption service subprogram, explaining that a start bit arrives, delaying the time by 833 mus, and thus, ensuring that the time delay by 833 mus can be in a data stable state when detecting a later data bit again. When two bytes of 0x0D and 0x0A are received, which indicates that the data returned by the sensor is finished, the receiving completion flag is set to be 1, and the processing is carried out in the main program.
After receiving the data of the sensor, the single chip microcomputer sends the data to the file system management module CH378Q through a serial port to drive the SD card to store the data.
The invention is explained in detail above with reference to the drawings and the embodiments; however, it will be understood by those skilled in the art that various changes in the specific parameters of the above embodiments may be made without departing from the spirit of the invention, and a plurality of specific embodiments are formed, which are common variations of the invention and will not be described in detail herein.

Claims (10)

1. A method of multiplexed data acquisition, comprising:
sending a scanning command to all theoretical communication addresses;
receiving return information of a sensor connected with a theoretical address, wherein the return information comprises address information of an actually connected sensor and hardware information of the sensor;
sending an acquisition command to a communication address actually connected with the sensor;
and receiving and storing the sensing data of the sensor to finish data acquisition.
2. The multi-channel data acquisition method according to claim 1, wherein the scan command comprises an inquiry command sent to all theoretical communication addresses, and if the communication addresses are provided with sensors correspondingly, an address code of the communication address connected with the sensor is returned.
3. The multi-channel data acquisition method according to claim 2, wherein after receiving the address corresponding to the sensor, sending a query command to the address, and then returning the hardware information of the corresponding sensor.
4. The multiplexed data collection method of claim 1, wherein the communication address without a sensor is configured to receive a scan command without returning any information.
5. The multi-channel data acquisition method according to claim 1, wherein the scan command and the acquisition command both conform to SDI-12 standard communication protocol.
6. A multiplexed data acquisition system, comprising:
the main control module is used for sending a control command and receiving return information;
the communication module is used for connecting the sensor to the main control module;
and the storage module is used for storing the sensing data of the sensor and is correspondingly connected with the main control module.
7. The multi-channel data acquisition system according to claim 6, wherein the master control module comprises an STC single chip microcomputer.
8. The multiplexed data collection system of claim 6, wherein the communication module comprises a USB interface module.
9. The multiplexed data collection system of claim 6, wherein the storage module comprises a file management module and a storage module.
10. The multi-channel data acquisition system as claimed in claim 9, wherein the file management chip comprises a CH378Q chip, to which a MiniSD card is correspondingly connected.
CN202010044744.9A 2020-01-16 2020-01-16 Multi-channel data acquisition method and system Pending CN111142451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010044744.9A CN111142451A (en) 2020-01-16 2020-01-16 Multi-channel data acquisition method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010044744.9A CN111142451A (en) 2020-01-16 2020-01-16 Multi-channel data acquisition method and system

Publications (1)

Publication Number Publication Date
CN111142451A true CN111142451A (en) 2020-05-12

Family

ID=70525328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010044744.9A Pending CN111142451A (en) 2020-01-16 2020-01-16 Multi-channel data acquisition method and system

Country Status (1)

Country Link
CN (1) CN111142451A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070093198A1 (en) * 2003-07-11 2007-04-26 Kameleon Method and system for rapidly setting up a communication between a disk drvie and a plurality of communicating objects
JP2013005374A (en) * 2011-06-21 2013-01-07 Panasonic Corp Measurement system
CN103067941A (en) * 2012-12-26 2013-04-24 武汉大学 Multivariable distributed type online monitoring system based on wireless sensor network
CN104603573A (en) * 2012-09-05 2015-05-06 赫克斯冈技术中心 Measuring machine communication with automatic address allocation
CN108199867A (en) * 2017-12-20 2018-06-22 北京城市系统工程研究中心 A kind of network-building method and data transmission method of wired sensor network
CN208547829U (en) * 2018-06-14 2019-02-26 上海汇焰智能科技有限公司 Distribution hanging weighing system and distributed hangar system
CN110365789A (en) * 2019-07-23 2019-10-22 珠海格力电器股份有限公司 Air conditioning system communication method and device, main control device and storage medium
CN211149251U (en) * 2020-01-16 2020-07-31 中国农业科学院棉花研究所 Multi-channel data acquisition system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070093198A1 (en) * 2003-07-11 2007-04-26 Kameleon Method and system for rapidly setting up a communication between a disk drvie and a plurality of communicating objects
JP2013005374A (en) * 2011-06-21 2013-01-07 Panasonic Corp Measurement system
CN104603573A (en) * 2012-09-05 2015-05-06 赫克斯冈技术中心 Measuring machine communication with automatic address allocation
CN103067941A (en) * 2012-12-26 2013-04-24 武汉大学 Multivariable distributed type online monitoring system based on wireless sensor network
CN108199867A (en) * 2017-12-20 2018-06-22 北京城市系统工程研究中心 A kind of network-building method and data transmission method of wired sensor network
CN208547829U (en) * 2018-06-14 2019-02-26 上海汇焰智能科技有限公司 Distribution hanging weighing system and distributed hangar system
CN110365789A (en) * 2019-07-23 2019-10-22 珠海格力电器股份有限公司 Air conditioning system communication method and device, main control device and storage medium
CN211149251U (en) * 2020-01-16 2020-07-31 中国农业科学院棉花研究所 Multi-channel data acquisition system

Similar Documents

Publication Publication Date Title
US6993618B2 (en) Dual-mode flash storage exchanger that transfers flash-card data to a removable USB flash key-drive with or without a PC host
US7162549B2 (en) Multimode controller for intelligent and “dumb” flash cards
CN103412769A (en) External card parameter configuration method, equipment and system
CN102541475A (en) Data storage method and data storage device
CN110489357B (en) Method and system for hiding data on removable storage device
CN103176924A (en) Output device, log collecting method for output device, and storage medium
CN101853224A (en) Method and device for identifying port of data card device under Linux system
CN104281413A (en) Command queue management method, memorizer controller and memorizer storage device
CN100481895C (en) Method and device for carrying out TV set software upgrade
CN101354657A (en) Method and circuit for loading on site programmable gate array
US20060168358A1 (en) Storage control system
CN101404000B (en) Reading-writing method with multi-memory card logic in one
CN211149251U (en) Multi-channel data acquisition system
CN102902550A (en) Computer system and operating system loading method thereof
CN102262600B (en) Method and system for recognizing USB (Universal Serial Bus) equipment
CN103049403B (en) Method for communication between embedded terminal device and cell phone
US20080133961A1 (en) Debug card
CN103218300B (en) Data processing method, Memory Controller and memorizer memory devices
US20040243749A1 (en) Quick save system and protocol, monitor program and smart button firmware of the same
CN103019988B (en) Computer, embedded controller and method thereof
EP2183704B1 (en) Memory card changer, method for reading or writing data in memory card changer
CN103309619A (en) NAND Flash memory data storage method
CN101527161B (en) Method for fast programming NAND flash and device thereof
CN111142451A (en) Multi-channel data acquisition method and system
CN205983448U (en) A control chip and solid state hard drives for solid state hard drives

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