CN105785958B - Multi-functional data collector, acquisition system and method based on wisdom factory - Google Patents

Multi-functional data collector, acquisition system and method based on wisdom factory Download PDF

Info

Publication number
CN105785958B
CN105785958B CN201610311330.1A CN201610311330A CN105785958B CN 105785958 B CN105785958 B CN 105785958B CN 201610311330 A CN201610311330 A CN 201610311330A CN 105785958 B CN105785958 B CN 105785958B
Authority
CN
China
Prior art keywords
data
host computer
microcontroller
collector
ethernet
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.)
Active
Application number
CN201610311330.1A
Other languages
Chinese (zh)
Other versions
CN105785958A (en
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.)
Hangzhou Focus Control Technology Co Ltd
Original Assignee
Hangzhou Focus Control Technology Co Ltd
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 Hangzhou Focus Control Technology Co Ltd filed Critical Hangzhou Focus Control Technology Co Ltd
Priority to CN201610311330.1A priority Critical patent/CN105785958B/en
Publication of CN105785958A publication Critical patent/CN105785958A/en
Application granted granted Critical
Publication of CN105785958B publication Critical patent/CN105785958B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/4183Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by data acquisition, e.g. workpiece identification
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/37Measurements
    • G05B2219/37533Real time processing of data acquisition, monitoring
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a kind of Multi-functional data collector based on wisdom factory, acquisition system and method, collector includes microprocessor and the power module, 485 transponder chips, 232 transponder chips, I/O signal change-over circuit and the two Ethernet protocol chip stacks that are connected respectively with microprocessor;485 transponder chips, 232 transponder chips have the interfaces of RS 485, the interfaces of RS 232 respectively, for connecting external equipment and collecting device data;Ethernet protocol chip stack has Ethernet interface, for connecting host computer or other collectors and transmitting data;I/O signal change-over circuit, there is I/O port, for connecting external equipment and gathering signal or equipment is controlled;The collector can be configured to main website or slave station mode, interface flexible, so as to it is more economical, convenient, efficiently will the various equipment in scene with coming on the digital independent of distributed collection point, provide complete and accurate bottom data for the foundation of wisdom factory.

Description

