CN102354175A - Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor - Google Patents

Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor Download PDF

Info

Publication number
CN102354175A
CN102354175A CN2011102165950A CN201110216595A CN102354175A CN 102354175 A CN102354175 A CN 102354175A CN 2011102165950 A CN2011102165950 A CN 2011102165950A CN 201110216595 A CN201110216595 A CN 201110216595A CN 102354175 A CN102354175 A CN 102354175A
Authority
CN
China
Prior art keywords
message
slave station
modbus
data
main website
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.)
Granted
Application number
CN2011102165950A
Other languages
Chinese (zh)
Other versions
CN102354175B (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.)
Beijing Xinghe Ruibote Automation Technology Co Ltd
Original Assignee
Beijing Xinghe Ruibote Automation 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 Beijing Xinghe Ruibote Automation Technology Co Ltd filed Critical Beijing Xinghe Ruibote Automation Technology Co Ltd
Priority to CN201110216595.0A priority Critical patent/CN102354175B/en
Publication of CN102354175A publication Critical patent/CN102354175A/en
Application granted granted Critical
Publication of CN102354175B publication Critical patent/CN102354175B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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]

Abstract

The invention discloses a remote I/O (input/output) control system of a Modbus fieldbus DI-16-route monitor, which is characterized in that a process of carrying out message transmission (which is implemented by using a fieldbus in an RTU (remote terminal unit) mode of a Modbus master/slave station protocol) between a master station and a slave station comprises the following steps of: sending a request message frame by a master station (6) U0; reading the request message frame by terminals J1 and U3, a transceiver drive communication circuit (5), a transceiver message control circuit (4) and a slave station (3) U1; acquiring on-off data by a subprogram of the U1; sending response message frames by the terminal J1, an on-off acquisition circuit (1), a photoncoupled isolating circuit (2) and the slave station (3) U1; and reading the response message frames by the transceiver message control circuit (4), the transceiver drive communication circuit (5), the terminal J1 and the master station (6) U0. The DI-16-route monitor is a slave station product for filed on-off acquisition, and provided with a PLC (programmable logical controller) product which is in a structure of integrating a power supply (with a visual diagnosis function and an anti-electromagnetic interference capability), a CPU (central processing unit) and I/O nodes, and compact in appearance, and easy to install, wiring and debug.

Description

