[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN102354175B - 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
CN102354175B
CN102354175B CN201110216595.0A CN201110216595A CN102354175B CN 102354175 B CN102354175 B CN 102354175B CN 201110216595 A CN201110216595 A CN 201110216595A CN 102354175 B CN102354175 B CN 102354175B
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.)
Expired - Fee Related
Application number
CN201110216595.0A
Other languages
Chinese (zh)
Other versions
CN102354175A (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]

Landscapes

  • Selective Calling Equipment (AREA)
  • Programmable Controllers (AREA)

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; Belong to especially the Modbus Field Bus Control Technology of fieldbus and the PLC system integration.
Background technology:
The background technology of Modbus fieldbus DI-16 road monitor remote I/O control system divide chat as follows:
1, the Modbus communication technology: be 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 " based on standard GB/T/T19582.2-2008.1 Physical layer of this regulation enforcement 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 specification research and development Modbus field bus communication systems technology, there is the product of independent intellectual property right.
2, PLC control technology: DI-16 road monitor is the concrete application of PLC technology, PLC is Programmable Logic Controller, as far back as the IEC61131-1 of International Electrotechnical Commission Programmable Logic Controller latest definition in 1992: " Programmable Logic Controller be a kind of can be directly the electronic installation of the digital remote operation of application and design under industrial environment.Control various types of machinery or production run ".PLC is taking microprocessor CPU as core, there is 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, judgement is processed, process control, the practical industrial control device reliably of the control able to programme such as PID analog quantity closed-loop control.The PLC of user oriented, Control-oriented process, is widely used at industrial automation.The particularly seamless integrated irreplaceable advantages of other electronic product such as on-the-spot decentralised control reliability is high, volume is small and exquisite, be easy to install, cost is low, easy and simple to handle that have more of PLC and field bus control system.
3, Modbus Field Bus Control Technology:
Modbus field bus control system is that main website (major node) is connected as bus with the monitor Shielded Twisted Pair that slave station (point node) has PLC function, carries out Modbus communication protocol, the field bus control system of composition.Also referred to as the network system of major node and multiple points of nodes.It is computer technology, and PLC technology and the large technology of the communication technology three are carried out the system integration, have given full play to field bus technique advantage, become the peak of current industrial control field the 5th generation control technology.Be called FCS (Fieldbus Control System). the full field bus control system disperseing of digital Full-open.
Field Bus Control Technology, better solves " five change " technical matters
1) digitizing is digital data collection, digital computation, digital conversion, the digitized processing of the links such as digital message communication.
2) networked system of networked realization major node and each point of node.
3) solved the Communication Control Technology of bottom between host computer main website and equipment bottom equipment.
4) distributed control better solves the decentralized control problem of local slave station by the PLC monitor of substation.
5) because having solved this patent software and hardware technology of declaring, the application GB of Modbus country standard has the DOMESTICATION PROBLEM of independent intellectual property right.
Fieldbus makes robot control system(RCS) and field apparatus have communication capacity and decentralised control ability, and they are connected into network system and join the ranks of Information Network.Fieldbus is had in actual applications very practical, very economical, practical function very reliably, fieldbus was successively released the U.S. fieldbus such as FF, the Profibus of Germany from 1994 so far, field bus technique high speed development, popularize application in an all-round way, obtain user's welcome and convincingly demonstrate: it is that beginning of a control technology New Times is not excessive that field bus technique is said into.
Field Bus Control Technology has its outstanding advantage, but the problem occurring in practicality is also very serious: as field bus control system slave station on serial link can be connected in series 247 points and specify considerably beyond automatic technology condition when the string point data response time in many times, system is not up to standard cannot be applied; On system communication data in service, do not come, host computer can not receive field data appearance " unsure certificate " " deadlock " serious consequence that even communication chip burns out, system can not be moved; 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 being especially placed on high-pressure electric control cabinet, though also may there is strange number, large number, wrong number outward at regulation command range, solve anti-electromagnetic interference (EMI) and be still problem, balancing twisted-pair line D0, D1, RS485 interface A+B-point application common port, shielding layer grounding technical finesse is simultaneously most important to system 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 domestic RVVP Shielded Twisted Pair of half-duplex, under forceful electric power environment antijamming capability a little less than, be prone to " deadlock " or system irregular operating, for head it off native system design of hardware and software is taked following measures:
1, take ground wire, zero line safeguard measure; be that ground wire will be carried out the ground wire that GB/T standard ground insulation resistance is less than 4 ohm; zero line, the A+B-point of DC/DC isolation 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.The 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 industrial automation network standard of system programming strict implement GB/T Modbus agreement, " necessary " carry out technical requirement and carry out the relevant robotization control of national GB/T standard, the relevant regulations such as response time in real earnest.
3, Software for Design takes to prevent out large 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 irregular operating situation wired, radio alarming in time.
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.
By above technical measures, Modbus fieldbus DI-16 road monitor remote I/O control system technical stipulation of safe operation more than 6 years 52560h > 20000h mean free error time continuously under the forceful electric power environment of power station high-voltage board 10KV, low-voltage cabinet 380V, realizes safe and reliable long-time running.
Its economical, societal benefits of the automation control system of Modbus-RTU fieldbus and the PLC system integration are quite obvious.As realized following functions at Comprehensive Automatic System for Substation:
One, energy-saving and emission-reduction function: according to rate of load condensate seasonal variations, automatically drop under artificial guidance or reduce load equipment-transformer load size and quantity, remaining at full capacity or more lower operation, improving plant factor; Can save electricity as peak-valley ratio, peak load shifting by operation form and save the electricity charge; Can reduce reactive loss by load unbalanced rate, improve power quality etc.
Two, safety in production operation function: the past, on-load was operated a switch due to misoperation, and ground wire is not plucked combined floodgate, caused man-machine injures and deaths major break down, of common occurrence.Automated system realizes micro_computer five_proof function, the real-time displaying scene equipment running status of dynamic simulating screen, close a floodgate or operate a switch, grounding switch state, and there are CRT display screen, LED bar screen, demonstration running current, voltage, temperature, active power to change, and there is an operation order management system, slave station monitoring, alarming function, 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 management forms such as planting practical energy-conservation, safe operation more, very practical, the functions such as minimizing manual metering, calculating, transmission.
Four, wired, radio alarming Presentation Function in real time, occur accident according in regulation and stipulation 3 seconds-5 seconds and alarm process in time, prevent that major accident from occurring.
Five, main website network savvy data remote, exchanges data, realizes network function and shares.
The automation control system of Modbus-RTU fieldbus and the PLC system integration is realized five functional and is received praises from customers, and its economic and social benefits are very obvious.
Current, domestic field bus control system is substantially all to select a complete set of software and hardware of import, most units are to field bus control system technical service strength deficiency, can only require to operate with meeting by by specification, go out general considerations and can change parts, new upper system operation approximately after several years technical service do not catch up with, control system may occur that part or most of automated system can not use, can only manual operation, cause yield poorly, of poor quality, expense is high, the unwarranted consequence of safe operation, causes tremendous economic loss to country, enterprise.
The object of the invention is to propose Modbus fieldbus DI-16 road monitor remote I/O control system based on national GB standard, design by independent research grid, the design of system software hardware product realizes the Modbus fieldbus DI-16 road monitor remote I/O control system of production domesticization and serves 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 as follows:
Native system is the Modbus fieldbus DI-16 road monitor remote I/O control system of Modbus fieldbus main website host computer and the seamless integrated digital network of slave station PLC system.
1, application Modbus agreement master-Slave Protocol principle on serial link is carried out message communication technical characterictic and is: the fieldbus of application Modbus agreement RTU pattern realize Modbus main website with from station control system, the U0 of main website sends the request Modbus-RTU of main website message frame to slave station DI-16 road PLC: through RS485 two-wire system A+B-serial ports J1 terminal, U3 transceiving driver telecommunication circuit (5), U8-U10 transmitting-receiving message control circuit (4), slave station U1 microprocessor read requests message frame; Slave station U1 response Modbus-RTU message frame, U1 subroutine Real-time Collection switching value data, gather terminal J1 through 16 way switch, 1-16 way switch amount Acquisition Circuit (1), U4-U7 photoelectric coupling buffer circuit (2), slave station U1 send response message frame, enter the host computer U0 of main website and read response message frame through U8-U10 transmitting-receiving message control circuit (4), U3 transceiving driver telecommunication circuit (5), J1 terminal RS485 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 message form, realizes digital data exchange.Modbus message frame is that Modbus message is placed in the frame of known start bit and stop bit, main website sends request message frame, slave station sends response message frame and carries out complete message frame exchanges data, and the data that realize remote data I/O transmission, the transmission of message frame technique guarantee are accurate.
3, complete Modbus message frame technology: Modbus message frame not only will be placed in the frame of known start bit and stop bit and 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 reception or the transmission of message frame, and complete message frame transmission data have RS485 two-wire system A +b -polarity " 1 " " 0 " low and high level saltus step, every changes polarity, contains synchronous clock information, and the serial data coding of alternating voltage ensures that communication data transmits accurately and reliably.
4, DI-16 monitor PLC control technology feature: 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 applying under industrial environment according to the IEC61131-1 of International Electrotechnical Commission Programmable Logic Controller PLC definition.Realize the control of slave station to field apparatus by Modbus fieldbus main website, slave station, message transmission procedure.
1) DI-16 way switch amount acquisition control circuit: switching value signal and the J of enchashment field device 125 connection terminals physical connection one to one, through V cc112V 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 photoelectric coupling triode are output as " 0 " low level, otherwise be output as high level " 1 ", on-off value data acquisition is the data encoding that comes expression data " 1 " or " 0 " state with high and low level pulse signal, reads binary switch amount data the ram register storage in real time of 2 bytes 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, that is: U1 pin one 1P3.1TXD serial output U8 work transmission message is effective, and it is effective that U1 pin one 0P3.0RXD serial output U10 work receives message.In the time that slave station U1 pin one 4P3.4T0 serial output control sets low level " 0 ", U9 work RE is low level, it is effective that the R0 of corresponding connection U3 transceiving driver telecommunication circuit RS~485 low-power consumption transceiver receives message, and slave station U1RXD reads the main website request message data of serial input.Otherwise DE high level in the time that slave station U1T0P3.4 sets high level " 1 ", it is effective that corresponding transceiving driver D1 sends message, and slave station U1TXD sends response message.The U0 of main website reads slave station response message data, completes 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 advantages 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, contributes to the upgrading of legacy system.
brief description of the 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 that in Fig. 2,1-16 way switch amount Acquisition Circuit 1 and U4-U7 photoelectric coupling buffer circuit 2 principle enlarged drawing Fig. 4 are that slave station U1 in Fig. 2, Configuration of baud rate circuit 7, DIP switch address arrange circuit 8 and U2 watchdog circuit 9 principle enlarged drawings
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 process flow diagram
(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
Example point three parts are described as follows by reference to the accompanying drawings:
embodiment:
One, Modbus fieldbus DI-16 road monitor remote I/O main website and slave station circuit control system embodiment are as follows:
1, the control of the transfer process of the request of master/slave station, response message:
1. the 6 host computer U0 of main website send request the flow process of message and are: the host computer U0 of main website (6) sends request message frame, through fieldbus A +b -point J1 connection terminal, transceiving driver telecommunication circuit (5), U8-U10 transmitting-receiving message control circuit (4), slave station U1 reads the request message frame of main website.
2. slave station U1 sends the flow process of response message and is: start U1 switching value data subroutine, through 1-8,9-16 switch quantity acquisition circuit (1), U4-U7 photoelectric coupling buffer circuit (2), slave station U1 sends 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 reads slave station response message frame data.
2, on-off value data acquisition circuit:
By field apparatus dry contact switching signal and 16 way switch amount connection terminal J 1, 1-8 road, 9-16 way switch amount Acquisition Circuit 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, corresponding U4~U7 light every phototriode conducting.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 for " 1 ".Slave station U1 subroutine and employing scan round work in series mode, low and high level " 1 " or " 0 " switching signal of gathering are checked to judgement through the digital filtering of Software for Design to high and low level, eliminate the wrong number of spike pulse error code, because of the shake of contact frequent movement generation, and photoelectrical coupler effectively suppresses the software and hardware technology measures such as interference, noise, ensures data accurately and reliably.And through slave station U1 pin P1.0~P1.7, P2.0~P2.7,16 way switch amounts are expressed to the binary data that " 1 " or " 0 " status data coding is read as 2 bytes with low and high level pulse signal and deposit ram data register in.
3, slave station U1 periphery arranges circuit 7,8,9:
Configuration of baud rate circuit 7: slave station microprocessor U1 is connected with crystal oscillation 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 set to 0, the traffic rate of initial value FDH parameter setting is 9600bit/s, 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.0RXD P2.5T1 and U2, ST pin is corresponding to be connected, and the timing of U2 watchdog circuit is sent RESET reset signal and is prevented that program from crashing.DIP monitor address arranges circuit 8: the ADD address of slave station U1 arranges circuit, adopts 8 PID switches through 5V dCpull-up resistor R13 is connected with the P0.0~P0.7 of U1 microprocessor pin, carries out monitor address, slave station DI-16 road arrange by the given high and low level of DIP switch.The U0 of main website and slave station U1 read the slave station 8 bit data addresses of this access and are placed in message field (MFLD) according to user program, and in the communication of Modbus message frame, each tributary address is that in 1~247 one is unique.
4, transmitting-receiving message control circuit:
Slave station U1 pin TXD, T0, RXD are connected with U8U9U10 transmitting-receiving message control circuit corresponding point, in the time that slave station U1 pin T0P3.4 control sets low level " 0 ", U9 work RE is low level, it is effective that the R0 of corresponding connection U3 transceiving driver telecommunication circuit RS~485 low-power consumption transceiver receives message, and slave station 3U1RXD reads the main website request message data of serial input.Otherwise DE high level in the time that slave station U1T0P3.4 sets high level " 1 ", it is effective that corresponding U3 transceiving driver telecommunication circuit D1 sends message, and slave station U1TXD sends response message.Transmitting-receiving message control circuit, control output incoming message data.Main website U0 host computer reads slave station response message data, completes 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.Software for Design specifies that slave station sends slave station U1 T0 after response message and is set to low level " 0 " in order to receiving in real time the request message of the U0 of main website host computer.
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 boxlike structure of I/O node, there is the visual diagnostic function of LED, and LED green light is shown as reception message, red light is shown as 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 website and slave station message frame:
1, the U0 of main website sends request the transmission of message frame communication message and is: the U0 of main website sends 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 U1 microprocessor read requests message frame data.
2, the transmission of slave station U1 response message frame traffic message is: start U1 microprocessor switch acquisition subroutine, through 1-8,, 9-16 switch quantity acquisition circuit (1), U4-U7 photoelectric coupling buffer circuit (2), slave station U1 send response message frame, U8-U10 transmitting-receiving message control circuit (4), transceiving driver telecommunication circuit (5), A +b -point J1 connection terminal, enter the host computer U0 of main website through fieldbus and read response message data.
3, the master/slave protocol technology of Modbus:
This Communication System Design is selected Modbus--RTU remote terminal pattern communication CRC16 bit check mode, and to set traffic rate be 9600bit/s.
Modbus serial link protocol is a master-Slave Protocol, at one time, can only have a main website and one or more slave station to communicate; Modbus communication always by main website initiate, in the time that slave station is not received the request from main website, can not send data, between slave station, can not intercom mutually.Main website selects unicast mode to send Modbus request message to slave station: main website carrys out the single slave station of addressing by tributary address is placed in message address field, after slave station receives and handles request, return to response message to main website, the address of oneself is put in response address field, makes main website know which is from standing in response.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 is all to complete with message form.Main website sends message and is called request, and slave station sends message and is called response.Message format is in table one
Modbus message format table one
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 Modbus message in the frame with known start bit and stop bit, just allow the slave station or the main website equipment that receive new frame to start to receive in the start bit of message, and know when ENMES point finishes.In table two
Modbus-RTU message frame form shfft two
6, Modbus--RTU message frame software flow pattern:
Specific implementation method is:
1) Modbus fieldbus DI~16 road monitor remote I/O control system connects and builds up, and slave station U1 has installed user's program.
2) working procedure, communications protocol and systematic parameter arrange, and register address distributes, and the Master Station Software communication function of request message is set up.
3) system powers on, original state clear memory, clear internal memory, and serial ports initialization, stops interrupting, and prepares to carry out data communication with main website request message.
4) accept main website request message frame, detect that " complete message frame " proceeds to sky and close after state and carry out CRC16 position calculation check, address diagnosis, function code judgement, when address carries out that 03H ROM (read-only memory) function, verification are correct, address errorless after.
5) slave station sends response message frame, log-on data gathers subroutine, CPU reads internal memory 16 way switch amount data, this tributary address is put in message frame, carry out the transmission of response message frame data, exchanges data, realize remote data I/O transmission, 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 characteristics:
1) complete message frame technology:
Modbus--RTU communication protocol frame code requirement: Modbus message is placed in the frame with known start bit and end point, allows the equipment that receives new frame to locate start to receive and know when ENMES point finishes in the start of message.Specify that start bit wanted for >=3.5 character times, interFrameGap is greater than 3.5 character times, and between two characters, interval is greater than 1.5 character times, 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 " specification just can enter message.These complete message frame normalized illustration message frame transmission data are to have: A +b -polarity, " 1 " " 0 " low and high level saltus step, every changes polarity, contains synchronous clock information, and the serial data coding of alternating voltage signal, ensures that communication data transmits accurately and reliably.
2) " uniqueness " technology of tributary address
It is unique that Modbus-RTU unicast mode requires tributary address, and transfer tributary address generation request message through main website address is diagnosed, slave station receives message address is diagnosed again, slave station sends response message address is diagnosed again, accepts slave station message address is diagnosed again to main website.Four diagnosis are carried out in an address.Main website is by tributary address is placed in message address field and finds slave station, and in the time that slave station returns to response, it is put into the address of oneself in response address field, to make main website know which addressing slave station responds.Ensure 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 software displacement method, each data in message frame (check bit does not participate in calculating for start bit, position of rest) are all carried out to the calculating of CRC16 position, result is deposited in register check territory, and CRC calculated value is appended in the CRC calculated value that sends message.Receiving the main website receiving when message or will recalculate crc value from station equipment, and calculated value is compared with the actual value receiving in crc field, as effective in two identical these frame messages of value, receive the message processing time in order to reduce, in the time receiving address field, just analyze and judge whether address is the address of this substation, CRC calculation check and addressing determine this tributary address to be carried out simultaneously, and when address, judgement is that while issuing this tributary address, this message frame is effective.If slave station detects the mistake in received frame under unicast mode, do not return to response to main website.Main website sends retry request at " response timeout ".
8, communication data consistency detection technology:
Detect the consistance of communication data by Modbus-RTU message frame main website, the actual measurement of slave station communication data.Test case data are as follows:
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:
Switch acquisition point 1 2 3 4 5 6 7 8
On-off state 1 1 1 0 1 0 0 0
Switch acquisition point 9 10 11 12 13 14 15 16
On-off state 0 0 0 1 0 0 0 0
In table, " 1 " is the switching value "on" position that powers on, and " 0 " is separating brake off-position.Communication actual measurement is artificial given on off state is 1110100000010000 in full accord with the contrast of communication switch amount image data.The requirement that meets all " necessary " in Modbus serial link protocol meets the consistency principle.
Three, Modbus fieldbus DI~16 road monitor remote I/O main website and slave station Modbus-RTU network system.
Concrete enforcement is to design by power automatic system scheme, and main website host computer links by MOXA multi-channel serial port and meets a, b, c, d as seen from Figure 7,5 fieldbus of e carry out on-the-spot I/O data acquisition and processing.A bus is connected in series the electricity of domestic south auspicious RCS96 series comprehensive relay protector product execution LFPbus bus 103 agreement collection site power equipments, analog quantity, switching value data, b bus is in order to ensure the technical manual of automated system response time, design adopts main website fieldbus and slave station multibus to carry out real-time Communication for Power mode or claims 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 used time 50ms of inquiry and are connected in series 50 DI-16 road slave stations and reach automatic technology specification GB/T 13730-92 and specify in used time≤3 second: remote signalling displacement is transferred to the technical stipulation of main station time≤3 second, in like manner A1-8 slave station collection analog data amount takies 150ms bus by 18 bytes and can be connected in series 30 slave stations, PI-8 is that pulse data collection completes electricity and calculates storage work, and data volume takies 250ms bus by 32 bytes and is connected in series 20 slave stations and can realizes remote measurement amount and be transferred to the regulation of main website≤3 second, c and d bus for the range of application of carrying out the intelligent instrument of Modbus-RTU bus or Schneider product and expand product, to be main website host computer adopt serial ports output DO multichannel and connect mode to the output of slave station imitation screen DO, AO e bus, realizes the control of system to imitation screen, response time≤2 second, and real-time pictures is called the technical stipulation of response time≤2 second.Host computer main website is and alarm can be by installing GCM wireless transceiver additional by the user mobile phone communication alarming of SIM card, and guarantee accident is processed in time.Balancing twisted-pair line screen layer should approach master station one side joint ground, and ground insulation resistance should meet 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 applying Modbus agreement RTU pattern realize Modbus main website with from station control system, the UO of main website sends the request Modbus-RTU of main website message frame to slave station DI-16 road PLC: through RS485 two-wire system A+B-serial ports J1 connection terminal U3 transceiving driver telecommunication circuit (5), and U8, U9, U10 transmitting-receiving message control circuit (4), slave station U1 microprocessor 89C52 read requests message frame; Slave station U1 response Modbus-RTU message frame; Slave station U1 subroutine Real-time Collection switching value data, through 1-16 way switch amount Acquisition Circuit (1), U4, U5, U6, U7 photoelectric coupling buffer circuit (2), slave station U1 sends response message frame, through U8-U10 transmitting-receiving message control circuit (4), U3 transceiving driver telecommunication circuit (5), J1 connection terminal, RS485 two-wire system A+B-serial ports enters main website U0 host computer and reads response message frame, realizes the overall process of Modbus fieldbus DI-16 road monitor remote I/O control system.
2. by Modbus fieldbus DI-16 road monitor remote I/O control system described in claim 1, it is characterized in that: it is unique that the U0 of 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 is also unique; It is unique that Modbus-RTU unicast mode requires tributary address, is by message frame communication process, access tributary address to be placed in message, and verification realizes repeatedly; When main website sends request message to slave station, the tributary address of access to be placed on and in message frame, carry out CRC16 bit check and proof test value is placed in message frame, slave station receives main website request message also will carry out CRC16 bit check to message frame, this proof test value and the proof test value that receives message are compared, when consistent, slave station just can respond and this tributary address is placed in response message and is sent, main website reception slave station response message carries out CRC16 bit check value again to be checked, so 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 CRC16 bit check 4 times, ensures that tributary address is unique, ensures communication data accurately and reliably.
3. by Modbus fieldbus DI-16 road monitor remote I/O control system described in claim 1, 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 message form---address, function code, data, CRC check, realize digital data exchange: Modbus message frame is that Modbus message is placed in the frame of known start bit and stop bit, main website sends request message frame, slave station sends response message frame and carries out message frame exchanges data, realize remote data I/O transmission, the data of message frame technique guarantee transmission are accurate.
4. by Modbus fieldbus DI-16 road monitor remote I/O control system described in claim 1, it is characterized in that: Modbus message frame not only will be placed in the frame of known start bit and stop bit and 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 reception or the transmission of message frame, and complete message frame transmission data have RS485A +b -1,0 low and high level saltus step, every changes polarity, contains synchronous clock information, and the string data coding of 28 16 systems of alternating voltage ensures that communication data transmits accurately and reliably.
5. by Modbus fieldbus DI-16 road monitor remote I/O control system described in claim 1, it is characterized in that:
DI-16 road monitor is software and hardware integration PLC product, and the data acquisition of DI-16 way switch amount is: the same and J of the switching value signal of enchashment field device 1connection terminal is physical connection one to one, through V cC112V dCpull-up resistor R11, R13, 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 photoelectric coupling triode are output as 0 low level, otherwise be output as high level 1, on-off value data acquisition is the data encoding that carrys out expression data 1 or 0 state with high and low level pulse signal, reads 2 byte binary switch amount data ram register storage in real time through slave station U1 microprocessor 89C52 pin P1.0~P1.7 and P2.0~P2.7; By C lingware programming subroutine, digital filtering, relatively judge and error correcting technique measure prevent out large number, wrong number, ensure that 10 data are reliable, light is separated with effect conducting, cut-off, prevents shake and noise.
6. by Modbus fieldbus DI-16 road monitor remote I/O control system described in claim 1, it is characterized in that, transmitting-receiving message control circuit: slave station U1 microprocessor 89C52 pin TXD, T0, RXD is connected with U8U9U10 transmitting-receiving message control circuit corresponding point, that is: U1 pin one 1P3.1TXD serial output U8 work transmission message is effective, it is effective that U1 pin one 0P3.0RXD serial output U10 work receives message, in the time that slave station U1 microprocessor 89C52 pin one 4P3.4TO serial output control sets low level 0, U9 work RE is low level, it is effective that the R0 of corresponding connection U3 transceiving driver telecommunication circuit RS~485 low-power consumption transceiver receives message, slave station U1 microprocessor 89C52RXD reads the main website request message data of serial input, otherwise, DE high level in the time that slave station U1T0P3.4 sets high level 1, it is effective that corresponding U3 transceiving driver telecommunication circuit D1 sends message, and slave station U1TXD sends response message, transmitting-receiving message control circuit, control output incoming message data, be connected with main website U0 host computer through RS485 two-wire system A+B-serial ports, J1 connection terminal, fieldbus, 9 pin 232/485 converters, main website U0 host computer reads slave station response message data, complete the character string that contains 28 figure place 16 systems and carry out the data communication of message frame, realize 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 CN102354175A (en) 2012-02-15
CN102354175B true 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)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338229B (en) * 2013-06-03 2016-04-27 深圳市宏电技术股份有限公司 The exchange method of remote terminal unit and data transmission unit and system
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
CN104601420A (en) * 2014-12-31 2015-05-06 江西清华泰豪三波电机有限公司 Method for flexibly reading power station data by utilizing Modbus
EP3070551B1 (en) * 2015-03-17 2018-04-25 Siemens Aktiengesellschaft Data bus coupler and method for operating
CN106707946A (en) * 2015-07-24 2017-05-24 中国石油天然气股份有限公司 Data line for communication between S7-200PLC and ACE3600RTU
CN105676757B (en) * 2015-12-22 2018-12-07 北京大唐兴业国际控制技术有限公司 A kind of BAC monitoring system
CN108153261B (en) * 2017-12-25 2020-07-14 杭州和利时自动化有限公司 Data interaction method and system
CN108965083B (en) * 2018-06-13 2020-09-18 四川川润液压润滑设备有限公司 Active interference resistant Modbus-RS485 communication program method
CN109743301B (en) * 2018-12-24 2021-03-16 武汉工程大学 Modbus protocol-based data receiving and transmitting system and method
CN109587022B (en) * 2019-01-31 2021-11-23 华夏世昌(北京)科技有限公司 Communication method of ignition drive bus IDBUS
CN112769666B (en) * 2019-10-21 2022-12-13 中电智能科技有限公司 PLC inter-station communication method
CN111708313B (en) * 2020-04-28 2021-11-09 北京骥远自动化技术有限公司 PLC system capable of realizing efficient transmission and data transmission method thereof
CN112311808B (en) * 2020-11-11 2023-03-21 上海电器科学研究所(集团)有限公司 Method for automatically mapping Modbus protocol data to OPCUA address space
CN114720761A (en) * 2022-04-08 2022-07-08 北京汇能精电科技股份有限公司 Configurable civil hybrid energy storage power supply data acquisition method and device
CN114800492A (en) * 2022-04-11 2022-07-29 深圳市大族机器人有限公司 Method, system, computer device and storage medium for controlling slave station terminal

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

