CN102566484A - Multifunctional analog quantity acquisition module and information transmission method thereof - Google Patents
Multifunctional analog quantity acquisition module and information transmission method thereof Download PDFInfo
- Publication number
- CN102566484A CN102566484A CN2011104192308A CN201110419230A CN102566484A CN 102566484 A CN102566484 A CN 102566484A CN 2011104192308 A CN2011104192308 A CN 2011104192308A CN 201110419230 A CN201110419230 A CN 201110419230A CN 102566484 A CN102566484 A CN 102566484A
- Authority
- CN
- China
- Prior art keywords
- data
- plc
- high speed
- collection module
- signal
- 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
Images
Landscapes
- Communication Control (AREA)
Abstract
The invention discloses a multifunctional analog quantity acquisition module, which comprises two high speed output interfaces, namely a first high speed output interface and a second high speed output interface, wherein the first high speed output interface sends a clock signal to a first high speed input interface of a programmable logic controller (PLC) body through a communication-clock line; and the second high speed output interface sends a data signal to a second high speed input interface of the PLC body through a communication-data line. The invention also discloses an information transmission method for the multifunctional analog quantity acquisition module. Even an analog/digital (A/D) conversion module produced by a PLC manufacturer is not used, data can be transmitted based on an RS485 bus and a standard MODBUS-RTU protocol, and the data can be transmitted through the high speed output interfaces arranged in an analog quantity module according to a specific communication protocol.
Description
Technical field
The present invention relates to a kind of multi-functional analogue collection module, be suitable for Programmable Logic Controller (PLC) automatic control system and use, belong to the industrial automation field.
Background technology
At present, Programmable Logic Controller (PLC) control system has been widely used in industry-by-industries such as iron and steel, oil, chemical industry, electric power, building materials, air-conditioning, machine-building, automobile, light textile, communications and transportation, environmental protection and entertainment at home and abroad.
Wherein, in industrial trade is used, many continually varying amounts being arranged, all is analog quantity like temperature, pressure, flow, liquid level and speed etc.In order to make Programmable Logic Controller treatment of simulated amount, must realize the A/D conversion between analog quantity (Analog) and the digital quantity (Digital).
PLC makes the commercial city and produces supporting A/D modular converter (being analogue collection module), through internal data bus between PLC and the modular converter, the data of A/D modular converter collection is sent to PLC, makes PLC realize analog acquisition.But the A/D modular converter cost supporting owing to PLC manufacturer is very high, near the cost of PLC body, therefore uses and receives very big restriction basically.
Summary of the invention
Technical matters to be solved by this invention is the defective to background technology, proposes a kind of multi-functional analogue collection module, is suitable for Programmable Logic Controller (PLC) automatic control system and uses.
The present invention adopts following technical scheme for solving the problems of the technologies described above:
A kind of multi-functional analogue collection module; Be used for the analog signals of gathering is sent to the PLC body; Said analogue collection module and PLC body adopt same DC current input, and said analogue collection module comprises two high speed output interfaces: the first high speed output interface, the second high speed output interface; Wherein, the said first high speed output interface is through the first high speed input interface of communication-clock line tranmitting data register signal to the PLC body, and the said second high speed output interface sends the second high speed input interface that data-signal is given the PLC body through communication-data line.
Further, as the prioritization scheme of a kind of multi-functional analogue collection module of the present invention, also comprise the RS485 EBI, said RS485 EBI adopts the MODBUS-RTU agreement to send data to the PLC body.
The present invention also provides a kind of information transferring method based on multi-functional analogue collection module, may further comprise the steps:
Steps A adopts the first high speed output interface of analogue collection module to send a clock signal to PLC; Simultaneously, adopt the second high speed output interface of analogue collection module to send a data-signal to PLC, said data-signal is made up of the data of channel address and this channel address institute respective channel;
Step B, PLC carry out the external interrupt step after receiving clock signal, in the value of the clock signal readout data signal in break period that produces;
Step C, analogue collection module send to PLC with same data-signal once more, in order to the PLC verification;
Step D; The PLC body is carried out regularly interrupt step immediately after receiving the said same data-signal of step C; In the time of regularly interrupting, the data-signal that receives for said twice is carried out verification, use logical operation to obtain the channel data of channel address and correspondence thereof packet through verification.
Further; Prioritization scheme as the information transferring method of a kind of multi-functional analogue collection module of the present invention; The packet of each passage needs certain hour at interval when transmission in the said data-signal of step D, and the time of regularly interrupting is less than the time interval of each channel data bag transmission.
The present invention adopts above technical scheme compared with prior art, has following technique effect:
The present invention does not use PLC manufacturer to produce supporting A/D modular converter (being analogue collection module); The present invention both can adopt based on RS485 bus and standard MODBUS-RTU protocol mode and transmit data; Can transmit data according to specific communications protocol through the built-in high speed output interface of analog module again, specific as follows:
1. pass through 485 communication modes between analogue collection module and the PLC, carry out data upload according to the MODBUS-RTU agreement;
2. carry out communication through the high speed output interface between analogue collection module and the PLC, PLC receives data through built-in high speed input interface, thereby realizes the collection of PLC to analog data.
Description of drawings
Fig. 1 is the analogue collection module that adopts 485 communications.
Fig. 2 is the supporting module amount module that provides of PLC manufacturer.
Fig. 3 is a multi-functional analogue collection module of the present invention.
Label is explained among the figure: the input of 1-DC current; 2-communication-clock line; 3-communication-data line; The 4-PLC body; The 5-analogue collection module; 6-PLC terminal RS 485 communication port; The 7-first high speed input interface; The 8-second high speed input interface; The 9-first high speed output interface; The 10-second high speed output interface; 11-analogue collection module terminal RS 485 communication port; The 12-internal data bus.
Embodiment
Below in conjunction with accompanying drawing technical scheme of the present invention is done further detailed description:
As shown in Figure 1; Be the existing analogue collection module that adopts 485 communications; Wherein the analog data that collects of analogue collection module 5 sends PLC body 4 through RS485 communication port 11 to according to standard MODBUS-RTU agreement; PLC body 4 receives analog data through RS485 communication port 6 according to standard MODBUS-RTU agreement, thus the collection that PLC body 4 is realized analog quantity.
As shown in Figure 2; The module amount module that provides for PLC manufacturer is supporting; Wherein the analog data that collects of analogue collection module 5 is given PLC body 4 through PLC internal data bus 12; PLC body 4 receives analog data through internal data bus 12, thus the collection that PLC body 4 is realized analog quantity.Analogue collection module needs to provide by PLC manufacturer is supporting in this case, and cost is very high.
As shown in Figure 3; Analogue collection module 5 of the present invention sends to PLC body 4 through two high speed output interfaces with the analog signals of gathering; Its high speed output interface 9 is given PLC body 4 through communication-clock line 2 tranmitting data register signals, and high speed output interface 10 sends data-signal through communication-data line 3 and gives PLC body 4; PLC body 4 receives data-signal through through high speed input interface 7 receive clock signals through high speed input interface 8; Analogue collection module 5 adopts same DC current input 1 with PLC body 4, and RS485 communication port 6 is unsettled, still can be used for the networking control with miscellaneous equipment.
The analogue collection module that the present invention relates to; Two high speed output interfaces of configuration in its hardware circuit; High speed output interface switching frequency is not less than 1khz; Because PLC body 4 all carries the high speed input interface, its switching frequency is not less than 1khz, so PLC body 4 can receive the high speed signal that sends from analogue collection module 5.In the time of clock signal of analogue collection module 5 every transmissions, send the one digit number number of it is believed that to PLC body 4; When PLC body 4 is whenever received a clock signal, receive the one digit number number of it is believed that; Thereby realize that analogue collection module 5 transmits to the data of PLC body 4.Each packet that analogue collection module 5 sends to PLC body 4 includes data (the routine temperature value of channel address and respective channel thereof; Force value etc.); In PLC body 4, the data that receive are resolved through plug-in; Can obtain required channel data, the method for its parsing needs to be confirmed by the data packet format that analogue collection module sends, and needs certain hour at interval between the data packet transmission of each passage.
When analogue collection module is gathered multi-channel data information; Gather 24 tunnels analogy amount data such as an analogue collection module; Then in analogue collection module stack 24 tunnel address informations in the data message that the PLC body sends, distinguish corresponding 0B00000~0B10111, PLC is through resolving the address information that receives; Make this physical efficiency of PLC discern 24 tunnels analogy amount data, thereby realize the collection of multichannel analog amount data.
Be uploaded to the data message of PLC for correct, reliable analytic simulation amount acquisition module; PLC need write a special reception program, and this reception program comprises receiver module (external interrupt) and parsing module (regularly interrupting), and receiver module mainly is responsible for the value of readout data signal in the clock signal that analogue collection module produces to PLC is interrupted; Because a complete packet comprises the data of channel address and respective channel thereof; 24 tunnel channel address is 5 bits, if channel data is decided to be 16 integer data approximately, then the figure place of a complete packet should be 21; If further the appointment data packet format is first channel address; Back channel data, then preceding 5 of PLC gained is exactly a channel address, and back 16 is exactly the respective channel data; Analogue collection module 5 need upload twice to same packet, in order to the parsing module verification.
Consider that PLC body 4 and analogue collection module 5 are owing to reasons such as the sequencings that powers on; Can not guarantee that 4 starts of PLC body promptly receive first bit data of analogue collection module 5; It is first bit data of channel address; The event design is accomplished in the timing of PLC body 4 is interrupted receiving the parsing of data, and PLC body 4 is opening timing interruption immediately after receiving twice same packet (42).In regularly interrupting to receive to such an extent that packet carries out verification, use logical operation just can obtain channel address and channel data thereof to packet through verification.
It should be noted that the time of regularly interrupting should be less than the time interval of each channel data bag transmission.Below illustrate; Suppose that each data transmission period is set to 1ms; Interval 10ms between each packet (transmitting twice) regularly interrupts being set to 6ms, can know that then it is 42ms that 21 bit data bags transmit twice time; Further hypothesis PLC body 4 powers on when analogue collection module 5 transmits the 7th, and then PLC can obtain the proper data bag through 6 secondary data verifications judgement.Through facts have proved, no matter when PLC powers on, all can obtain proper data information fast through data check repeatedly.
Analogue collection module of the present invention, the communication port of 1 DB9 form of configuration in its hardware circuit, communication baud rate is supported 4.8kbps, and two kinds of 9.6kbps carry 32 geocodings, and the RTU data are found preface:
Beginning | The address | Function | Data | Verification | Stop |
T1-T2-T3-T4 | 8 B position S | 8 B position S | N * 8 B position S | 16B position S | T1-T2-T3T-4 |
About MODBUS-RTU agreement communication mode:
1.5.1 RTU frame
Beginning | The address | Function | Data | Verification | Stop |
T1-T2-T3-T4 | 8 B position S | 8 B position S | N * 8 B position S | 16B position S | T1-T2-T3T-4 |
1.5.2 reading line, 03 (03 Hex) keep register (reading 1-16 bit port AD data)
Annotate: during the work of slave module, constantly image data, and real-time update guarantees the real-time of data in keeping register.
Illustrate: the host query information specifies register start address that will read and the quantity of register, the register addressing start address is 0000, the pairing address of register 1-16 is respectively 0-15.
Nslookup | (Hex) for | RTU | 8 bit fields |
Slave addresses | 06 | 0000 0110 | |
Function | 03 | 0000 0011 | |
The beginning high address | 00 | 0000 0000 | |
The beginning low address | 01 | 0000 0001 | |
Register is high-order | 00 | 0000 0000 | |
The register low level | 03 | 0000 0011 | |
Error-checking Trailer | Total byte: | CRC (16) |
Register data in the slave response message is a binary data, respectively corresponding 2 bytes of each register, and first byte is the high-value data, second byte is low data.
Case is explained orally: read 1~3 channel data:
Main frame sends 06 (slave addresses) 03 (function code) 00 00 (originating register address) 00 03 (needing the read register number) C5 CD (CRC);
Slave returns 01 (address) 03 (function code) 06 (data word joint number), 02 2B 00 00 00 63 (data) A1,12 (CRC).
1.5.3 a plurality of registers of 16 (10 Hex) pre-values (DA numerical value is set)
Attention: main frame can only be to DA register 16 assignment, please don't be to register 0~15 assignment.
Illustrate:
The host query main frame sends 01 (slave addresses) 10 function codes 00 10 (DA register address), 00 01 (register numbers) 02 (data word joint number), 03 E8 (DA parameter 1-4000 integer) A6 11 (CRC).
Response: normal response is returned slave addresses, function code and start address and pre-register number.
Example: return response by search request
The response domain name | (Hex) for | RTU | 8 bit fields |
Slave addresses | 01 | 0000 0001 | |
|
10 | 0001 0000 | |
The beginning high address | 00 | 0000 0000 | |
The beginning |
10 | 0001 0000 | |
Register is high-order | 00 | 0000 0000 | |
The register low level | 01 | 0000 0001 | |
Error-checking (LRC or CRC) | CRC(16Bits) | CRC(16bits) |
1.6 the function code that controller is supported
Code | Title |
03 | Read line and keep register |
16 | Preset a plurality of registers |
1.7 the undesired function code that controller is supported
Code | Title | Implication |
01 | Illegal function code | Slave receives is a kind ofly can not carry out function code, send querying command after, the no program function of this code indication. |
02 | Illegal data address | The data address that receives is the unallowed address of slave. |
03 | Illegal data | The value in data query district is the unallowed value of slave. |
The present invention both can adopt based on RS485 bus and standard MODBUS-RTU protocol mode and transmit data, can transmit data according to specific communications protocol through the built-in high speed output interface of analog module again, had two-fold advantage.
Claims (3)
1. multi-functional analogue collection module; Be used for the analog signals of gathering is sent to the PLC body; Said analogue collection module and PLC body adopt same DC current input, and it is characterized in that: said analogue collection module comprises two high speed output interfaces: the first high speed output interface, the second high speed output interface; Wherein, the said first high speed output interface is through the first high speed input interface of communication-clock line tranmitting data register signal to the PLC body, and the said second high speed output interface sends the second high speed input interface that data-signal is given the PLC body through communication-data line;
Said analogue collection module also comprises the RS485 EBI, and said RS485 EBI adopts the MODBUS-RTU agreement to send data to the PLC body.
2. the information transferring method based on the described a kind of multi-functional analogue collection module of claim 1 is characterized in that, may further comprise the steps:
Steps A adopts the first high speed output interface of analogue collection module to send a clock signal to PLC; Simultaneously, adopt the second high speed output interface of analogue collection module to send a data-signal to PLC, said data-signal is made up of the data of channel address and this channel address institute respective channel;
Step B, PLC carry out the external interrupt step after receiving clock signal, in the value of the clock signal readout data signal in break period that produces;
Step C, analogue collection module send to PLC with same data-signal once more, in order to the PLC verification;
Step D; The PLC body is carried out regularly interrupt step immediately after receiving the said same data-signal of step C; In the time of regularly interrupting, the data-signal that receives for said twice is carried out verification, use logical operation to obtain the channel data of channel address and correspondence thereof packet through verification.
3. the information transferring method of a kind of multi-functional analogue collection module according to claim 2; It is characterized in that: the packet of each passage needs certain hour at interval when transmission in the said data-signal of step D, and the time of regularly interrupting is less than the time interval of each channel data bag transmission.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104192308A CN102566484A (en) | 2011-12-15 | 2011-12-15 | Multifunctional analog quantity acquisition module and information transmission method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104192308A CN102566484A (en) | 2011-12-15 | 2011-12-15 | Multifunctional analog quantity acquisition module and information transmission method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102566484A true CN102566484A (en) | 2012-07-11 |
Family
ID=46412131
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011104192308A Pending CN102566484A (en) | 2011-12-15 | 2011-12-15 | Multifunctional analog quantity acquisition module and information transmission method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102566484A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106249689A (en) * | 2016-09-19 | 2016-12-21 | 东北大学 | A kind of based on the electric melting magnesium furnace data collecting system being wirelessly transferred and method |
CN109391637A (en) * | 2016-12-29 | 2019-02-26 | 海天塑机集团有限公司 | A kind of means of communication of injection molding machine and feeding system |
CN111579115A (en) * | 2020-05-20 | 2020-08-25 | 西安和其光电科技股份有限公司 | Temperature data acquisition and early warning system and method based on fluorescent optical fiber thermometer |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0778007A (en) * | 1993-06-30 | 1995-03-20 | Mitsubishi Electric Corp | Analog signal processor for programmable controller |
CN2785003Y (en) * | 2004-11-30 | 2006-05-31 | 株洲时代电子技术有限公司 | Simulating amount collecting equipment |
CN201532564U (en) * | 2009-11-13 | 2010-07-21 | 无锡科思电子科技有限公司 | Analog value collecting block for automatic control system of programmable controller PLC |
KR20100125719A (en) * | 2009-05-21 | 2010-12-01 | 엘에스산전 주식회사 | Analog output module |
CN101968639A (en) * | 2010-11-02 | 2011-02-09 | 上海电器科学研究院 | Analog quantity acquisition module for programmable logic controller (PLC) extension |
-
2011
- 2011-12-15 CN CN2011104192308A patent/CN102566484A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0778007A (en) * | 1993-06-30 | 1995-03-20 | Mitsubishi Electric Corp | Analog signal processor for programmable controller |
CN2785003Y (en) * | 2004-11-30 | 2006-05-31 | 株洲时代电子技术有限公司 | Simulating amount collecting equipment |
KR20100125719A (en) * | 2009-05-21 | 2010-12-01 | 엘에스산전 주식회사 | Analog output module |
CN201532564U (en) * | 2009-11-13 | 2010-07-21 | 无锡科思电子科技有限公司 | Analog value collecting block for automatic control system of programmable controller PLC |
CN101968639A (en) * | 2010-11-02 | 2011-02-09 | 上海电器科学研究院 | Analog quantity acquisition module for programmable logic controller (PLC) extension |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106249689A (en) * | 2016-09-19 | 2016-12-21 | 东北大学 | A kind of based on the electric melting magnesium furnace data collecting system being wirelessly transferred and method |
CN109391637A (en) * | 2016-12-29 | 2019-02-26 | 海天塑机集团有限公司 | A kind of means of communication of injection molding machine and feeding system |
CN109391637B (en) * | 2016-12-29 | 2021-03-26 | 海天塑机集团有限公司 | Communication method of injection molding machine and feeding system |
CN111579115A (en) * | 2020-05-20 | 2020-08-25 | 西安和其光电科技股份有限公司 | Temperature data acquisition and early warning system and method based on fluorescent optical fiber thermometer |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101841542B (en) | Method for realizing PROFIBUS master station communication protocol based on FPGA (Field Programmable Gate Array) technology | |
CN101950175B (en) | Implementation method of high-speed fieldbus based on industrial Ethernet | |
CN104486012B (en) | A kind of environmental frequencies detection and automatic frequency-hopping system and method | |
CN102387573A (en) | Electronic device and data transmission method of the same | |
CN201957057U (en) | Distributed remote I/O (input/output) unit | |
CN103973643A (en) | Intelligent protocol converter | |
CN102053935A (en) | MODBUS serial communication protocol-based communication method | |
CN103778772B (en) | Framing and interconnection transmitting method in electricity utilization information collecting system | |
CN202190284U (en) | Protocol converter for CAN bus and SpaceWire bus | |
CN102566484A (en) | Multifunctional analog quantity acquisition module and information transmission method thereof | |
CN204695077U (en) | A kind of valve long distance control system based on PLC | |
CN102130857A (en) | Gateway for realizing Internet communication between EtherCAT (Ethernet for Control Automation Technology) industrial Ethernet and WorldFIP (Factory Instrumentation Protocol) field bus and realization method thereof | |
CN202362638U (en) | Multifunctional analog quantity acquisition module | |
CN103248547A (en) | Fast data capture method for slave station in Modbus RTU (remote terminal unit) and slave station | |
CN116566762B (en) | Cascading equipment based on Modbus-RTU protocol and application method thereof | |
CN104977894A (en) | CC-LINK network architecture, remote device station and gateway | |
CN105472782A (en) | Wireless communication terminal | |
CN101377667B (en) | Method and device for adjusting parameter of programmable device | |
CN201532564U (en) | Analog value collecting block for automatic control system of programmable controller PLC | |
CN205249496U (en) | Wireless communication terminal | |
CN105357093B (en) | A kind of bus termination equipment communication protocol automatic identification conversion equipment and control method | |
CN101577643B (en) | Data conversion method for test system and related data conversion device | |
CN102087509B (en) | Integrated circuit and control method thereof | |
CN103001839B (en) | Study order is with the system of automatic configuration setting, gateway and method thereof | |
CN201312299Y (en) | Universal wireless remote control switch |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120711 |