Modbus fieldbus DI-16 road monitor remote I/O control system
Technical field:
Modbus fieldbus DI-16 of the present invention road monitor remote I/O control system belongs to field bus technique and Programmable Logic Controller PLC technology; The Modbus Field Bus Control Technology that belongs to the fieldbus and the PLC system integration especially.
Background technology:
The background technology branch of Modbus fieldbus DI-16 road monitor remote I/O control system is chatted as follows:
1, the Modbus communication technology: based on standard GB/T19582.2-2008 is the foundation of this Modbus field bus system communication protocol design of hardware and software of establishment about " the industrial automation network standard of Modbus agreement ".This standard is carried out 1 Physical layer of ISO (International Standards Organization) ISO model, 2 serial link layers, the Modbus agreement of 7 application layers.Serial link protocol is a MS master-slave agreement, and system has a host node main website to send request command to slave station, and processing response.Carry out national GB technical standard standard research and development Modbus field bus communication systems technology, product with independent intellectual property right.
2, PLC control technology: DI-16 road monitor is the concrete application of PLC technology; PLC is a Programmable Logic Controller, and as far back as the IEC61131-1 of International Electrotechnical Commission Programmable Logic Controller latest definition in 1992: " Programmable Logic Controller was a kind of can directly under industrial environment, the application and the digital remote-operated electronic installation of design.Control various types of machineries or production run ".PLC is core with the microprocessor CPU; Have switching value DI, DO, analog quantity AI, AO; Pulsed quantity PI; Numeration at a high speed; The various I/O functional blocks of flexible function such as quick response, and digital operation, judgment processing; Process control, control practical and reliable industrial control devices able to programme such as PID analog quantity closed-loop control.User oriented, towards the PLC of control procedure, obtained using widely in the industrial automation field.Particularly PLC and field bus control system seamlessly integratedly have more on-the-spot decentralised control reliability height, advantages of small volume, the irreplaceable advantage of other electronic product such as are easy to install, cost is low, easy and simple to handle.
3, Modbus Field Bus Control Technology:
The Modbus field bus control system is that main website (major node) is connected as bus with Shielded Twisted Pair with the monitor that slave station (branch node) has the PLC function, carries out Modbus communication protocol, the field bus control system of composition.Be also referred to as the network system of major node and a plurality of minutes nodes.It is computer technology, and PLC technology and the communication technology three big technology are carried out the system integration, have given full play to the field bus technique advantage, become the peak of current industrial control field the 5th generation control technology.Promptly being called FCS (Fieldbus Control System). digital standard-sized sheet is put the field bus control system of full dispersion.
Field Bus Control Technology better solves " five change " technical matters
1) digitizing is the digital data collection, digital computation, digital conversion, the digitized processing of links such as digital message communication.
2) networking realize major node and each minute node networked system.
3) solved the Communication Control Technology of bottomization between host computer main website and the equipment bottom equipment.
4) distributed control better solves the decentralized control problem of local slave station through the PLC monitor of substation.
5) solved the DOMESTICATION PROBLEM that this patent software and hardware technology of declaring has independent intellectual property right owing to use the Modbus GB of country standard.
Fieldbus makes robot control system(RCS) and field apparatus have communication capacity and decentralised control ability, and they are connected into the ranks that network system joins Information Network.It is very practical that fieldbus is had in practical application; Very economical; Very reliable practical function; Fieldbus successively released from 1994 the U.S. FF, Germany fieldbus such as Profibus so far; The field bus technique high speed development; Popularize in an all-round way to use, the welcome that obtains the user convincingly demonstrates: field bus technique is said that becoming is that beginning of a control technology New Times is not excessive.
Field Bus Control Technology has its outstanding advantage; But the problem that in practicality, occurs is also very serious: can be connected in series 247 points and system is not up to standard can't to be used considerably beyond automatic technology condition regulation the data response time for a long time when string point like field bus control system slave station on serial link; Do not come on system's communication data in service, promptly host computer can not receive field data and " unsure certificate " " deadlock " even communication chip burns out, system can not move serious consequence occur; The advantage of field bus control system is dispersed; Slave station PLC is placed on away from the field apparatus of main station monitoring chamber or near near especially being placed on the high-pressure electric control cabinet; Though outside the regulation command range, also possibly occur strange number, big number, wrong number; Solve anti-electromagnetic interference (EMI) and be still a problem, balancing twisted-pair line D0, D1, RS485 interface A+B-point are used common port simultaneously, the shielding layer grounding technical finesse is most important to system's reliability service.
Because Modbus-RTU digital data communication transmission system is to adopt tens ohm of low-voltage (3-5 volt) Low ESRs; The base band transmission mode of the homemade RVVP Shielded Twisted Pair of half-duplex; Antijamming capability under the forceful electric power environment a little less than; Be prone to " deadlock " or system's irregular operating, for head it off native system design of hardware and software is taked following measure:
1, takes ground wire, zero line safeguard measure; Be that ground wire will be carried out GB/T standard ground insulation resistance less than 4 ohm ground wire; Zero line, A+B-point that DC/DC isolates the 12V power supply protect through the box body of Shielded Twisted Pair, PLC shielding, do not join with bottom slave station ground wire, zero line.Measure of communication chip over-voltage over-current protection and power supply, CPU, the integrated anti-electromagnetic interference (EMI) measure of I/O node.
2, the strict industrial automation network standard of carrying out GB/T Modbus agreement of system programming, the technical requirement that " necessary " carries out and carry out the relevant robotization of national GB/T standard in real earnest and control relevant regulations such as response time.
3, software design takes to prevent out big number, wrong number, digital filtering, technical measures such as judgement, error correction relatively.
4, set up visual diagnostic function, traffic lights show transmitting-receiving message ruuning situation, occur that the irregular operating situation is in time wired, radio alarming.
5, set up the operation of Modbus field bus system, use, maintenance instruction, training operation in time, supervisory engineering staff improve the level of scientific management.
Through above technical measures; Monitor remote I/O control system technical stipulation of safe operation 52560h>20000h mean free error time more than 6 years continuously under the forceful electric power environment of power station high-voltage board 10KV, low-voltage cabinet 380V in Modbus fieldbus DI-16 road is realized safe and reliable long-time running.
Its economical, societal benefits of the automation control system of the Modbus-RTU fieldbus and the PLC system integration are quite tangible.As realizing following function in the electric integrated automatic system:
One, energy-saving and emission-reduction function: according to the rate of load condensate seasonal variations, under artificial the guidance, drop into automatically or minimizing load equipment-transformer load size and quantity, remain at full capacity or operation down at full capacity the raising plant factor; Can be through moving form such as peak valley rate, the peak load shifting saving electricity saving electricity charge; Can reduce reactive loss through load unbalanced rate, improve with electricity quality etc.
Two, safety in production operation function: the past, on-load was operated a switch owing to misoperation, and ground wire is not plucked combined floodgate, causes man-machine injures and deaths major break down, and is of common occurrence.Automated system realizes that micro_computer five_proof function, dynamic simulating screen show the field apparatus running status in real time; Close a floodgate or operate a switch, ground connection disconnecting link state; And there are CRT display screen, LED bar screen, demonstration running current, voltage, temperature, active power to change; And the operation order management system arranged; Slave station monitoring, alarming function, the generation or the minimizing of stopping man-machine injures and deaths major accident have an accident rate to minimum point.
Three, automatic management function main website host computer can automatically, manually be printed 20 various analysis managements forms such as planting practical energy-conservation, safe operation more, and is very practical, functions such as minimizing manual metering, calculating, transmission.
Four, wired in real time, radio alarming Presentation Function accident occurs and in time handles according in time reporting to the police in the regulation and stipulation 3 seconds-5 seconds, prevents that major accident from taking place.
Five, main website network savvy data remote, exchanges data realize that network function is shared.
The automation control system of the Modbus-RTU fieldbus and the PLC system integration realizes that five functional receives praises from customers, and its economic and social benefits are very obvious.
Current; Domestic field bus control system basically all is to select a complete set of software and hardware of import for use; Most units are not enough to field bus control system technical service strength; Can only require to use operation by by specification; Go out general considerations and can change parts; The new system that attendes moves approximately that technical service does not catch up with after several years; Control system the part possibly occur or most of automated system can not be used; Can only manually-operated, cause yield poorly, of poor quality, expense is high, the unwarranted consequence of safe operation, causes the tremendous economic loss for country, enterprise.
The objective of the invention is to propose Modbus fieldbus DI-16 road monitor remote I/O control system based on national GB standard; Through the design of independent research grid, the Modbus fieldbus DI-16 road monitor remote I/O control system of system software hardware product design realization production domesticization is served society.
Summary of the invention:
The object of the present invention is to provide the control system of production domesticization Modbus fieldbus DI-16 road monitor remote I/O.
In order to realize above-mentioned control system, technical scheme technical characterictic of the present invention is following:
Native system is the Modbus fieldbus DI-16 road monitor remote I/O control system of the seamless integrated digital network of Modbus fieldbus main website host computer and slave station PLC system.
1, using Modbus agreement principal and subordinate's protocol theory on serial link carries out the message communication technical characterictic and is: the fieldbus of using Modbus agreement RTU pattern realize the Modbus main website with from station control system, the U0 of main website (6) sends the request Modbus-RTU of main website message frame to slave station 3DI-16 road PLC: read the request message frame through RS 485 two-wire system A+B-serial ports J1 terminals, U3 transceiving driver telecommunication circuit (5), U8-U10 transmitting-receiving message control circuit (4), slave station (3) U1 microprocessor; Slave station 3U1 response Modbus-RTU message frame, U1 subroutine are gathered switching value data in real time; Gather terminal J1 through 16 way switch; 1-16 way switch amount Acquisition Circuit (1), U4-U7 photoelectricity coupling buffer circuit (2), slave station (3) U1 send the response message frame, get into the host computer U0 of main website (6) and read the response message frame through U8-U10 transmitting-receiving message control circuit (4), U3 transceiving driver telecommunication circuit (5), J1 terminal RS 485 two-wire system A+B-serial ports, realize the overall process of Modbus fieldbus DI-16 road monitor remote I/O control system.
2, Modbus-RTU message frame data transmission technology: Modbus field bus system main website or slave station communication data transmission are to be address, function code, data, CRC check with the message form, realize the digital data exchange.The Modbus message frame is that the Modbus message is placed in the frame of known start bit and stop bit; Main website sends the request message frame; Slave station sends the response message frame and carries out complete message frame exchanges data, realizes that the data of remote data I/O transmission, the transmission of message frame technique guarantee are accurate.
3, complete Modbus message frame technology: the Modbus message frame not only will be placed in the frame of known start bit and stop bit and the regulation start bit wanted for>=3.5 character times; InterFrameGap is greater than 3.5 character times; Interval between 2 characters is greater than 1.5 character times; Not meeting this rule, to be called message frame imperfect; Message frame that must be complete just can be carried out the reception or the transmission of message frame, and complete message frame transmission data have RS485 two-wire system A +B -Polarity " 1 " " 0 " high-low level saltus step, every changes polarity, contains synchronous clock information, and the serial data coding of alternating voltage guarantees the communication data transmission accurately and reliably.
4, DI-16 monitor PLC control technology characteristic: DI-16 road detector is the slave station PLC product of Modbus field bus control system, is a kind of DI-16 road monitor PLC product of directly under industrial environment, using according to the IEC61131-1 of International Electrotechnical Commission Programmable Logic Controller PLC definition.Realize the control of slave station through Modbus fieldbus main website, slave station, message transmission procedure to field apparatus.
1) DI-16 way switch amount acquisition control circuit: the switching value signal of enchashment field device and J125 point connection terminal be physical connection one to one, through V Ccl12V DCPull-up resistor R11, R13, light emitting diode, field apparatus dry contact and GND are connected.
When the switch combined floodgate dry contact of equipment becomes normally off; The corresponding U4 of light emitting diode conducting, U5, U6, the conducting of U7 photoelectricity coupling triode are output as " 0 " low level; Otherwise be output as high level " 1 "; On-off value data acquisition is the digital coding that comes expression data " 1 " or " 0 " state with high and low level pulse signal, reads the binary switch amount data of 2 bytes and ram register storage in real time through slave station monitor microprocessor U1 pin P1.0~P1.7 and P2.0~P2.7.
2) transmitting-receiving message control circuit: slave station U1 pin TXD, T0, RXD are connected with U8U9U10 transmitting-receiving message control circuit corresponding point; When low level " 0 " is put in slave station U1 pin T0 P3.4 control; U9 work RE is a low level; It is effective that the R0 of corresponding connection U3 transceiving driver telecommunication circuit RS~485 low-power consumption transceivers receives message, and slave station 3 U1 RXD read the main website request message data of serial input.Otherwise DE high level then when slave station U1 T0 P3.4 puts high level " 1 ", it is effective that corresponding transceiving driver D1 sends message, and slave station U1 TXD sends response message.The U0 of main website reads slave station response message data, accomplishes the character string that contains 28 figure place 16 systems and carries out the data communication of message frame, realizes the reliable control of main website, slave station transmitting-receiving message.
DI-16 road monitor PLC and the seamless integrated production domesticization Modbus fieldbus DI-16 road monitor remote I/O control system of Modbus field bus system are successfully developed, and its outstanding advantage is:
1, the advance of Modbus field bus control system technology, novelty, creativeness, various practicality of PLC function is widely used in industrial automation control system.
2, field bus control system is realized the digitizing technique of overall process, and transmission speed is fast, and data accurately and reliably; Antijamming capability is strong, and networking technology, is convenient to, wireless network wired with other and is connected; Range of application is wider, and usage range is stronger, helps the upgrading of legacy system.
Description of drawings:
The master/slave station of Fig. 1 Modbus-RTU message transfer system process flow diagram
Fig. 2 DI-16 electronic circuit schematic diagram
Fig. 3 is a 1-16 way switch amount Acquisition Circuit 1 and U4-U7 photoelectricity coupling buffer circuit 2 principle enlarged drawings among Fig. 2
Fig. 4 is that slave station U1, baud rate are provided with circuit 7, DIP switch address setting circuit 8 and U2 watchdog circuit 9 principle enlarged drawings among Fig. 2
Fig. 5 is U3 transceiving driver telecommunication circuit 5 principle enlarged drawings and direct supply 10 principle enlarged drawings
Fig. 6 Modbus fieldbus DI-16 road monitor remote I/O control system software flow pattern
(wherein: Fig. 6 a switching value data subroutine, Fig. 6 b host computer main website request message process flow diagram, Fig. 6 c slave station monitor response message process flow diagram, Fig. 6 d CRC-16 bit check process flow diagram)
Fig. 7 Modbus-RTU network system theory diagram
Embodiment:
Divide three part explanations as follows in conjunction with the accompanying drawing example:
One, Modbus fieldbus DI-16 road monitor remote I/O main website and slave station circuit control system embodiment are following:
1, the control of the transfer process of master/slave station request, response message:
1. the flow process of the 6 host computer U0 of main website transmission request message is: the host computer U0 of main website (6) sends the request message frame, through fieldbus A +B -Point J1 connection terminal, transceiving driver telecommunication circuit (5), U8-U10 receives and dispatches message control circuit (4), and slave station (3) U1 reads the request message frame of main website.
2. slave station 3U1 sends the flow process of response message and is: start U1 switching value data subroutine, through 1-8,9-16 switch acquisition circuit (1), U4-U7 photoelectricity coupling buffer circuit (2); Slave station (3) U1 sends the response message frame through U8-U10 transmitting-receiving message control circuit (4); Transceiving driver telecommunication circuit (5); A+B-point J1 connection terminal; Fieldbus, the host computer U0 of main website (6) reads slave station response message frame data.
2, on-off value data acquisition circuit:
With field apparatus dry contact switching signal and 16 way switch amount connection terminal J 1, the 1-8 road, 9-16 way switch amount Acquisition Circuit is physical connection one to one.Through V DC112V DCPull-up resistor R11, R13, light emitting diode, the connection of dry contact and GND; And be connected with optocoupler isolator; When field apparatus is in "on" position normally opened contact closure, the light emitting diode conducting of switching value circuit, the phototriode conducting that corresponding U4~U7 light is separated.The optocoupler isolator output low level is " 0 ", on the contrary the disconnection of equipment gate-dividing state contact, not conducting of light emitting diode, photoelectrical coupler is output as high level and is " 1 ".Slave station U1 subroutine and employing scan round work in series mode; The high-low level " 1 " or " 0 " switching signal of gathering are checked judgement through the digital filtering of software design to high and low level; Eliminate the wrong number of spike pulse error code; Because of the shake that the contact frequent movement produces, reach photoelectrical coupler and effectively suppress software and hardware technology measures such as interference, noise, guarantee data accurately and reliably.And through slave station U1 pin P1.0~P1.7, P2.0~P2.7 16 way switch amounts are expressed the binary data that " 1 " or " 0 " status data coding is read as 2 bytes with the high-low level pulse signal and deposit ram data register in.
3, slave station U1 outer periphery circuits 7,8,9:
Baud rate is provided with circuit 7: slave station microprocessor U1 is connected with the crystal oscillator clock circuit, U1 microprocessor pin XTAL1, XTAL2 are connected with crystal oscillator 11.0592MHZ and starting of oscillation electric capacity; Provide that timer T1, pattern 2, SMOD put 0, the traffic rate of initial value FDH parameter setting is 9600bit/s, be used for Modbus communication message data transmission.U2 watchdog circuit 9: slave station U1 is connected with watchdog circuit U2, the RST of slave station U1 microprocessor pin P2.0 RXD P2.5 T1 and U2, and the ST pin is corresponding to be connected, and the U2 watchdog circuit regularly sends the RESET reset signal and prevents that program from crashing.DIP monitor address setting circuit 8: the ADD address setting circuit of slave station U1,8 PID switches of employing are through 5V DCPull-up resistor R13 is connected with the P0.0~P0.7 of U1 microprocessor pin, carries out slave station DI-16 road monitor address setting through the given high and low level of DIP switch.U0 of main website and slave station U1 read the slave station 8 bit data addresses of this visit according to user program and are placed in the message field (MFLD), and each tributary address is that in 1~247 one is unique in the communication of Modbus message frame.
4, transmitting-receiving message control circuit:
Slave station U1 pin TXD, T0, RXD are connected with U8U9U10 transmitting-receiving message control circuit corresponding point; When low level " 0 " is put in slave station U1 pin T0 P3.4 control; U9 work RE is a low level; It is effective that the R0 of corresponding connection U3 transceiving driver telecommunication circuit RS~485 low-power consumption transceivers receives message, and slave station 3 U1 RXD read the main website request message data of serial input.Otherwise DE high level then when slave station U1 T0 P3.4 puts high level " 1 ", it is effective that corresponding U3 transceiving driver D1 sends message, and slave station U1 TXD sends response message.Transmitting-receiving message control circuit, control output incoming message data.The U0 of main website reads slave station response message data, accomplishes the character string that contains 28 figure place 16 systems and carries out the data communication of message frame, realizes the reliable control of main website, slave station transmitting-receiving message.Slave station U1 T0 was set to low level " 0 " in order to receiving the request message of the U0 of main website in real time after software design regulation slave station sent response message.
5, DI-16 road monitor structural design: DI-16 road monitor is directly to the field apparatus control image data away from main website; It is Modbus fieldbus slave station product; PLC is designed to: power supply, CPU, the integrated box structure of I/O node, have the visual diagnostic function of LED, and the LED green light is shown as the reception message; Red light is shown as the transmission message; The profile of anti-electromagnetic interference function is small and exquisite, is easy to Installation and Debugging, is connected with bus; 16 way switch amounts connect, practical PLC slave station product.
Two, the communication system embodiment of Modbus fieldbus DI~16 road monitor remote I/O main websites and slave station message frame:
1, the 6U0 of main website sends the transmission of request message frame traffic message and is: the U0 of main website (6) sends the request message frame, through fieldbus A +B -Point J 1Connection terminal, transceiving driver telecommunication circuit (5), U8-U10 transmitting-receiving message control circuit (4), slave station (3) U1 microprocessor read the request message frame data.
2, the transmission of slave station 3U1 response message frame traffic message is: start U1 microprocessor switch acquisition subroutine, through 1-8,, 9-16 switch acquisition circuit (1), U4-U7 photoelectricity coupling buffer circuit (2), slave station (3) U1 send response message frame, U8-U10 transmitting-receiving message control circuit (4), transceiving driver telecommunication circuit (5), A +B -Put the J1 connection terminal, read the response message data through the fieldbus entering host computer U0 of main website (6).
3, the master/slave protocol technology of Modbus:
This Communication System Design is selected Modbus--RTU remote terminal pattern communication CRC16 bit check mode for use, and the setting traffic rate is 9600bit/s.
The Modbus serial link protocol is principal and subordinate's agreement, at one time, can only have a main website and one or more slave station to communicate; Modbus communication always by main website initiate, when slave station is not received the request from main website, can not send data, can not intercom mutually between the slave station.Main website selects for use unicast mode to send the Modbus request message to slave station: main website comes the single slave station of addressing through tributary address is placed in the message address field; Slave station receives and handles after the request; Return response message to main website; The address of oneself is put in the response address field, makes main website know which is from standing in response.The message addressing technique makes each slave station must have unique address (1-247) so just can be different from independently addressee of other station.
4, Modbus message data transmission technology:
The transmission of Modbus communication data all is to accomplish with the message form.Main website sends message and is called request, and slave station sends message and is called response.Message format is seen table one
Modbus message format table one
The address Function code Data CRC check
8 bytes 8 bytes 16 2 bytes 16 2 bytes
5, the Modbus message RTU message frame communication technology:
Transfer equipment main website or slave station are placed on the Modbus message in the frame that has known start bit and stop bit, and the slave station or the main website equipment that just allow to receive new frame begin to receive in the start bit of message, and know when ENMES point finishes.See table two
Modbus-RTU message frame form shfft two
6, Modbus--RTU message frame software flow pattern:
The practical implementation method is:
1) Modbus fieldbus DI~16 road monitor remote I/O control system have connected and have built up, and slave station U1 has installed user's program.
2) working procedure, communications protocol and systematic parameter are provided with, and register address distributes, and the main website software communication function of request message is set up.
3) system powers on, original state clear memory, clear internal memory, and the serial ports initialization stops to interrupt, and prepares to carry out data communication with the main website request message.
4) accept main website request message frame, detect " complete message frame " and change sky over to and close and carry out CRC16 position calculation check after the state, the address diagnosis, function code judges, when the address carries out that 03H ROM (read-only memory) function, verification are correct, the address errorless after.
5) slave station sends the response message frame; Log-on data is gathered subroutine; CPU reads internal memory 16 way switch amount data; This tributary address is put in the message frame; Carry out the transmission of response message frame data, exchanges data; Realize remote data I/O transmission, the complete message frame carries out the transmission of response message frame data with 28 16 system continuation character strings.
7, the transmission of Modbus--RTU message frame remote data has following characteristic:
1) complete message frame technology:
Modbus--RTU communication protocol frame code requirement: the Modbus message is placed in the frame that has known start bit and end point, and the equipment that allows to receive new frame was located to begin to receive and know when ENMES point finishes in the start of message.Stipulate that promptly start bit wanted for >=3.5 character times, interFrameGap is greater than 1.5 character times between two characters greater than 3.5 character times at interval, and not meeting this rule, to be called message frame imperfect, and receiving station should abandon this message frame.Meet reception or transmission that " complete message frame " standard could get into message.These complete message frame normalized illustration message frame transmission data are to have: A +B -Polarity, " 1 " " 0 " high-low level saltus step, every changes polarity, contains synchronous clock information, and the serial data coding of alternating voltage signal guarantees the communication data transmission accurately and reliably.
2) " uniqueness " technology of tributary address
It is unique that the Modbus-RTU unicast mode requires tributary address; And transfer tributary address generation request message through main website the address is diagnosed; Slave station receives message the address is diagnosed again; Slave station sends response message the address is diagnosed again, accepts the slave station message to main website the address is diagnosed again.Four diagnosis are carried out in an address.Slave station is sought through tributary address is placed in the message address field by main website, and when slave station returned response, it was put into the address of oneself in the response address field, so that make main website know that which addressing slave station responds.Guaranteed that tributary address is unique and accurately and reliably.
3) CRC16 bit check technology:
It is FFFF that Modbus-RTU remote terminal transmission pattern specification regulation is carried out CRC16 position calculation check eigenwert.Native system carries out CRC check with the software displacement method; Each data in the message frame (check bit does not participate in calculating for start bit, position of rest) are all carried out the CRC16 position to be calculated; The result deposits in the register check territory, and the CRC calculated value is appended in the CRC calculated value that sends message.The main website that when receiving message, receives or will recomputate crc value from station equipment; And the actual value that receives in calculated value and the crc field compared; Effective like two identical then these frame messages of value; Receive the message processing time in order to reduce; When receiving address field, whether be the address of this substation with regard to the analysis and judgement address; CRC calculation check and addressing determine this tributary address to be carried out simultaneously, judges it is that this message frame is effective when issuing this tributary address when the address.If slave station detects the mistake in the received frame under unicast mode, do not return response to main website.Main website sends the retry request at " response timeout ".
8, communication data consistency detection technology:
Detect the consistance of communication data through Modbus-RTU message frame main website, the actual measurement of slave station communication data.The test case data are following:
Main website request message form: ADDR 03 00 00 00 01 CRC1 CRC2
Message data: 01 03 00 00 00 01 84 0A
Slave station response message form: ADDR 03 02 DATA1 DATA2 CRC1 CRC2
Message data: 01 03 02 17 08 BC 72
Response message data DATA1 equals 17H, and to convert binary number to be 00010111B
DATA2 equals 08H, and to convert binary number to be 00001000B
16 way switch amount collection points and switching value data relation:
The switch acquisition point 1 2 3 4 5 6 7 8
The switching value state 1 1 1 0 1 0 0 0
The switch acquisition point 9 10 11 12 13 14 15 16
The switching value state 0 0 0 1 0 0 0 0
" 1 " is the switching value "on" position that powers in the table, and " 0 " is the separating brake off-position.Communication actual measurement is artificial given on off state and the contrast of communication switch amount image data is 1110100000010000 in full accord.The requirement of satisfying all " necessary " in the Modbus serial link protocol meets the consistency principle.
Three, Modbus fieldbus DI~16 road monitor remote I/O main websites and slave station Modbus-RTU network system.
Practical implementation is to design by the power automatic system scheme, carries out on-the-spot I/O data acquisition and processing from the visible main website of Fig. 7 host computer through MOXA multi-channel serial port card connection a, b, c, d, 5 fieldbus of e.The a bus is connected in series the electricity that the homemade south comprehensive relay protector product of auspicious RCS96 series is carried out LFPbus bus 103 agreement collection site power equipments; Analog quantity; Switching value data; The b bus is in order to guarantee the technical manual of automated system response time; Design is adopted main website fieldbus and slave station multibus to carry out the real-time Communication for Power mode or is claimed the multi-point and common-line connected mode; Main website timesharing and the data volume of each substation swap data DI-16 road monitor account for 2 byte main websites these buses of time spent 50ms of inquiry and be connected in series 50 DI-16 road slave stations and then second reach automatic technology standard GB/T 13730-92 regulation in time spent≤3: the remote signalling displacement is transferred to the technical stipulation of main station time≤3 second, and the analog data of A1-8 slave station collection in like manner amount takies the 150ms bus with 18 bytes and can be connected in series 30 slave stations; PI-8 is that the pulse data collection accomplishes electricity and calculate store operational, and data volume takies the 250ms bus with 32 bytes and is connected in series 20 slave stations and can realizes that the remote measurement amount is transferred to the regulation of main website≤3 second; C and d bus are used for enlarging with the intelligence instrument of carrying out the Modbus-RTU bus or Schneider product the range of application of product; To be the main website host computer adopt serial ports output DO multichannel and connect mode to slave station imitation screen output DO, AO the e bus, and the realization system is to the control of imitation screen, response time≤2 second, and real-time pictures is called the technical stipulation of response time≤2 second.The host computer main website is that timely warning can be reported to the police through the user mobile phone communication of SIM card through installing the GCM wireless transceiver additional, and the assurance accident is in time handled.Balancing twisted-pair line screen layer should be near master station one side joint ground, and ground insulation resistance should meet the GB/T2887-2000 technical manual.