Also Published As

Publication number Publication date
CN102354175A (en) 2012-02-15

Similar Documents

Publication Publication Date Title
CN102354175B (en) Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor
CN201354933Y (en) Automatic monitoring system of booster pump station based on PLC and Internet
CN102510127A (en) Method for unifying models of on-line monitored first and secondary equipment of power grid
CN101359029B (en) Single bus DC earth fault on-line automatic monitoring apparatus
CN104753085A (en) Remote online monitoring system for distributed photovoltaic access
CN206193123U (en) Distribution automation integration testing arrangement
CN206541430U (en) A kind of data capture management device based on cloud platform
CN106329720A (en) Detecting and debugging method for reconstruction and extension project secondary system for intelligent substation
WO2015149594A1 (en) Iec61850-based communication simulation method for partial discharge on-line monitoring device
CN103676661B (en) Multifunction emulation verifies system and its emulation verification method
WO2015149596A1 (en) Iec61850-based communication simulation method for leakage current on-line monitoring device
CN103236745A (en) Distinguishing method of misreported remote signaling and correct remote signaling of transformer substation
WO2015149595A1 (en) Iec61850-based communication simulation method for insulation on-line monitoring device
CN110084946A (en) A kind of system and method that five-defence block is used for based on wearable device
CN104580245A (en) Power distribution terminal 104 message parsing system and parsing method thereof
CN105204429A (en) Industrial multiple-parameter data remote transmission device
CN109243239A (en) Track traffic electric power monitoring system simulation and training platform
CN203799242U (en) Fieldbus technology-based 6kV high-voltage electrical equipment control system
CN205123412U (en) Intelligence online running of transformer substation keeps watch on and long -range maintenance system
CN202230360U (en) Remote I/O control system for Modbus fieldbus DI-16-path monitor
CN110611312A (en) On-line simulation system and method for panoramic data of substation bay level
CN102710025B (en) Power system communication device and method
CN204028696U (en) Testing device and system for air conditioner wire controller
CN100470976C (en) Integrated automation converting station debugging apparatus
CN205899894U (en) Use emulation intelligent ammeter's trouble analogue means

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20141015

Termination date: 20150801

EXPY Termination of patent right or utility model