Multi-functional data collector, acquisition system and method based on wisdom factory
Technical field
The invention belongs to industrial Internet of Things communication technique field, more particularly to a kind of distributed multifunctional data acquisition unit, Acquisition system and method.
Background technology
Technology of Internet of things develops rapidly in recent years, and the various products based on Internet of Things application technology emerge in an endless stream, also absurd fantastic Give birth to that species is abundant, Various types of data collector product vdiverse in function.From " industry 4.0 ", " industry internet " and " China's system After making the rise of the concepts such as 2025 ", industrial circle can upload even more there is an urgent need to which the Various types of data such as field apparatus are gathered in real time To the server end on upper strata.But the controller species very abundant of industrial field device at this stage, communication interface type are more Sample, communications protocol are multifarious.
In order to solve the problems, such as the Data Collection of equipment, it is necessary to spend very big energy and cost, and traditional data are adopted Truck can only gather the hard spot signal such as some DI, AI.Industrial this present situation, seriously constrains the development of industrial Internet of Things, hinders " the process of industry 4.0 " is hindered.
The content of the invention
Instant invention overcomes above-mentioned the deficiencies in the prior art, there is provided one kind disclosure satisfy that most industry are existing The data acquisition of field device, and network structure is simple, the multi-functional data that conveniently further can be flexibly coordinated its function Collector, acquisition system and method, so as to it is more economical, convenient, efficiently by the various equipment in scene and the number of distributed collection point According to reading, complete and accurate bottom data is provided for the foundation of wisdom factory.
The technical proposal of the invention is realized in this way:
A kind of Multi-functional data collector based on wisdom factory, including microprocessor and be connected respectively with microprocessor Power module, 485 transponder chips, 232 transponder chips, I/O signal change-over circuit and two Ethernet protocol chip stacks; Power module is used to provide power supply for collector;485 transponder chips, 232 transponder chips respectively have RS-485 interfaces, RS-232 interface, for connecting external equipment and collecting device data;Ethernet protocol chip stack has Ethernet interface, is used for Connection host computer or other collectors simultaneously transmit data;I/O signal change-over circuit, there is I/O port, for connecting external equipment simultaneously Gather signal or equipment is controlled, 485 transponder chips, 232 transponder chips, I/O signal are changed electricity by microprocessor Road, the signal of Ethernet protocol chip stack collection or data are handled and managed.
Preferably, described microprocessor is the STM32F103C8 single-chip microcomputers based on Cortex-M3 kernels.
Preferably, 485 transponder chips are SP3485 chips, 232 transponder chips are SP3232 chips.
Preferably, I/O signal change-over circuit includes being used to gather and controls the simulated measurement input circuit of analog signal, uses In the switching value input circuit of controlling switch amount signal and switching value output circuit for controlling low-power equipment.
Preferably, it is also associated with power isolation module between power module and 485 transponder chips.
Based on the more Function Data Collect System of wisdom factory, including host computer, master device, collected equipment and such as Upper described at least one data acquisition unit, RS-485 interfaces, RS-232 interface are separately configured to lead by host computer Stand or slave station mode;When being configured to slave station mode, master device can be carried out by ModbusRTU agreements to data acquisition unit Read-write operation;When being configured to master station mode, again can by host computer to this be configured to master station mode interface it is logical News agreement is selected, so as to which the collected equipment different from scene is communicated.
Preferably, described master device is PC or PLC.
Based on the acquisition method of above-mentioned more Function Data Collect System, when electric on data acquisition unit, initialized first Processing, after it is stable, the Ethernet protocol chip stack, 485 transponder chips, 232 transponder chips of collector are carried out just Beginningization processing;Then initialization operation is carried out to communications parameter, I/O channel pattern with host computer configuration software, wait to press confirmation by After button, program judges parameter setting success, then configuration terminates;RS-485 interfaces, RS-232 interface by host computer independently Ground is configured to main website or slave station mode;When being configured to master station mode, master station mode is configured to this by host computer The communications protocol of interface is selected, so that data acquisition unit is communicated from live different collected equipment;When with When being set to slave station mode, master device can be written and read operation to data acquisition unit by ModbusRTU agreements, to obtain it The data of collection.
Preferably, when site layout project during multiple data acquisition units, each collector is by Ethernet interface with chrysanthemum The form of chain is connected, and to form distributed data acquisition system, host computer or master device can be assisted by ModbusTCP View, read the data of Ethernet interface.
Preferably, the above method specifically refers to:
One, first, initialization function is called on microcontroller after electricity, to clock, interruption and GPIO, serial ports, timer, Analog-digital converter ADC, it is directly accessed all peripheral resources progress initialization operations of device DMA;
Two, microcontroller calls each hardware initialization function pair Ethernet protocol chip stack, 485 transponder chips, 232 to receive Send out all external hardwares of device chip and carry out initialization operation;
Three, then system enter configuration function, enter according to the parameter write in advance in FLASH flash memory storages area in microcontroller Row initialization serial ports, agreement selection function;Thereafter, each configuration parameter can be entered at any time by host computer configuration software Row modification, modification terminates and after success, data acquisition unit can trigger a warm reset, make microcontroller reset;After reset, micro-control When device processed goes to configuration function, configured good new parameter in FLASH flash memories is loaded into from new, and according to the parameter to related work( It can be initialized;
Host computer configuration software can write configuration parameter in any time that microcontroller is run, and microcontroller receives The configuration of existing hardware resource will not directly be changed during these configuration parameters, but these parameters are write in FLASH flash memories, only Change the configuration parameter in FLASH flash memories;After parameter read-in to be configured is errorless, it is anti-that microcontroller can according to circumstances will be prompted to information Feed host computer, after the completion of waiting the current hot job of microcontroller, then trigger warm reset signal, avoid loss of data etc. existing As occurring;After microcontroller reset, just the configuration parameter in these FLASH flash memories is loaded into, reaches the purpose of parameter configuration;
Communication baud rate of the configuration parameter including serial ports, even-odd check, data bits, stopping digit, agreement selection, according to Corresponding agreement has all selections of master station mode, slave station mode, station address, data address, verification mode;Also include the work of Ethernet Make mode, address, all parameters in port;
Four, host computer configuration software includes collector main program, I/O signal processing routine, I/O channel configurator, serial ports Master-slave swap program, MODBUS RTU slave stations driver, MODBUS RTU main websites driver, Ethernet chip control journey Sequence, MODBUS TCP servers end driver and agreement option program;Serial ports refers to RS-485 interfaces, RS-232 interface;
Collector main program mainly handles various communications, and IO read-write and refreshing;The program of the part is with every 20ms cycle carries out Infinite Cyclic execution;When receiving the parameter configuration order that host computer is sent, serial ports is by parameter read-in Into FLASH flash memories and software reset's microcontroller;To avoid the data that microcontroller normal communication obtains being mistakenly considered The modification parameter information that position machine is sent, the other special heads of difference of appointment data bag are needed between microcontroller and host computer Portion, and pass through the modification of mutual Handshake Protocol completion final data;
Five, MODBUS RTU slave stations driver, MODBUS RTU main websites driver, Ethernet chip control program, MODBUS TCP servers end driver and other communications protocol driver major functions are bottom hardware reading and writing datas Realization and protocol data parsing realization;Wherein certain communication can be called according to configuration of the host computer configuration software to collector Protocol procedure parses to the data of acquisition, obtains correct data and writes corresponding address area;Or, it would be desirable to transmit Data according to setting communications protocol form pack, exported by corresponding communication port;RS-485 interfaces, the RS-232 of bottom Interface and serial ports master-slave swap program, receiving portion is read out using interrupt mode, and is stored data into order caching; Transmitting portion is write data into by the transmission function in collector main program cycle body and sent in data buffer area, then passes through phase The register answered sends data by RS-485 interfaces, RS-232 interface and Ethernet.
And MODBUS RTU slave stations driver, MODBUS RTU main websites driver, the drive of MODBUS TCP servers end Dynamic program and other communications protocol drivers, the different power function of each freedom are formed, and above-mentioned every kind of agreement is all corresponding Some power functions, the data read are parsed and send data in what manner;And the selection of agreement is according to journey Protocol keyword variable in sequence is automatically selected, and the protocol keyword variable variable can be matched somebody with somebody by upper computer software Put, and be saved in FLASH flash memories;In use, according to different protocol keyword variables by RS-485 interfaces, RS-232 interface Main website or slave station mode are separately configured to by host computer;
Six, IO update and signal processing, i.e., I/O signal processing routine is mainly the data collected to I/O channel Processing is filtered, and the data after processing are write into corresponding input variable area;Meanwhile the variable in output variable area is handled After write I/O channel register, by corresponding passage by data output.
It is using the design philosophy and beneficial effect of technical solution of the present invention:
The data acquisition unit of the present invention uses industrially conventional direct current 24V power supplies (supply district can be with 7~35V of DC), Easily it can install on the spot in equipment enclosure at the scene, power supply and installation are quite convenient to.
Using channel multiplexing technology, set by host computer or wire jumper selects, multiple input/output functions can mapped Onto an input and output terminal.The space of PCB can be so saved, product is tried one's best, and it is small to do, so as to save scene Installing space;Meanwhile the data point of industry spot is more dispersed, often the quantity of a local data point is seldom, but respectively The type of individual local data point but may be different, meets multiclass with a type of product with channel multiplexing technology can The digital independent of type, and port number does not have to design a lot, to avoid passage excessively redundancy.
Abundant communication interface, the key of industrial Internet of Things are networkings, and data can go directly upper strata high in the clouds software from bottom.Pin To the rich of field device interface, and field data bus is rich, the present invention be integrated with simultaneously Ethernet interface, RS-485 interfaces and RS-232 interface.
When further applying, by the configuration of host computer, RS-485 interfaces or RS-232 interface can be configured to not The communication port of congenerous.Wherein, RS-485 interfaces, RS-232 interface can be by the configuration softwares built in host computer independently Ground is configured to main website or slave station mode;When being configured to slave station mode, other master devices (such as PC, PLC etc.) can be with Operation is written and read to it by ModbusRTU agreements;, again can be logical to this by host computer when being configured to master station mode The communications protocol of news mouth is selected, so as to which the equipment (such as various PLC etc.) different from scene is communicated.Due to agreement Species is very abundant, it is impossible to all agreements is all integrated into collector, so under many circumstances, the parsing of agreement is also It is to need to realize (such as configuration software, OPC, protocol-driven etc.) by host computer, and the communication interface of field apparatus is In the case of serial ports, RS-485 interfaces, the RS-232 interface of collector can be configured to master station mode, while connect with Ethernet Mouth can be configured to the pattern of serial server, and the data can of such equipment is so existed by real-time performance serial ports transparent transmission The corresponding protocol-driven of upper computer selecting is written and read operation to it.
The data acquisition unit has two embedded Ethernet interfaces, can by another ethernet device of information flow direction, when When now arranging many such collectors, each collector can be connected in the form of daisy chain, facilitate field network Wiring, to form distributed data acquisition system.The equipment such as host computer or PLC can read net by ModbusTCP agreements The data of network port.It is also possible to which miscellaneous equipment is connected on the network interface, the extension of network is conveniently realized.
Configured by host computer, can be with the function of redefining I/O channel and each PORT COM of memorial tablet, so that data are adopted The adaptability of storage is more strengthened, and meets the demand of the data acquisition of various industry spots as much as possible.
Brief description of the drawings
Fig. 1 is the hardware block diagram of data acquisition unit of the present invention;
Fig. 2 is the structured flowchart of acquisition system host computer configuration software of the present invention.
Embodiment
The embodiment of the present invention is as follows:
Reference picture 1, a kind of Multi-functional data collector based on wisdom factory, including microprocessor and respectively with microprocessor Device connected power module, 485 transponder chips, 232 transponder chips, I/O signal change-over circuit and two Ethernet protocols Chip stack;Power module is used to provide power supply for collector;485 transponder chips, 232 transponder chips have RS-485 respectively Interface, RS-232 interface, for connecting external equipment and collecting device data;There is Ethernet protocol chip stack Ethernet to connect Mouthful, for connecting host computer or other collectors and transmitting data;I/O signal change-over circuit, there is I/O port, it is outer for connecting Portion's equipment simultaneously gathers signal or equipment is controlled, and microprocessor believes 485 transponder chips, 232 transponder chips, IO Number change-over circuit, the signal of Ethernet protocol chip stack collection or data are handled and managed;Received and dispatched in power module and 485 Power isolation module is also associated between device chip.
The STM32F103C8 based on Cortex-M3 kernels of microprocessor selection STMicw Electronics single-chip microcomputer.The monolithic Machine uses LQFP encapsulation, has 48 pins, in the case where fully meeting application, is reduced as far as the occupancy of pcb board Space;The RAM memory of flash storage and 20K with 64K, it is sufficient to meet in general communications protocol and data processing Ability;With three universal asynchronous serial interfaces, the RS-485 interface and a RS-232 that can meet the present invention connect The demand of mouth;With two SPI synchronous serial interfaces, operation can be written and read to two Ethernet protocol chip stacks.
Ethernet protocol chip stack uses the W5500 chips of WIZnet companies.The chip is that a devices at full hardware TCP/IP is embedding Enter formula ethernet controller, eased internet connection scheme is provided for embedded system.W5500 is integrated with TCP/IP Protocol stack, 10/100M ethernet data link layers (MAC) and physical layer (PHY).It can not have to collect in single-chip microcomputer with the program Into ICP/IP protocol stack so that the resource of single-chip is significantly discharged, and the performance requirement of single-chip microcomputer is also greatly lowered, Reduce software development difficulty simultaneously.
RS-485 transponder chips select SP3485 chips.The chip is a low-power consumption Half-duplex transceiver, and they are complete The requirement of full up sufficient RS-485 and RS-422 serial protocols.SP3485 chips meet the electric of RS-485/RS-422 serial protocols Specification, message transmission rate may be up to 10Mbps (bringing onto load).Because the application scenario of 485 buses is typically all in industry spot Long range communication, therefore for the protection to collector, it is necessary to design antisurge and power isolation circuit.The chip and 485 connects The circuit of oral area point is powered using insulating power supply device B0505, while interface circuit needs to be resisted using Transient Suppression Diode Surge designs;The serial ports of single-chip microcomputer and control output are connected thereto by optocoupler.
RS-232 transponder chips select SP3232 chips.Transistor-Transistor Logic level is converted to rs-232 standard level by the chip, full Sufficient EIA/TIA-232-F standards, operating voltage directly can be powered with 3.3V.The peripheral circuit of the chip is simple, it is only necessary to several The 0.1uF of individual 0805 encapsulation electric capacity.
Power module uses LM2596-5 switching power source chips, carries out lowering and stabilizing blood pressure to supply voltage, is changed into DC 5V, does For the operating voltage of the circuits such as IO.Meanwhile using linear stabilized power supply AMS1117-3.3 chips, 5V voltages are further changed For 3.3V voltages, carried out to single-chip microcomputer, RS-485 transponder chips, RS-232 transponder chips, Ethernet protocol chip stack etc. Power supply.In addition, RS-485 transponder chips and RS-485 interface circuits are powered with insulating power supply module B0505, logarithm Protected according to collector.
I/O signal change-over circuit includes being used to gather and control the simulated measurement input circuit of analog signal, for controlling switch Measure the switching value input circuit of signal and the switching value output circuit for controlling low-power equipment.
Simulated measurement input circuit can receive 4~20mA, 0~5V, 0~10V signal, it is only necessary to be carried out by short-circuited conducting sleeve Selection.By π type filter circuits, analog quantity is filtered, removes HF noise signal.Meanwhile signal passes through operation amplifier Enter single-chip microcomputer after the signal follower of device composition, the output impedance of signal can so be improved, reduce signal by load (this In load refer to the input pin of single-chip microcomputer, it has equiva lent impedance) influence, improve the reading accuracy of analog quantity.
Switching value input circuit, isolated using high speed photo coupling, protect collector internal structure, while can also receive High-frequency pulse input signal.When input be high-speed pulse signal when, its port can be arranged to by software merit rating The pattern of high-speed pulse, it can so read the code device signal obtained from motor speed for scene.It is this to configure Signalling channel into high-speed pulse input needs to design the timer input for being connected to single-chip microcomputer and flutters and catch pin.So, to the list Piece power traction pin and corresponding timer are configured, you can realize the counting of high-speed pulse.
Switching value output circuit uses relay isolation and amplifier, can directly control the small-powers such as alarm lamp, magnetic valve to set It is standby;The powerful devices such as motor are controlled by contactor simultaneously.By software merit rating, its passage can be configured to PWM Output mode, lighting scene brightness, motor speed etc. are controlled for some specific occasions.This kind of compound mixed passage must The output that some timer must be connected to is compared on terminal.
Collector main program is the core of the whole configuration software of host computer, mainly responsible initialization, configuration processing, mailing address Reason and I O process work;
When electric on collector, the initializing resource processing routine of single-chip microcomputer is initially entered to clock, interruption service, timing Device, serial ports, I/O resource carry out initialization process;After it is stable, Ethernet protocol chip stack, 485 transceivers to collector The all hardware of chip, 232 transponder chips, LED light carries out initialization process;Then program is waited for, and use is upper Machine configuration software carries out initialization operation to communications parameter, I/O channel pattern, and after ACK button is pressed, program judges that parameter is set Work(is set to, then configuration terminates, and lights corresponding LED and represent to set successfully;
Afterwards, into the cyclic part of program, this is the main part of program, is constantly entered according to the cycle time of setting Row Communication processing, IO renewals and I/O signal processing, fault treating procedure.
Specifically, reference picture 2 is explained as follows:
One, first, initialization function is called on microcontroller after electricity, to clock, interruption and GPIO, serial ports, timer, Analog-digital converter ADC, it is directly accessed all peripheral resources progress initialization operations of device DMA;
Two, microcontroller calls each hardware initialization function pair Ethernet protocol chip stack, 485 transponder chips, 232 to receive Send out all external hardwares of device chip and carry out initialization operation;
Three, then system enter configuration function, enter according to the parameter write in advance in FLASH flash memory storages area in microcontroller Row initialization serial ports, agreement selection function;Thereafter, each configuration parameter can be entered at any time by host computer configuration software Row modification, modification terminates and after success, data acquisition unit can trigger a warm reset, make microcontroller reset;After reset, micro-control When device processed goes to configuration function, configured good new parameter in FLASH flash memories is loaded into from new, and according to the parameter to related work( It can be initialized;
Host computer configuration software can write configuration parameter in any time that microcontroller is run, and microcontroller receives The configuration of existing hardware resource will not directly be changed during these configuration parameters, but these parameters are write in FLASH flash memories, only Change the configuration parameter in FLASH flash memories;After parameter read-in to be configured is errorless, it is anti-that microcontroller can according to circumstances will be prompted to information Feed host computer, after the completion of waiting the current hot job of microcontroller, then trigger warm reset signal, avoid loss of data etc. existing As occurring;After microcontroller reset, just the configuration parameter in these FLASH flash memories is loaded into, reaches the purpose of parameter configuration;
Communication baud rate of the configuration parameter including serial ports, even-odd check, data bits, stopping digit, agreement selection, according to Corresponding agreement has all selections of master station mode, slave station mode, station address, data address, verification mode;Also include the work of Ethernet Make mode, address, all parameters in port;
Four, host computer configuration software includes collector main program, I/O signal processing routine, I/O channel configurator, serial ports Master-slave swap program, MODBUS RTU slave stations driver, MODBUS RTU main websites driver, Ethernet chip control journey Sequence, MODBUS TCP servers end driver and agreement option program;Serial ports refers to RS-485 interfaces, RS-232 interface;
Collector main program mainly handles various communications, and IO read-write and refreshing;The program of the part is with every 20ms cycle carries out Infinite Cyclic execution;When receiving the parameter configuration order that host computer is sent, serial ports is by parameter read-in Into FLASH flash memories and software reset's microcontroller;To avoid the data that microcontroller normal communication obtains being mistakenly considered The modification parameter information that position machine is sent, the other special heads of difference of appointment data bag are needed between microcontroller and host computer Portion, and pass through the modification of mutual Handshake Protocol completion final data;
Five, MODBUS RTU slave stations driver, MODBUS RTU main websites driver, Ethernet chip control program, MODBUS TCP servers end driver and other communications protocol driver major functions are bottom hardware reading and writing datas Realization and protocol data parsing realization;Wherein certain communication can be called according to configuration of the host computer configuration software to collector Protocol procedure parses to the data of acquisition, obtains correct data and writes corresponding address area;Or, it would be desirable to transmit Data according to setting communications protocol form pack, exported by corresponding communication port;RS-485 interfaces, the RS-232 of bottom Interface and serial ports master-slave swap program, receiving portion is read out using interrupt mode, and is stored data into order caching; Transmitting portion is write data into by the transmission function in collector main program cycle body and sent in data buffer area, then passes through phase The register answered sends data by RS-485 interfaces, RS-232 interface and Ethernet.
And MODBUS RTU slave stations driver, MODBUS RTU main websites driver, the drive of MODBUS TCP servers end Dynamic program and other communications protocol drivers, the different power function of each freedom are formed, and above-mentioned every kind of agreement is all corresponding Some power functions, the data read are parsed and send data in what manner;And the selection of agreement is according to journey Protocol keyword variable in sequence is automatically selected, and the protocol keyword variable variable can be matched somebody with somebody by upper computer software Put, and be saved in FLASH flash memories;In use, according to different protocol keyword variables by RS-485 interfaces, RS-232 interface Main website or slave station mode are separately configured to by host computer;
Six, IO update and signal processing, i.e., I/O signal processing routine is mainly the data collected to I/O channel Processing is filtered, and the data after processing are write into corresponding input variable area;Meanwhile the variable in output variable area is handled After write I/O channel register, by corresponding passage by data output.
The preferred embodiment of the present invention is only intended to help and illustrates the present invention.It is all that preferred embodiment does not have detailed descriptionthe Details, it is only described embodiment also not limit the invention.Obviously, according to the content of this specification, can make a lot Modifications and variations.This specification is chosen and specifically describes these embodiments, is to preferably explain the principle and reality of the present invention Border is applied, so that skilled artisan can utilize the present invention well.The present invention only by claims and its The limitation of four corner and equivalent.Disclosed above is only several specific embodiments of the application, but the application not limits to In this, the changes that any person skilled in the art can think of, should all fall in the protection domain of the application.

Claims (7)

1. the multifunctional data acquiring method based on wisdom factory, it is characterized in that:Described acquisition method is built upon multi-functional On the basis of data collecting system;Described more Function Data Collect System includes host computer, master device, collected equipment And at least one Multi-functional data collector;Described Multi-functional data collector include microprocessor and respectively with microprocessor Connected power module, 485 transponder chips, 232 transponder chips, I/O signal change-over circuit and two Ethernet protocol stacks Chip;Power module is used to provide power supply for collector;485 transponder chips, 232 transponder chips connect with RS-485 respectively Mouth, RS-232 interface, for connecting external equipment and collecting device data;Ethernet protocol chip stack has Ethernet interface, For connecting host computer or other collectors and transmitting data;I/O signal change-over circuit, there is I/O port, set for connecting outside Standby and gather signal or equipment is controlled, microprocessor turns 485 transponder chips, 232 transponder chips, I/O signal Circuit, the signal of Ethernet protocol chip stack collection or data are changed to be handled and managed;RS-485 interfaces, RS-232 interface lead to Cross host computer and be separately configured to main website or slave station mode;When being configured to slave station mode, master device can pass through ModbusRTU agreements are written and read operation to Multi-functional data collector;, again can be by upper when being configured to master station mode Machine is selected the communications protocol of this interface for being configured to master station mode, so as to the collected equipment different from scene Communicated;
When electric on Multi-functional data collector, gathered data as follows:
One, first, initialization function is called on microcontroller after electricity, to clock, interruption and GPIO, serial ports, timer, modulus Converter ADC, it is directly accessed all peripheral resources progress initialization operations of device DMA;
Two, microcontroller calls each hardware initialization function pair Ethernet protocol chip stack, 485 transponder chips, 232 transceivers The all external hardwares of chip carry out initialization operation;
Three, then system enter configuration function, carried out just according to the parameter write in advance in FLASH flash memory storages area in microcontroller Beginningization serial ports, agreement selection function;Thereafter, each configuration parameter can be repaiied at any time by host computer configuration software Change, modification terminates and after success, Multi-functional data collector can trigger a warm reset, make microcontroller reset;It is micro- after reset When controller goes to configuration function, configured good new parameter in FLASH flash memories is loaded into from new, and according to the parameter to correlation Function is initialized;
Host computer configuration software can write configuration parameter in any time that microcontroller is run, and microcontroller receives these The configuration of existing hardware resource will not directly be changed during configuration parameter, but these parameters are write in FLASH flash memories, only changed Configuration parameter in FLASH flash memories;After parameter read-in to be configured is errorless, microcontroller can according to circumstances will be prompted to feedback of the information to Host computer, after the completion of waiting the current hot job of microcontroller, then warm reset signal is triggered, sent out phenomena such as the loss for avoiding data It is raw;After microcontroller reset, just the configuration parameter in these FLASH flash memories is loaded into, reaches the purpose of parameter configuration;
Communication baud rate of the configuration parameter including serial ports, even-odd check, data bits, stopping digit, agreement selection, according to corresponding Agreement has all selections of master station mode, slave station mode, station address, data address, verification mode;Also include the work side of Ethernet Formula, address, all parameters in port;
Four, host computer configuration software includes collector main program, I/O signal processing routine, I/O channel configurator, serial ports principal and subordinate Changeover program, MODBUSRTU slave stations driver, MODBUSRTU main websites driver, Ethernet chip control program, MODBUSTCP server ends driver and agreement option program;Serial ports refers to RS-485 interfaces, RS-232 interface;
Collector main program mainly handles various communications, and IO read-write and refreshing;The program of the part is with every 20ms's Cycle carries out Infinite Cyclic execution;When receiving the parameter configuration order that host computer is sent, serial ports writes parameters to FLASH In flash memory and software reset's microcontroller;Sent to avoid the data that microcontroller normal communication obtains being mistakenly considered host computer Modification parameter information, the difference others special header of appointment data bag is needed between microcontroller and host computer, and pass through Mutual Handshake Protocol completes the modification of final data;
Five, MODBUSRTU slave station driver, MODBUSRTU main websites driver, Ethernet chip control program, MODBUSTCP server ends driver and other communications protocol driver major functions are bottom hardware reading and writing datas Realize the realization with protocol data parsing;Certain communication association can be wherein called according to configuration of the host computer configuration software to collector The data that agenda ordered pair obtains are parsed, and are obtained correct data and are write corresponding address area;Or, it would be desirable to transmission Data are packed according to the communications protocol form of setting, are exported by corresponding communication port;RS-485 interfaces, the RS-232 of bottom connect Mouth and serial ports master-slave swap program, receiving portion is read out using interrupt mode, and is stored data into order caching;Hair Send part to be write data into by the transmission function in collector main program cycle body to send in data buffer area, then by corresponding Register data are sent by RS-485 interfaces, RS-232 interface and Ethernet;
And MODBUSRTU slave stations driver, MODBUSRTU main websites driver, MODBUSTCP server ends driver with And other communications protocol drivers, the different power function of each freedom are formed, above-mentioned every kind of agreement has all corresponded to some functions Function, the data read are parsed and send data in what manner;And association of the selection of agreement in program View key argument is automatically selected, and the protocol keyword variable variable can be configured by upper computer software, and be protected It is stored in FLASH flash memories;In use, RS-485 interfaces, RS-232 interface passed through according to different protocol keyword variables upper Position machine is separately configured to main website or slave station mode;
Six, IO update and signal processing, i.e., I/O signal processing routine is mainly that the data collected to I/O channel are carried out Filtering process, and the data after processing are write into corresponding input variable area;Meanwhile it will be write after the variable processing in output variable area To I/O channel register, by corresponding passage by data output.
2. acquisition method according to claim 1, it is characterized in that:It is each when site layout project during multiple data acquisition units Collector is connected by Ethernet interface in the form of daisy chain, to form distributed data acquisition system, host computer or Master device by ModbusTCP agreements, can read the data of Ethernet interface.
3. acquisition method according to claim 1, it is characterized in that:Described microprocessor is based on Cortex-M3 kernels STM32F103C8 single-chip microcomputers.
4. acquisition method according to claim 1, it is characterized in that:485 transponder chips are SP3485 chips, and 232 receive and dispatch Device chip is SP3232 chips.
5. acquisition method according to claim 1, it is characterized in that:I/O signal change-over circuit includes being used to gather and control mould Intend the simulated measurement input circuit of signal, the switching value input circuit for controlling switch amount signal and for controlling low-power equipment Switching value output circuit.
6. described acquisition method according to claim 1, it is characterized in that:Power module and 485 transponder chips it Between be also associated with power isolation module.
7. described acquisition method according to claim 1, it is characterized in that:Described master device is that PC or PLC are controlled Device processed.
CN201610311330.1A 2016-05-08 2016-05-08 Multi-functional data collector, acquisition system and method based on wisdom factory Active CN105785958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610311330.1A CN105785958B (en) 2016-05-08 2016-05-08 Multi-functional data collector, acquisition system and method based on wisdom factory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610311330.1A CN105785958B (en) 2016-05-08 2016-05-08 Multi-functional data collector, acquisition system and method based on wisdom factory

Publications (2)

Publication Number Publication Date
CN105785958A CN105785958A (en) 2016-07-20
CN105785958B true CN105785958B (en) 2018-02-13

Family

ID=56402061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610311330.1A Active CN105785958B (en) 2016-05-08 2016-05-08 Multi-functional data collector, acquisition system and method based on wisdom factory

Country Status (1)

Country Link
CN (1) CN105785958B (en)

Families Citing this family (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106200495A (en) * 2016-08-29 2016-12-07 中山英达思迅智能科技有限公司 Multi-point data acquisition device
CN106227111A (en) * 2016-08-31 2016-12-14 大连宝信起重技术有限公司 A kind of crane monitoring data collection equipment
CN106534248A (en) * 2016-09-20 2017-03-22 上海斐讯数据通信技术有限公司 Visual data storage method and system
CN106656773A (en) * 2016-11-16 2017-05-10 珠海格力智能装备有限公司 Communication system and method
CN106681185B (en) * 2016-11-24 2023-07-25 河钢股份有限公司承德分公司 Data acquisition access device
CN107992008B (en) * 2017-03-03 2019-12-13 深圳美云智数科技有限公司 Industrial interconnection equipment and use method thereof
CN106982222A (en) * 2017-04-24 2017-07-25 华南理工大学 The multi-protocol data cut-in method and device that can configure under a kind of industrial 4.0 environment
CN108107770A (en) * 2017-05-23 2018-06-01 深圳市鸿哲智能系统工程有限公司 A kind of power supply comprehensive control management system
CN107220070B (en) * 2017-08-01 2020-09-08 浙江佳乐科仪股份有限公司 DTU data acquisition method for Internet of things
CN107942972A (en) * 2017-11-15 2018-04-20 云南昆钢电子信息科技有限公司 A kind of factory's Integrated Intelligent System and method
CN108400993A (en) * 2018-04-24 2018-08-14 浙江正泰电器股份有限公司 The Internet of things system and storage medium that intelligent industrial apparatus components formula is set up
CN108924042A (en) * 2018-06-14 2018-11-30 芜湖康爱而电气有限公司 The things-internet gateway and implementation method of transparent transmission between a kind of multi-protocols
CN108712447B (en) * 2018-06-27 2024-04-05 金卡智能集团股份有限公司 Data acquisition and analysis board and method suitable for industrial flowmeter
CN110768801B (en) * 2018-07-27 2022-02-11 中国科学院沈阳自动化研究所 Device and method for simulating AGV communication mode
CN110858183A (en) * 2018-08-26 2020-03-03 上海灿态信息技术有限公司 2-in 1-out RS-232/RS-485 self-adaptive module and method
CN109510759B (en) * 2018-10-22 2021-08-06 智强通达科技(北京)有限公司 System and method for realizing rapid universal multi-protocol gateway
CN109802943B (en) * 2018-12-18 2021-08-10 武汉华工赛百数据系统有限公司 Data acquisition device
CN109714336A (en) * 2018-12-26 2019-05-03 吴海蒙 A kind of embedded MODBUS protocol stack suitable for more communication between devices
EP3720124A1 (en) * 2019-04-05 2020-10-07 ZKW Group GmbH Motor vehicle headlamp
CN110069430B (en) * 2019-04-19 2022-07-15 成都飞机工业(集团)有限责任公司 Data acquisition system of chrysanthemum chain structure and self-adaptive transmission method
CN110445656B (en) * 2019-08-13 2022-03-29 中核控制系统工程有限公司 Nuclear power plant DCS platform transparent transmission network data full life cycle generation method
CN110727846A (en) * 2019-09-09 2020-01-24 杭州玖欣物联科技有限公司 Industrial Internet data acquisition and classification processing method
CN110825684A (en) * 2019-11-15 2020-02-21 广州健飞通信有限公司 Serial port interface integrated output system
CN111683310B (en) * 2020-06-04 2022-06-07 天津电气科学研究院有限公司 Networking type data acquisition and analysis system and method
CN112003856B (en) * 2020-08-20 2023-01-10 珠海罗博飞海洋科技有限公司 Transceiving system for mutual conversion of signals with different protocols
CN112505246B (en) * 2020-11-11 2023-05-02 山西科致成科技有限公司 Digital mining gas sensor calibration and verification device and method
CN114168500A (en) * 2021-12-01 2022-03-11 武汉港迪技术股份有限公司 System-free single chip microcomputer multi-interface extension method
CN114740796B (en) * 2022-04-26 2023-09-12 傲拓科技股份有限公司 Large-scale PLC system with distributed processor
CN115941717B (en) * 2022-10-10 2024-04-19 浙江南都能源科技有限公司 Method and system for data acquisition and transmission of energy storage power station

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1830179A (en) * 2003-08-06 2006-09-06 松下电器产业株式会社 Terminal device and method for master-slave handover in media access communication system
CN202257553U (en) * 2011-04-08 2012-05-30 昆明华奥航星电气有限公司 Protocol converter for converting universal serial port to MODBUS
CN103647801A (en) * 2013-11-18 2014-03-19 东莞理工学院 Data collector applied to real-time quality monitoring at traditional industrial site
CN104239263A (en) * 2014-06-20 2014-12-24 上海电力学院 Embedded type data collection terminal
CN205563260U (en) * 2016-05-08 2016-09-07 杭州集控软件有限公司 Multi -functional data collection station and collection system based on wisdom mill

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060129347A1 (en) * 2004-12-10 2006-06-15 The Regents Of The University Of Californica Generic transducer interface

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1830179A (en) * 2003-08-06 2006-09-06 松下电器产业株式会社 Terminal device and method for master-slave handover in media access communication system
CN202257553U (en) * 2011-04-08 2012-05-30 昆明华奥航星电气有限公司 Protocol converter for converting universal serial port to MODBUS
CN103647801A (en) * 2013-11-18 2014-03-19 东莞理工学院 Data collector applied to real-time quality monitoring at traditional industrial site
CN104239263A (en) * 2014-06-20 2014-12-24 上海电力学院 Embedded type data collection terminal
CN205563260U (en) * 2016-05-08 2016-09-07 杭州集控软件有限公司 Multi -functional data collection station and collection system based on wisdom mill

Also Published As

Publication number Publication date
CN105785958A (en) 2016-07-20

Similar Documents

Publication Publication Date Title
CN105785958B (en) Multi-functional data collector, acquisition system and method based on wisdom factory
CN205563260U (en) Multi -functional data collection station and collection system based on wisdom mill
CN102710478B (en) Integration slave node device of Profibus-DP (profibus-data processing) and Modbus
CN104698923B (en) EMUs supplementary controlled system
CN206711574U (en) Displaying screen controller and display screen control system
CN1921329A (en) Power cord chopped wave communication transmitting-receiving circuit
CN209201095U (en) A kind of accessing wirelessly access device
CN112882420B (en) Universal IO-Link slave station system
CN107918325A (en) Multi-channel analog acquisition card
CN103560938A (en) Industrial Ethernet and HART bus protocol conversion board card
CN106657115A (en) Frequency converter control system and protocol conversion card thereof
CN202713373U (en) Multi-protocol converter
CN210129874U (en) Multi-protocol Internet of things gateway equipment based on FPGA
CN209627391U (en) Dual redundant formula RS485-CAN communication board
CN207926639U (en) A kind of elevator protocol conversion apparatus and elevator Internet of things system
CN207623729U (en) Multi-channel analog acquisition card
CN202918326U (en) Intelligent multi-serial switch
CN110266503A (en) A kind of embedded industrial control terminal of double network interfaces for supporting POE to power
CN206726210U (en) The expansion interface circuit of the one-to-many universal serial bus of near-end
CN207010837U (en) A kind of intelligence divides householder's machine and visible dialogue system
CN206135939U (en) Serial ports that is used for electric wire netting skill training ethernet conversion equipment
CN103176435B (en) Realize the interface arrangement and method of dcs and measuring apparatus interconnection
CN213122967U (en) RS485 signal sharing device
CN209118101U (en) Multiplex roles isomery Internet of things access equipment
CN203563088U (en) Protocol conversion board of industrial Ethernet and HART bus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 311199, room 3, building 101, 908 street, Nanyuan street, Yuhang District, Hangzhou, Zhejiang

Applicant after: HANGZHOU JIKON TECHNOLOGY CO.,LTD.

Address before: 310000, Zhejiang, Gongshu District, 88 Cheung Road, Hangzhou, China Information Industry Park, 2, No. 3, building 9, building

Applicant before: HANGZHOU JIKON SOFTWARE CO.,LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A multifunctional data collector, collection system, and method based on smart factories

Effective date of registration: 20231214

Granted publication date: 20180213

Pledgee: Bank of Hangzhou Limited by Share Ltd. science and Technology Branch

Pledgor: HANGZHOU JIKON TECHNOLOGY CO.,LTD.

Registration number: Y2023980071310

PE01 Entry into force of the registration of the contract for pledge of patent right