Claims (6)

1.Modbus fieldbus DI-16 road monitor remote I/O control system; The fieldbus that it is characterized in that using Modbus agreement RTU pattern realize the Modbus main website with from station control system, the 6U0 of main website sends the request Modbus-RTU of main website message frame to slave station DI-16 road PLC: read the request message frame through RS 485 two-wire system A+B-serial ports J1 terminal U3 transceiving driver telecommunication circuits (5), U8-U10 transmitting-receiving message control circuit (4), slave station (3) microprocessor U1; Slave station 3U1 response Modbus-RTU message frame; Slave station 3U1 subroutine is gathered switching value data in real time; Through 1-16 way switch amount Acquisition Circuit (1); U4-U7 photoelectricity coupling buffer circuit (2); Slave station (3) U1 sends the response message frame; Through U8-U10 transmitting-receiving message control circuit (4); U3 transceiving driver telecommunication circuit (5), J1 terminal RS 485 two-wire system A+B-serial ports get into the host computer U0 of main website (6) and read the response message frame, realize the overall process of Modbus fieldbus DI-16 road monitor remote I/O control system.
2. by the said Modbus fieldbus of claim 1 DI-16 road monitor remote I/O control system; It is characterized in that: it is unique that the main website host computer can only have a main website at one time; Slave station can expand to 1-247, and the address of each slave station also is unique; It is unique that the Modbus-RTU unicast mode requires tributary address, is through the message frame communication process visit tributary address to be placed in the message, and verification realizes repeatedly; Main website will be placed on the tributary address of visit when slave station sends request message and carry out the CRC16 bit check in the message frame and proof test value is placed in the message frame; Slave station receives the main website request message also will carry out the CRC16 bit check to message frame; This proof test value and the proof test value that receives message are compared; Slave station just can respond and this tributary address is placed in the response message and send when consistent; Main website reception slave station response message carries out CRC16 bit check value again to be checked, so the tributary address process: main website sends request message, slave station read request message; Slave station sends response message, main website reads response message and carries out the CRC16 bit check 4 times, guarantees that tributary address is unique, guarantees communication data accurately and reliably.
3. by the said Modbus fieldbus of claim 1 DI-16 road monitor remote I/O control system; It is characterized in that: carry out data transmission by Modbus-RTU message frame mode; Modbus field bus system main website or slave station communication data transmission are with the message form---address, function code, data, CRC check, realize the digital data exchange; The Modbus message frame is that the Modbus message is placed in the frame of known start bit and stop bit; Main website sends the request message frame; Slave station sends the response message frame and carries out the message frame exchanges data, realizes that the data of remote data I/O transmission, the transmission of message frame technique guarantee are accurate.
4. by the said Modbus fieldbus of claim 1 DI-16 road monitor remote I/O control system; It is characterized in that: the Modbus message frame not only will be placed in the frame of known start bit and stop bit and the regulation start bit wanted for>=3.5 character times; InterFrameGap is greater than 3.5 character times; Interval between 2 characters is greater than 1.5 character times; Not meeting this rule, to be called message frame imperfect; Message frame that must be complete just can be carried out the reception or the transmission of message frame, and complete message frame transmission data have RS485 A +B -" 1 " " 0 " high-low level saltus step, every changes polarity, contains synchronous clock information, and the string data coding of 28 16 systems of alternating voltage guarantees the communication data transmission accurately and reliably.
5. by the said Modbus fieldbus of claim 1 DI-16 road monitor remote I/O control system, it is characterized in that:
DI-16 road monitor is a software and hardware integration PLC product, and the data acquisition of DI-16 way switch amount is: the switching value signal and the J of enchashment field device 125 connection terminals are physical connection one to one, through V Ccl12VDC pull-up resistor R11, R13, the LED light emitting diode, field apparatus dry contact and GND are connected; When the switch combined floodgate dry contact of equipment becomes normally off; The corresponding U4 of light emitting diode conducting, U5, U6, the conducting of U7 photoelectricity coupling triode are output as " 0 " low level; Otherwise be output as high level " 1 "; On-off value data acquisition is the digital coding that comes expression data " 1 " or " 0 " state with high and low level pulse signal, reads 2 byte binary switch amount data and ram register storage in real time through slave station monitor microprocessor U1 pin P1.0~P1.7 and P2.0~P2.7; Through C lingware programming subroutine, digital filtering, relatively judge and technical measures such as error correction prevent out big number, wrong number that guarantee that " 1 " " 0 " data are reliable, light is separated with and imitates conducting, ends, and prevents shake and noise.
6. by the said Modbus fieldbus of claim 1 DI-16 road monitor remote I/O control system; It is characterized in that: transmitting-receiving message control circuit: slave station U1 pin TXD, T0, RXD are connected with U8U9U10 transmitting-receiving message control circuit corresponding point; When low level " 0 " is put in slave station U1 pin T0 P3.4 control; U9 work RE is a low level; It is effective that the R0 of corresponding connection U3 transceiving driver telecommunication circuit RS~485 low-power consumption transceivers receives message, and slave station 3 U1 RXD read the main website request message data of serial input; Otherwise DE high level then when slave station U1 T0 P3.4 puts high level " 1 ", it is effective that corresponding U3 transceiving driver D1 sends message, and slave station U1 TXD sends response message: transmitting-receiving message control circuit, control output incoming message data, through A +B -Point, J1 connection terminal, fieldbus, 9 pins, 232/485 converter are connected with the main website host computer; The U0 of main website reads slave station response message data; The character string that completion contains 28 figure place 16 systems is carried out the data communication of message frame, realizes the reliable control of main website, slave station transmitting-receiving message.
CN201110216595.0A 2011-08-01 2011-08-01 Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor Expired - Fee Related CN102354175B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110216595.0A CN102354175B (en) 2011-08-01 2011-08-01 Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110216595.0A CN102354175B (en) 2011-08-01 2011-08-01 Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor

