The protocol conversion module of Devicenet and Modbus and intelligent breaker
Technical field
The utility model belongs to the intelligent breaker technical field, is specifically related to protocol conversion module and the intelligent breaker of a kind of Devicenet and Modbus.
Background technology
Devicenet is a kind of style of opening, the low cost that meets global industrial standard, the high performance communication network based on CAN (Controller Area Network) technology that grows up the mid-90, at first by U.S. Rockwell company Application and Development.
Devicenet has now become international standard IEC62026-3 " low voltage switch equipment and opertaing device Control Unit Device Interface ", and has been listed in European standard, also is the facility network standard in actual Asia and America.In October, 2002, DeviceNet was approved for CNS GB/T18858.3-2002, and in 2003.4.1 enforcement.
At present, the Devicenet technology belongs to " open DeviceNet manufacturer association " ODVA and organizes all and promote.ODVA has the member (as Rockwell, ABB, Omron etc.) of the manufacturer of tame famous automation equipment more than 300 at world wide.The ODVA of China tissue is just actively promoted this technology at present by Shanghai Electric Appliances Science Inst's establishment of taking the lead
[70-72]
Devicenet is a kind of communication bus cheaply.It is connected to network with commercial unit (as: limit switch, photoelectric sensor, valve group, motor starting device, process sensor, barcode reader, variable frequency drives, panel display and operator interface), thereby has eliminated expensive hardwire cost.The direct interconnection property improvement communication of equipment room, and provide considerable device level diagnostic function simultaneously, this is difficult to realize by hardwire I/O interface.
Devicenet is a kind of simple Networking Solutions ﹠ provisioned, and it has reduced cost and the time of distribution and mounting industrial automation equipment when providing multiple vendor with the interchangeability between base part.DeviceNet not only makes between the equipment and is connected to each other and communication with a cable, the more important thing is that it gives the diagnostic function of the device level that system brings.This function is to be difficult to realize at traditional I/O.
Devicenet is the network standard of an opening.Standard and agreement all are open, when the supplier connects devices to system, need not to be hardware, and software or mandate are paid.Anyly can obtain the DeviceNet standard from open DeciceNet supplier association (ODVA) to the interested tissue of DeviceNet technology or individual, and can add ODVA, participate in the technical work group that the DeviceNet standard is augmented
[73]
The numerous characteristics of Devicenet follows in CAN, and the CAN bus is a kind of design excellent communications bus, and it is mainly used in real-time Transmission control data.The principal feature of DeviceNet is: short frame transmission, and the maximum data of every frame is 8 bytes; Nondestructive arbitration technique by turn; Network can connect 64 nodes at most; Data transmission bauds is 125kb/s, 250kb/s, 500kb/s; Point-to-point, lead or master/slave communication mode more; Adopt the physical and datalink layer stipulations of CAN.
Than Devicenet, many limitation that Modbus bus itself exists, be mainly reflected in that efficient is low, the real-time of system is poor, reliability communication is low, later maintenance cost is high, the network engineering debugging is complicated, transmission range node undesirable, that unibus can articulate is few, use dumb etc.
But in the application of industrial field bus, the RS485 that the Modbus agreement is used slightly has superiority on hardware cost and development difficulty, still is widely used at home, is unpractical so abandon the Modbus bus fully in present stage.Thereby press for a kind of Modbus agreement in actual applications to the transitional product of Devicenet protocol conversion.
The utility model content
The purpose of this utility model provides the protocol conversion module that a kind of user of making can monitor in real time and control Modbus equipment by the Devicenet bus.
Another purpose of the present utility model provides and makes the user can be by the Devicenet bus to its intelligent breaker of monitoring in real time and controlling.
The technical scheme that realizes first purpose of the utility model is: the protocol conversion module of a kind of Devicenet and Modbus, comprise successively the CAN bus transceiver, optocoupler, CAN controller, single-chip microcomputer, the Modbus bus transceiver that link to each other, and the address that links to each other with single-chip microcomputer and baud rate arrange fork shift switch and network state pilot lamp.
In the such scheme, also comprise LCDs and debugging button.
The technical scheme that realizes second purpose of the utility model is: the intelligent breaker of the protocol conversion module of a kind of Devicenet of having and Modbus comprises the protocol conversion module of breaker of plastic casing body, long-range action actuating mechanism and Devicenet and Modbus; The breaker of plastic casing body comprises base and loam cake; Described Devicenet comprises CAN bus transceiver, optocoupler, CAN controller, single-chip microcomputer, the Modbus bus transceiver that links to each other successively with the protocol conversion module of Modbus, and the address that links to each other with single-chip microcomputer and baud rate arrange fork shift switch and network state pilot lamp.
In the such scheme, shown in indicating member comprise LCDs and the debugging button; The loam cake of described breaker of plastic casing body comprises panel and sidewall, and this panel and sidewall are provided with a breach, and the protocol conversion module of described Devicenet and Modbus is arranged in this breach.
In the such scheme, the side that the protocol conversion module of described Devicenet and Modbus is positioned at the loam cake inboard is provided with the Modbus communication interface, another side of the protocol conversion module of described Devicenet and Modbus exposes loam cake, and this side is provided with the Devicenet communication interface.
The structure of protocol conversion module is comparatively rationally simplified in the utility model, and it is less to take up room, and performance is comparatively reliable and stable.Intelligent breaker in the utility model is owing to be provided with the protocol conversion module of Devicenet and Modbus, make the user to monitor in real time and to control it by the Devicenet bus, its scope of application can either be expanded, hardware cost and development difficulty can also be effectively reduced.
Description of drawings
Fig. 1 is a kind of circuit structure block diagram of protocol conversion module in the utility model;
Fig. 2 is the main program flow chart of protocol conversion module shown in Figure 1;
Fig. 3 is a kind of perspective view of first kind of structure of intelligent breaker in the utility model;
Fig. 4 is a kind of perspective view of protocol translation module in the intelligent breaker shown in Figure 3;
A kind of perspective view of Fig. 5 when to be protocol translation module shown in Figure 4 from another angle observe;
Fig. 6 is a kind of perspective view of second kind of structure of intelligent breaker in the utility model;
Fig. 7 is a kind of perspective view of protocol translation module in the intelligent breaker shown in Figure 6;
A kind of perspective view of Fig. 8 when to be protocol translation module shown in Figure 7 from another angle observe.
Embodiment
(embodiment 1, protocol conversion module)
Fig. 1 to Fig. 2 has shown a kind of embodiment of protocol conversion module in the utility model, and wherein Fig. 1 is a kind of circuit structure block diagram of protocol conversion module in the utility model, and Fig. 2 is the main program flow chart of protocol conversion module shown in Figure 1.
Present embodiment is the protocol conversion module of a kind of Devicenet and Modbus, comprise successively the CAN bus transceiver, optocoupler, CAN controller, single-chip microcomputer, the Modbus bus transceiver that link to each other, and the address that links to each other with single-chip microcomputer and baud rate arrange fork shift switch and network state pilot lamp.
The function of present embodiment is exactly the order that the command message of DeviceNet form is converted to the Modbus message, passes to the Modbus equipment of bottom then; Equipment is responded the response message of giving protocol conversion module Modbus form after receiving the Modbus order, be converted to DeviceNet form message finally by protocol conversion module and pass to the DeviceNet main website.On function, this protocol conversion module on the one hand receives the main website order as the slave station of DeviceNet and responds; On the other hand, it sends the data of order and receiving equipment response again to Modbus equipment as the Modbus main website.According to the functional requirement of protocol conversion module, built hardware configuration, mainly formed by master controller single-chip microcomputer, DeviceNet communication interface circuit, Modbus communication interface circuit, parameter setting circuit and power circuit.
According to the design to the protocol converter hardware circuit, this report mainly adopts the method for interruption to realize the transmitting-receiving of two kinds of messages and the conversion between the message thereof.Therefore, software integral body mainly comprises the master routine of system and the initialization section of interrupt handling routine and system
[78-79]Wherein interrupt handling routine comprises two parts again, is respectively DeviceNet packet sending and receiving interrupt handling routine, and this interruption is triggered by external interrupt.A part is Modbus packet sending and receiving processing section in addition, and this interruption is carried out by the serial break in service.
The protocol conversion module program operation process is: after the start-up system, and at first initialization whole software system; After detecting through repetition MAC ID, whether decision-making system reaches the standard grade; Main website will send to system and not connect explicit information to connect afterwards; After connecting foundation, main website just can communicate by letter normally with protocol conversion module.When main website sends to from request message of node, protocol conversion module is resolved this request message at once, and detect this order and whether issue oneself, if, then receiving command message, CAN receives and interrupts producing simultaneously.Interrupt handling routine will be stored in request message in the different buffer zones according to the difference of type message and go, and the type of message is to judge according to the message identifier that receives, and with message receiving flag set, gets back in the master routine at last then.Master routine will call corresponding different subroutine processing functions according to the type of different messages and handle this message.If the data that main website obtains are the information about Modbus equipment, then the DeviceNet message is converted to corresponding Modbus request message, issue Modbus equipment then.After Modbus equipment is received the Modbus request command, correctly respond the Modbus data and give protocol conversion module, the data that protocol conversion module is responded Modbus are converted to the DeviceNet message data and leave in the transmission buffer zone, and will send flag set.If obtain the attribute of sign object, so directly the property value of the sign object class that will obtain is put in the transmission buffer zone, and will sends flag set.Get back to master routine at last, master routine detects the transmission flag set, calls the transmission subroutine data are sent to main website.So far, just finished the exchange of DeviceNet main website and Modbus device data.
(embodiment 2, protocol conversion module)
Present embodiment is substantially the same manner as Example 1, and difference is: shown in indicating member also comprise LCDs and the debugging button.
(embodiment 3, intelligent breaker)
Fig. 3 to Fig. 5 has shown a kind of embodiment of intelligent breaker in the utility model, wherein Fig. 3 is a kind of perspective view of first kind of structure of intelligent breaker in the utility model, and Fig. 4 is a kind of perspective view of protocol translation module in the intelligent breaker shown in Figure 3; A kind of perspective view of Fig. 5 when to be protocol translation module shown in Figure 4 from another angle observe.
Present embodiment is a kind of intelligent plastic housing isolating switch that adopts above-described embodiment 2 to make, and sees Fig. 3 to Fig. 5, comprises breaker of plastic casing body 1, long-range action actuating mechanism (be positioned within the loam cake, do not draw on the figure) and embodiment 1 described protocol conversion module 2; The breaker of plastic casing body comprises base 11 and loam cake 12.
Protocol conversion module 2 comprises LCDs 21, debugging button 22 and two pilot lamp 23 (the locations of structures design of power interface and toggle switch belongs to those skilled in the art's common practise, and Gu Tushang does not draw); The loam cake of described breaker of plastic casing body comprises panel 121 and sidewall 122, and this panel and sidewall are provided with a breach 123, and described protocol conversion module is arranged in this breach.Described sidewall is provided with two guide runners 13 in the breach both sides, the both sides of the housing of described protocol conversion module respectively are provided with a guide chute 24, described protocol conversion module inserts the described breach from outside to inside from the outside of sidewall, and described guide runner 13 is arranged in guide chute 24.In concrete practice, the shape of described guide runner 13 and guide chute 24 and particular location can conversion, but all belong within the protection domain of the present utility model.
LCDs in the present embodiment not only can be used for display working condition, can also carry out data to it by the debugging button and preset, adjusts and check, effectively widens its range of application.
The side that described protocol conversion module is positioned at the loam cake inboard is provided with Modbus communication interface 26, and another side of described protocol conversion module exposes the sidewall of loam cake, and equal with sidewall, and this side is provided with Devicenet communication interface 27.
In the present embodiment, be fixed with a Modbus communication inserting terminal in the described loam cake, when inserting breach under the position-limiting action of described protocol conversion module at guide runner, its inboard Modbus communication interface is inserted in this Modbus communication inserting terminal.Also be provided with fastening screw 25 on the protocol conversion module in the present embodiment, each fastening screw is telescopic to be arranged on the protocol conversion module housing, in the described loam cake or sidewall be provided with the pilot hole that matches with each fastening screw, when each fastening screw indentation, insert in the corresponding pilot hole its bottom, thereby protocol conversion module is positioned in the breach.After pressing once each fastening screw again, fastening screw then ejects from pilot hole, thereby can dismantle this protocol conversion module.
(embodiment 4, intelligent breaker)
Fig. 6 to Fig. 8 has shown the another kind of embodiment of intelligent breaker in the utility model, wherein Fig. 6 is a kind of perspective view of second kind of structure of intelligent breaker in the utility model, and Fig. 7 is a kind of perspective view of protocol translation module in the intelligent breaker shown in Figure 6; A kind of perspective view of Fig. 8 when to be protocol translation module shown in Figure 7 from another angle observe.
Present embodiment is substantially the same manner as Example 3, difference is: see Fig. 6 to Fig. 8, the outboard end that described agreement is changed the revolving die piece stretches out the loam cake sidewall, and each side that stretches out loam cake sidewall sections housing is equipped with Devicenet communication interface 27, this be because, if as embodiment 3, external Devicenet communication inserting terminal is inserted along the direction vertical with the loam cake sidewall, so adjacent electrical equipment must be abdicated the space for this reason; This structure of present embodiment can be so that external Devicenet communication inserting terminal can take up room thereby reduce integral body along inserting Devicenet communication interface 27 with the direction of loam cake parallel sidewalls.In addition, the fastening screw in the present embodiment 25 has also been adjusted the position thereupon.
Obviously, above-described embodiment of the present utility model only is for the utility model example clearly is described, and is not to be restriction to embodiment of the present utility model.For those of ordinary skill in the field, can also make other changes in different forms on the basis of the above description.Here need not also can't give all embodiments exhaustive.And these belong to apparent variation or the change that connotation of the present utility model extends out and still belong to protection domain of the present utility model.