Background technology
EtherCAT is open real-time ethernet network communications protocol, for new standard is set up in the real-time performance of system and the dirigibility of topology.At current industrial circle, EtherCAT bus, as a kind of high performance bus, is widely used in on-the-spot high speed data transfer.
Fig. 1 is the conventional control system based on EtherCAT bus, and as shown in Figure 1, control system comprises an EtherCAT main website and multiple EtherCAT slave station.Multiple EtherCAT slave station is connected by EtherCAT bus, entirety after series connection is by EtherCAT bus access EtherCAT main website, each EtherCAT slave station comprises slave station special chip ET110, ET110 comprises 32 external procedure data-interface PDI, each external procedure data-interface PDI uses as an I/O interface, by being connected with a field apparatus after input and output isolated location.
EtherCAT main website is by periodically accessing each EtherCAT slave station, and the input and output realizing EtherCAT slave station I/O data refresh.In this control system, utilize the direct IO driving force of the special chip ET1100 of EtherCAT slave station to realize remote I/O expansion, external procedure data-interface PDI by ET1100 directly uses as I/O interface, so, in existing control system, 32 I/O interface can be realized by 32 of an ET1100 external procedure data-interface PDI at most, directly connect and drive I/O signal.
In the control system based on EtherCAT bus of the routine shown in Fig. 1, the structure of system is comparatively simple, and each EtherCAT slave station only needs an ET1100 chip just can realize the refreshing of exterior I O data as acp chip.But each EtherCAT slave station can only have at most 32 I/O interface, connect 32 exterior I O signals, IO extended capability is very limited.When the scale of system is huger, when the remote I/O interface quantity of needs is more, the EtherCAT slave station number set up is needed also to strain many mutually.And each EtherCAT slave station must comprise the higher ET1100 chip of a price, by causing, the utilization factor of ET1100 chip is low and system cost is high for this.In addition, EtherCAT master station needs to access each EtherCAT slave station one by one, if the quantity of EtherCAT slave station is large, by directly causing, the refresh cycle of EtherCAT bus is long.
Summary of the invention
The present invention is directed to existing based on slave station in the control system of EtherCAT bus utilize the direct IO driving force of the special chip ET1100 of EtherCAT slave station realize remote I/O expansion, cause the defect that I/O interface extended capability is limited, system cost is high and the refresh cycle of EtherCAT bus is long, a kind of dcs based on EtherCAT bus is provided, the expansion of multiple distributed I/O data module is realized in each slave station, 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 the employing of its technical matters is: provide a kind of dcs based on EtherCAT bus, comprise main website and multiple slave station, each slave station is all connected with multiple field apparatus, each slave station comprises the multiple input/output module that connect corresponding to described multiple field apparatus and the slave station control module be connected with described multiple input/output module respectively, the slave station control module of each slave station is connected by EtherCAT bus, and the entirety after series connection is connected with described main website by EtherCAT bus; Described slave station control module is used for the information being gathered described multiple field apparatus according to certain sequential successively by described multiple input/output module, and be sent to described main website by after the Information encapsulation of the multiple field apparatuss collected, described slave station control module is also for receiving the control information that described main website sends, described control information is processed, and the control information after process is outputted to multiple input/output module according to certain sequential, successively correspondingly to control multiple field apparatus action;
Described slave station control module comprises:
Field apparatus control module, for being gathered the information of described multiple field apparatus successively by described multiple input/output module according to certain sequential, and export after the Information encapsulation of the multiple field apparatuss collected, also for processing described control information, and the control information after process is outputted to multiple input/output module according to certain sequential, successively correspondingly to control multiple field apparatus action;
Slave station interface unit, for receiving the information of the multiple field apparatuss after encapsulation, and sends it to described main website, also for receiving the control information that described main website sends, and described control information is sent to described field apparatus control module;
Described field apparatus comprises the equipment with input/output signal, special collecting device and peripheral drive module.
Preferably, described field apparatus control module comprises:
Protocol conversion subelement, for receiving the control information that described slave station interface unit sends, and exports after carrying out protocol conversion to this control information;
Field apparatus controls subelement, for receive agreement turn after control information, and it is identified and outputs to multiple input/output module successively according to certain sequential after classifying, correspondingly to control multiple field apparatus action, also for being gathered the information of multiple field apparatus successively by multiple input/output module according to certain sequential, and the information of the multiple field apparatuss collected is sent to described protocol conversion subelement;
The information of described protocol conversion subelement also for controlling multiple field apparatuss that subelement collects to described field apparatus encapsulates and outputs to after protocol conversion described slave station interface unit.
Preferably, described field apparatus control subelement is connected with described multiple input/output module 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 multiple field apparatus comprises status information and the operational factor of described multiple field apparatus.
Dcs based on EtherCAT bus of the present invention has following beneficial effect: realize remote I/O based on EtherCAT bus and control, slave station control module is adopted to realize the expansion of multiple distributed I/O module, greatly improve the IO extended capability of single EtherCAT slave station, reduce the overall size structure of system, reduce the cost of system, shorten 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 multiple slave station 220, and each slave station 220 is all connected with multiple field apparatus 230.
Each slave station 220 comprises a slave station control module 222 and multiple input/output module.The slave station control module 222 of each slave station 220 is connected by EtherCAT bus, and the entirety after series connection connects main website 210 by EtherCAT bus.In each slave station 220, slave station control module 222 is connected with multiple input/output module (I/O module) 221, and multiple I/O module 221 is connected with multiple field apparatus 230 respectively.Main website 210 carries out the refreshing of exterior I O data and the control (prior art) of field apparatus to multiple slave station 220 one by one according to certain sequential.
Slave station control module 222 comprises suitable circuit, logic and/or code, for being gathered the information of multiple field apparatus 230 successively by multiple I/O module 221 according to the sequential of self-defining internal extended agreement instruction, that is synchronization, the information of the field apparatus 230 that slave station control module 222 can only be connected with this I/O module 221 by I/O module 221 collection.Wherein, the analog signals of what I/O module 221 can receive is digital quantity signal or voltage/current.Field apparatus 230 is the concept of a broad sense, and it comprises the equipment (such as switch, relay etc.) with input/output signal, special 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 normal, abnormal or the information such as warning, and operational factor can be temperature, pressure, potential of hydrogen etc.The control signal that main website 210 sends is sent to peripheral drive module by the output module in I0 module 221, after peripheral drive module is carried out signal conversion, amplification to control signal and/or gone interference, the equipment with input/output signal is driven to carry out corresponding action.Slave station control module 222 is sent to main website 210 by after the Information encapsulation of the multiple field apparatuss 230 collected.The information of main website 210 to the multiple field apparatuss 230 received carries out treatment and analysis, correspondingly generates control signal and is sent to slave station control module 222.
Slave station control module 222 is also for receiving the control information that main website 210 sends, identify the control information received, and the field apparatus 230 that the control information received will control according to it is classified, then export corresponding control signal to multiple I/O module 221 successively according to the sequential of self-defining internal extended agreement instruction, thus correspondingly control the action of multiple field apparatus 230.
Multiple I/O module 221 can be connected with slave station control module 222 by spi bus, and slave station control module 222 also needs first to carry out protocol conversion to the control information received, and is then identifying it and is classifying, and then exports I/O module 221.In addition, slave station control module 222 is sent to main website 210 by after the Information encapsulation of the multiple field apparatuss 230 collected and protocol conversion.
In the present embodiment, the slave station of dcs 200 exports control signal to multiple I/O module 222 by slave station control module 222 successively according to the sequential of its self-defining internal extended agreement instruction, and the information of multiple field apparatus 230 is gathered by multiple I/O module 222, achieve the distributed I/O expansion of EtherCAT slave station, enhance the extended capability of EtherCAT slave station remote I/O, decrease the one-piece construction scale of system, reduce the cost of system.In addition, when the scale of system is huger, when the remote I/O interface quantity needed is more, can be satisfied the demands by the mode of the quantity increasing the I/O module of EtherCAT slave station, control the quantity of EtherCAT slave station in system well, effectively control 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 is for gathering the information of multiple field apparatus 230 successively by multiple I/O module 221 according to certain sequential, and outputting to slave station interface unit 2222 by after the Information encapsulation of the multiple field apparatuss 230 collected, the information of the multiple field apparatuss 230 after the encapsulation received is sent to main website 210 by slave station interface unit 2222.Main website 210 receives the information of the multiple field apparatuss 230 after the encapsulation of each slave station interface unit 2222 transmission successively according to certain sequential, and treatment and analysis is carried out to it, generate corresponding control signal, then control signal is sent to corresponding slave station interface unit 2222 successively according to certain sequential.
The control signal received is sent to field apparatus control module 2221 by slave station interface unit 2222, field apparatus control module 2221 pairs of control signals identify, and classify according to field apparatus 230 pairs of control signals that control signal will control, then export corresponding control signal to multiple I/O module 221 successively according to the sequential of self-defining internal extended agreement instruction, thus correspondingly control the action of multiple field apparatus 230.
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 multiple I/O module 221 by spi bus.Now, field apparatus control module 2221 identifies it after also needing first to carry out protocol conversion to the control information received again and classifies, and then exports I/O module 221.In addition, the information of the multiple field apparatuss 230 collected carries out encapsulating and being sent to slave station interface unit 2222 after protocol conversion by field apparatus control module 2221.
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 with the EtherCAT of slave station 220, thus 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 are responsible for, the control information of the EtherCAT frame form sent by main website 210 is on the one hand carried out carrying out identifying and classifying after agreement turns again, finally correspondingly output to multiple I/O module 221, thus realize the refreshing of outside expansion output, on the other hand, the outside gathered expansion input quantity (information of multiple field apparatus 230) is encapsulated, ET1100 is sent to after protocol conversion, then main website 210 is sent to by ET1100 by EtherCAT bus, thus realize the extensive expansion of slave station 220 distributed I/O.
Fig. 4 is the structural representation of the dcs 200 based on EtherCAT bus of the present invention 3rd embodiment, as shown in Figure 4, the difference of the present embodiment and the second embodiment is, field apparatus control module 2221 comprises protocol conversion subelement 2221-1 and field apparatus controls subelement 2221-2.
Wherein, field apparatus controls the information that subelement 2221-2 is used for being gathered by multiple I/O module 221 successively according to the sequential of its self-defining internal extended agreement instruction multiple field apparatus 230, and the information of the multiple field apparatuss 230 collected is sent to protocol conversion subelement 2221-1.The information of protocol conversion subelement 2221-1 to the multiple field apparatuss 230 received encapsulates and exports slave station interface unit 2222 after protocol conversion.Main website 210 is sent to by EtherCAT bus again by slave station interface unit 2222.
The control information that protocol conversion subelement 2221-1 sends for receiving slave station interface unit 2222, and after protocol conversion is carried out to this control information, export field apparatus control subelement 2221-2.Field apparatus controls subelement 2221-2 and identifies the control information after the protocol conversion received, field apparatus 230 pairs of control informations that then will control according to control information are classified, then corresponding control information is exported to multiple I/O module 221 successively, correspondingly to control the action of multiple field apparatus 230 according to the sequential of self-defining internal extended agreement instruction.
See 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 220 and main website 210, thus realizes the I/O data refreshing that main website 210 controls slave station 220.Field apparatus is controlled subelement 2221-2 and can be realized by programmable logic chip, such as by CPLD (ComplexProgrammableLogicDevice, CPLD) realize, CPLD is as the processing unit of local Extended Protocol, be responsible for the dissection process of self-defining internal extended agreement, realize the expansion of the local IO of slave station.Protocol conversion subelement 2221-1 can be realized by programmable logic chip or Micro-processor MCV, when adopting MCU, MCU is as the core processor of slave station 220, act as the mutual intermediary of both ET1100 and CPLD, scheduling and the conversion of slave station data message are responsible for, issue CPLD after the EtherCAT frame information (control information) that the main website 210 received by ET1100 on the one hand sends carries out protocol conversion, realized the refreshing of outside expansion output by CPLD; On the other hand, outside expansion input quantity (information of multiple field apparatuss 230 of collection) of being sent by CPLD carries out encapsulating, send to ET1100 after protocol conversion, then send to main website 210 by ET1100 by EtherCAT bus, thus realize the extensive expansion of slave station 220 distributed I/O.The field apparatus that in Fig. 5, each I/O module connects is not identical, is illustrated as shorthand method.
In the present embodiment, ET1100 with CPLD is connected with MCU by parallel bus.Slave station 220 realizes the expansion of distributed I/O by CPLD chip, distributed I/O is connected on CPLD chip in the mode of I/O module 221, between each distributed I/O module 221 expanded of CPLD and slave station 220, communication is connected by the mode of spi bus, data protocol then have employed 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 of the distributed I/O data to outside expansion.Therefore, slave station 220 can expand multiple distributed I/O module 221, and the IO extended capability of single slave station is far more than 32 IO points of the control system based on EtherCAT bus of the routine shown in Fig. 1.
The dcs 200 based on EtherCAT bus of the present embodiment, realize remote I/O based on EtherCAT bus to control, with the routine shown in Fig. 1 based on EtherCAT bus control system compared with, the slave station 220 of dcs 200 does not use the mode of the direct control IO of ET1100, but the structure adopting ET1100, MCU and CPLD to combine, realize a large amount of expansions of remote distributed IO.Further, slave station 220 uses self-defining Extended Protocol, passes through spi bus, realize the expansion of multiple distributed I/O module 221, greatly promote the IO extended capability of single EtherCAT slave station of knowing clearly, reduce the overall size structure of system, reduce 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 amendment done, equivalent replacement, improvement etc., all should be included within right of the present invention.