Publications (2)

Publication Number Publication Date
CN102354175A true CN102354175A (en) 2012-02-15
CN102354175B CN102354175B (en) 2014-10-15

Family

ID=45577750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110216595.0A Expired - Fee Related CN102354175B (en) 2011-08-01 2011-08-01 Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor

Country Status (1)

Country Link
CN (1) CN102354175B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338229A (en) * 2013-06-03 2013-10-02 深圳市宏电技术股份有限公司 Method and system for interaction between remote terminal device and data transmission unit
CN104065545A (en) * 2014-06-27 2014-09-24 浙江大学 RS485 bus communication method based on Modbus protocol and power electronic system based on communication method
CN104601420A (en) * 2014-12-31 2015-05-06 江西清华泰豪三波电机有限公司 Method for flexibly reading power station data by utilizing Modbus
CN105676757A (en) * 2015-12-22 2016-06-15 北京大唐兴业国际控制技术有限公司 BAC monitoring system
CN105991381A (en) * 2015-03-17 2016-10-05 西门子公司 Data bus connector and method for operating
CN106707946A (en) * 2015-07-24 2017-05-24 中国石油天然气股份有限公司 Data line for communication between S7-200 PLC (Programmable Logic Controller) and ACE3600 RTU (Remote Terminal Unit)
CN108153261A (en) * 2017-12-25 2018-06-12 杭州和利时自动化有限公司 A kind of data interactive method and system
CN108965083A (en) * 2018-06-13 2018-12-07 四川川润液压润滑设备有限公司 A kind of Modbus-RS485 signal procedure method of active jamming rejection
CN109587022A (en) * 2019-01-31 2019-04-05 华夏世昌(北京)科技有限公司 A kind of communication protocol and application of igniting driving bus IDBUS
CN109743301A (en) * 2018-12-24 2019-05-10 武汉工程大学 A kind of data receiving-transmitting system and method based on Modbus agreement
CN111708313A (en) * 2020-04-28 2020-09-25 北京骥远自动化技术有限公司 PLC system capable of realizing efficient transmission and data transmission method thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000227803A (en) * 1998-12-25 2000-08-15 Mitsubishi Electric Corp Method and system for controlling transmission in data link system of programmable controller
CN101094110A (en) * 2007-07-18 2007-12-26 哈尔滨工业大学 System and method for setting up, detecting and displaying interval time of characters inside Modbus RTU frame and between frames
CN101514999A (en) * 2008-12-15 2009-08-26 安徽鑫龙电器股份有限公司 Electric power measurement multifunctional instrument system and method for measurement
CN201307236Y (en) * 2008-09-09 2009-09-09 上海轻工业研究所有限公司 Multi-channel serial communication converter and distributed control system employing same
CN101813935A (en) * 2010-03-17 2010-08-25 南京航空航天大学 Non-polar field bus system and realization method
CN101997441A (en) * 2010-09-14 2011-03-30 苏州市职业大学 Networked controller of high-frequency inverter power supply and control method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000227803A (en) * 1998-12-25 2000-08-15 Mitsubishi Electric Corp Method and system for controlling transmission in data link system of programmable controller
CN101094110A (en) * 2007-07-18 2007-12-26 哈尔滨工业大学 System and method for setting up, detecting and displaying interval time of characters inside Modbus RTU frame and between frames
CN201307236Y (en) * 2008-09-09 2009-09-09 上海轻工业研究所有限公司 Multi-channel serial communication converter and distributed control system employing same
CN101514999A (en) * 2008-12-15 2009-08-26 安徽鑫龙电器股份有限公司 Electric power measurement multifunctional instrument system and method for measurement
CN101813935A (en) * 2010-03-17 2010-08-25 南京航空航天大学 Non-polar field bus system and realization method
CN101997441A (en) * 2010-09-14 2011-03-30 苏州市职业大学 Networked controller of high-frequency inverter power supply and control method thereof

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338229A (en) * 2013-06-03 2013-10-02 深圳市宏电技术股份有限公司 Method and system for interaction between remote terminal device and data transmission unit
CN104065545B (en) * 2014-06-27 2017-12-22 浙江大学 RS485 bus communication methods based on Modbus agreements and the power electronic system based on the means of communication
CN104065545A (en) * 2014-06-27 2014-09-24 浙江大学 RS485 bus communication method based on Modbus protocol and power electronic system based on communication method
CN104601420A (en) * 2014-12-31 2015-05-06 江西清华泰豪三波电机有限公司 Method for flexibly reading power station data by utilizing Modbus
CN105991381A (en) * 2015-03-17 2016-10-05 西门子公司 Data bus connector and method for operating
CN105991381B (en) * 2015-03-17 2019-04-05 西门子公司 Data/address bus connector and method for operation
CN106707946A (en) * 2015-07-24 2017-05-24 中国石油天然气股份有限公司 Data line for communication between S7-200 PLC (Programmable Logic Controller) and ACE3600 RTU (Remote Terminal Unit)
CN105676757A (en) * 2015-12-22 2016-06-15 北京大唐兴业国际控制技术有限公司 BAC monitoring system
CN108153261A (en) * 2017-12-25 2018-06-12 杭州和利时自动化有限公司 A kind of data interactive method and system
CN108965083A (en) * 2018-06-13 2018-12-07 四川川润液压润滑设备有限公司 A kind of Modbus-RS485 signal procedure method of active jamming rejection
CN108965083B (en) * 2018-06-13 2020-09-18 四川川润液压润滑设备有限公司 Active interference resistant Modbus-RS485 communication program method
CN109743301A (en) * 2018-12-24 2019-05-10 武汉工程大学 A kind of data receiving-transmitting system and method based on Modbus agreement
CN109743301B (en) * 2018-12-24 2021-03-16 武汉工程大学 Modbus protocol-based data receiving and transmitting system and method
CN109587022A (en) * 2019-01-31 2019-04-05 华夏世昌(北京)科技有限公司 A kind of communication protocol and application of igniting driving bus IDBUS
CN111708313A (en) * 2020-04-28 2020-09-25 北京骥远自动化技术有限公司 PLC system capable of realizing efficient transmission and data transmission method thereof

