Summary of the invention
The present invention is directed to slave station in the existing control system based on EtherCAT bus utilizes the direct IO driving force of the special chip ET1100 of EtherCAT slave station to realize remote I/O expansion, cause the defect that IO Interface Expanding is limited in one's ability, system cost is high and the refresh cycle of EtherCAT bus is long, a kind of dcs based on EtherCAT bus is provided, in each slave station, realize the expansion of a plurality of distributed I/O data modules, promote the IO extended capability of single slave station, and then reduce overall system cost, shorten the refresh cycle of EtherCAT bus.
The technical scheme that the present invention solves its technical matters employing is: a kind of dcs based on EtherCAT bus is provided, comprise main website and a plurality of slave station, each slave station is all connected with a plurality of field apparatuss, each slave station comprises a plurality of input/output modules of connection corresponding to described a plurality of field apparatuss respectively and the slave station control module being connected with described a plurality of input/output modules, the slave station control module of each slave station is connected by EtherCAT bus, and the integral body after series connection is connected with described main website by EtherCAT bus; Described slave station control module is for gathering successively the information of described a plurality of field apparatuss according to certain sequential by described a plurality of input/output modules, and described main website will be sent to after the Information encapsulation of a plurality of field apparatuss that collect, the control information that described slave station control module also sends for receiving described main website, described control information is processed, and the control information after processing is exported to a plurality of input/output modules successively according to certain sequential, correspondingly to control a plurality of field apparatus actions.
Preferably, described slave station control module comprises:
Field apparatus control module, for gathering successively the information of described a plurality of field apparatuss by described a plurality of input/output modules according to certain sequential, and will after the Information encapsulation of a plurality of field apparatuss that collect, export, also for described control information is processed, and the control information after processing is exported to a plurality of input/output modules successively according to certain sequential, correspondingly to control a plurality of field apparatus actions;
Slave station interface unit, for receiving the information of a plurality of field apparatuss after encapsulation, and sends it to described main website, the control information also sending for receiving described main website, and described control information is sent to described field apparatus control module.
Preferably, described field apparatus control module comprises:
Protocol conversion subelement, the control information sending for receiving described slave station interface unit, and this control information is carried out exporting after protocol conversion;
Field apparatus is controlled subelement, for the control information after receiving agreement and turning, and to its identify and classify after according to certain sequential, export successively a plurality of input/output modules, correspondingly to control a plurality of field apparatus actions, also for the sequential according to certain, by a plurality of input/output modules, gather successively the information of a plurality of field apparatuss, and the information of a plurality of field apparatuss that collect is sent to described protocol conversion subelement;
Described protocol conversion subelement also for described field apparatus is controlled to the information of a plurality of field apparatuss that subelement collects encapsulates and protocol conversion after output to described slave station interface unit.
Preferably, described field apparatus control subelement is connected with described a plurality of input/output modules by spi bus.
Preferably, described field apparatus control subelement is connected with described protocol conversion subelement by parallel bus.
Preferably, described protocol conversion subelement is connected with described slave station interface unit by parallel bus.
Preferably, described slave station interface unit comprises ET1100 chip.
Preferably, described field apparatus control subelement comprises programmable logic chip.
Preferably, described protocol conversion subelement comprises programmable logic chip or microprocessor.
Preferably, the information of described a plurality of field apparatuss comprises status information and the operational factor of described a plurality of field apparatuss.
Dcs based on EtherCAT bus of the present invention has following beneficial effect: based on EtherCAT bus, realize remote I/O and control, adopt slave station control module to realize the expansion of a plurality of distributed IO modules, greatly promoted the IO extended capability of single EtherCAT slave station, reduced the overall size structure of system, reduce the cost of system, shortened the refresh cycle of EtherCAT bus.
Embodiment
Below in conjunction with drawings and Examples the present invention will be further explained explanation.
Fig. 2 is the structural representation of dcs 200 first embodiment based on EtherCAT bus of the present invention, as shown in Figure 2, in the present embodiment, dcs 200 comprises main website 210 and a plurality of slave station 220, and each slave station 220 is all connected with a plurality of field apparatuss 230.
Each slave station 220 comprises a slave station control module 222 and a plurality of input/output module.The slave station control module 222 of each slave station 220 is connected by EtherCAT bus, and the integral body after series connection connects main website 210 by EtherCAT bus.In each slave station 220, slave station control module 222 is connected with a plurality of input/output modules (IO module) 221, and a plurality of IO modules 221 are connected with a plurality of field apparatuss 230 respectively.Main website 210 carries out the control (prior art) of refreshing of exterior I O data and field apparatus one by one according to certain sequential to a plurality of slave stations 220.
Slave station control module 222 comprises suitable circuit, logic and/or code, for gathering successively the information of a plurality of field apparatuss 230 by a plurality of IO modules 221 according to the sequential of self-defining internal extended agreement indication, that is to say synchronization, slave station control module 222 can only gather by an IO module 221 information of the field apparatus 230 being connected with this IO module 221.What wherein, 221 of IO modules can receive is the analog signals of digital quantity signal or voltage/current.Field apparatus 230 is the concept of a broad sense, it comprise there is the equipment (such as switch, relay etc.) of input/output signal, special-purpose collecting device (as sensor) and peripheral drive module.Particularly, load module in I0 module 221 has the information of the equipment of input/output signal by collecting device collection, the information with the equipment of input/output signal comprises status information and operational factor, status information can be the information such as normal, abnormal or warning, and operational factor can be temperature, pressure, potential of hydrogen etc.The control signal that output module in I0 module 221 sends main website 210 sends to peripheral drive module, after peripheral drive module is carried out signal conversion, amplification to control signal and/or gone interference, drive the equipment with input/output signal to move accordingly.Slave station control module 222 will send to main website 210 after the Information encapsulation of a plurality of field apparatuss 230 that collect.The information of a plurality of field apparatuss 230 that 210 pairs of main websites receive is analyzed and is processed, and correspondingly generates control signal and sends to slave station control module 222.
The control information that slave station control module 222 also sends for receiving main website 210, the control information that identification receives, and the field apparatus 230 that the control information receiving will be controlled according to it is classified, then according to the sequential of self-defining internal extended agreement indication, to a plurality of IO modules 221, export corresponding control signal successively, thereby correspondingly control a plurality of field apparatuss 230 actions.
A plurality of IO modules 221 can be connected with slave station control module 222 by spi bus, and slave station control module 222 also needs first the control information receiving to be carried out to protocol conversion, then, it being identified and classifying, then export IO module 221.In addition, slave station control module 222 will send to main website 210 after the Information encapsulation of a plurality of field apparatuss 230 that collect and protocol conversion.
In the present embodiment, the slave station of dcs 200 is exported control signals to a plurality of IO modules 222 by slave station control module 222 successively according to the sequential of its self-defining internal extended agreement indication, and the information that gathers a plurality of field apparatuss 230 by a plurality of IO modules 222, realized the distributed I/O expansion of EtherCAT slave station, strengthened the extended capability of EtherCAT slave station remote I/O, reduce the one-piece construction scale of system, reduced the cost of system.In addition, when the scale of system huger, when the remote I/O interface quantity that needs is more, can satisfy the demands by increasing the mode of quantity of the IO module of EtherCAT slave station, control well the quantity of EtherCAT slave station in system, effectively controlled the length of EtherCAT bus refresh cycle.
Fig. 3 is the structural representation of dcs 200 second embodiment based on EtherCAT bus of the present invention, as shown in Figure 3, the difference of the present embodiment and the first embodiment is, slave station control module 222 comprises field apparatus control module 2221 and slave station interface unit 2222.
Wherein, field apparatus control module 2221 gathers the information of a plurality of field apparatuss 230 successively for the sequential according to certain by a plurality of IO modules 221, and will after the Information encapsulation of a plurality of field apparatuss 230 that collect, outputing to slave station interface unit 2222, slave station interface unit 2222 sends to main website 210 by the information of a plurality of field apparatuss 230 after the encapsulation receiving.Main website 210 receives the information of a plurality of field apparatuss 230 after the encapsulation that each slave station interface unit 2222 sends successively according to certain sequential, and it is analyzed and is processed, generate corresponding control signal, then according to certain sequential, successively control signal is sent to corresponding slave station interface unit 2222.
Slave station interface unit 2222 sends to field apparatus control module 2221 by the control signal receiving, 2221 pairs of control signals of field apparatus control module are identified, and 230 pairs of control signals of the field apparatus that will control according to control signal are classified, then according to the sequential of self-defining internal extended agreement indication, to a plurality of IO modules 221, export corresponding control signal successively, thereby correspondingly control a plurality of field apparatuss 230 actions.
In the present embodiment, field apparatus control module 2221 can be connected with slave station interface unit 2222 by parallel bus, and field apparatus control module 2221 can be connected with a plurality of IO modules 221 by spi bus.Now, field apparatus control module 2221 also needs first the control information receiving to be carried out it being identified again and classifying after protocol conversion, then exports IO module 221.In addition, field apparatus control module 2221 encapsulates the information of a plurality of field apparatuss 230 that collect and protocol conversion after send to slave station interface unit 2222.
In the present embodiment, slave station interface unit 2222 can be realized by slave station special chip ET1100, and it is responsible for realizing main website 210 and communicates by letter with the EtherCAT of slave station 220, thereby realizes the Refresh Data that main website 210 controls slave station 220.Field apparatus control module 2221 can be realized by Micro-processor MCV, scheduling and the conversion of slave station data have been responsible for, the control information of the EtherCAT frame form on the one hand main website 210 being sent is carried out after agreement turns identifying and classifying, finally correspondingly export a plurality of IO modules 221, thereby realize refreshing of outside expansion output, on the other hand, the outside expansion input quantity (information of a plurality of field apparatuss 230) gathering is encapsulated, after protocol conversion, send to ET1100, then by ET1100, by EtherCAT bus, send to main website 210, thereby realize the extensive expansion of slave station 220 distributed I/O.
Fig. 4 is the structural representation of the 3rd embodiment of the dcs 200 based on EtherCAT bus of the present invention, as shown in Figure 4, the difference of the present embodiment and the second embodiment is, field apparatus control module 2221 comprises that protocol conversion subelement 2221-1 and field apparatus control subelement 2221-2.
Wherein, field apparatus is controlled subelement 2221-2 for gathering the information of a plurality of field apparatuss 230 by a plurality of IO modules 221 successively according to the sequential of its self-defining internal extended agreement indication, and the information of a plurality of field apparatuss 230 that collect is sent to protocol conversion subelement 2221-1.Protocol conversion subelement 2221-1 the information of a plurality of field apparatuss 230 that receive is encapsulated and protocol conversion after export slave station interface unit 2222.By slave station interface unit 2222, by EtherCAT bus, send to main website 210 again.
The control information that protocol conversion subelement 2221-1 sends for receiving slave station interface unit 2222, and this control information is carried out exporting field apparatus control subelement 2221-2 after protocol conversion.The control information that field apparatus is controlled after subelement 2221-2 turns the agreement receiving is identified, then the 230 pairs of control informations of field apparatus that will control according to control information are classified, then according to the sequential of self-defining internal extended agreement indication, to a plurality of IO modules 221, export corresponding control information successively, correspondingly to control a plurality of field apparatuss 230 actions.
Referring to Fig. 5, in the present embodiment, slave station interface unit 2222 is realized by EtherCAT slave station special chip ET1100, and ET1100 chip is responsible for the EtherCAT communication of slave station 220Yu main website 210, thereby realizes the IO Refresh Data that main website 210 controls slave station 220.Field apparatus is controlled subelement 2221-2 and can be realized by programmable logic chip, for example, by CPLD (Complex Programmable Logic Device, CPLD) realize, CPLD is as the processing unit of local Extended Protocol, be responsible for the dissection process of self-defining internal extended agreement, realized the expansion of the local IO of slave station.Protocol conversion subelement 2221-1 can realize by programmable logic chip or Micro-processor MCV, when adopting MCU, MCU is as the core processor of slave station 220, act as the two mutual intermediary of ET1100 and CPLD, scheduling and the conversion of slave station data message have been responsible for, the EtherCAT frame information (control information) that the main website 210 on the one hand ET1100 being received sends carries out issuing CPLD after protocol conversion, by CPLD, realizes refreshing of outside expansion output; On the other hand, the outside expansion input quantity (information of a plurality of field apparatuss 230 of collection) that CPLD is sent encapsulates, send to ET1100 after protocol conversion, then by ET1100, by EtherCAT bus, send to main website 210, thereby realize the extensive expansion of slave station 220 distributed I/O.The field apparatus that in Fig. 5, each IO module connects is not identical, is illustrated as simple method for expressing.
In the present embodiment, ET1100 is connected with MCU by parallel bus with CPLD.Slave station 220 is realized the expansion of distributed I/O by CPLD chip, distributed I/O is connected on CPLD chip in the mode of IO module 221, between the distributed IO module 221 of each expansion of CPLD and slave station 220, mode by spi bus connects communication, data protocol has adopted the Extended Protocol of CPLD inside, this agreement is self-defined Extended Protocol, and CPLD, by the self-defined Extended Protocol of this inside, can realize the dissection process to the distributed I/O data of outside expansion.Therefore, slave station 220 can be expanded a plurality of distributed IO modules 221, and the IO extended capability of single slave station far surpasses 32 IO points of the conventional control system based on EtherCAT bus shown in Fig. 1.
The dcs based on EtherCAT bus 200 of the present embodiment, based on EtherCAT bus, realizing remote I/O controls, compare with the conventional control system based on EtherCAT bus shown in Fig. 1, the slave station 220 of dcs 200 is not used ET1100 directly to control the mode of IO, but the structure of employing ET1100, MCU and CPLD combination realizes a large amount of expansions of remote distributed IO.And slave station 220 is used self-defining Extended Protocol, passes through spi bus, realize the expansion of a plurality of distributed IO modules 221, greatly promote the IO extended capability of the single EtherCAT slave station of knowing clearly, reduced the overall size structure of system, reduced the cost of system.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in claim scope of the present invention.