Also Published As

Publication number Publication date
CN102354175B (en) 2014-10-15

Similar Documents

Publication Publication Date Title
CN102354175B (en) Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor
CN102510127B (en) Method for unifying models of on-line monitored first and secondary equipment of power grid
CN100463822C (en) Computer interlock system
CN101359029B (en) Single bus DC earth fault on-line automatic monitoring apparatus
CN206541430U (en) A kind of data capture management device based on cloud platform
CN100470976C (en) Integrated automation converting station debugging apparatus
CN110084946A (en) A kind of system and method that five-defence block is used for based on wearable device
CN203799242U (en) Fieldbus technology-based 6kV high-voltage electrical equipment control system
CN106329720A (en) Detecting and debugging method for reconstruction and extension project secondary system for intelligent substation
CN109243239A (en) Track traffic electric power monitoring system simulation and training platform
CN104485748A (en) System and method for monitoring UPS of transformer substation
CN208903118U (en) A kind of programmable logic controller (PLC) based on industrial real-time ethernet
CN204883299U (en) LNG filling station remote control and measurement dispatch SCADA system
CN204408009U (en) Transformer station's AC power supervising device
CN202230360U (en) Remote I/O control system for Modbus fieldbus DI-16-path monitor
CN207081998U (en) Communication cabinet intelligent power distributor
CN102710025B (en) Power system communication device and method
CN104504537A (en) Transformer substation alternating current power supply monitoring system and transformer substation alternating current power supply monitoring method
CN204287957U (en) A kind of scrap prodn. line PROFIBUS PA slave station diagnostic system
CN203759860U (en) Intelligent GPRS server concentrator
CN104979907A (en) Substation automation device detection method based on D5000 system
CN110524155A (en) A kind of remote real-time monitoring system for welding robot system
CN204179757U (en) Based on the power distribution information acquisition system of fieldbus
CN108806230A (en) A kind of intelligent communication harvester based on infrared identification
CN202780832U (en) Remote monitoring system for CNC (computer numerical control) vertical grinder

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EXPY Termination of patent right or utility model
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20141015

Termination date: 20150801