Programmable logic controller (PLC)
Technical field
The utility model relates to a kind of programmable logic controller (PLC), but the utility model relates to a kind of programmable logic controller (PLC) of redundant configuration of Ethernet architecture more precisely.Belong to automation control area.
Background technology
Programmable logic controller (PLC) (hereinafter to be referred as PLC) is a staple product of automation control area widespread use.Existing abroad nearly 40 years development and the widespread use of PLC, its technical development is very fast, and is also ripe, and the PLC technology of domestic independent development exists certain hysteresis or limitation relatively, particularly in the mid-to high-end product field.
At present domestic PLC product is owing to be subjected to the restriction of technical factor, the data throughput of its IO frame and IO module level communication bus is lower, the for example main at present CAN bus that adopts, its highest communication speed has only 1Mbps, and often do not reach its higher-end speed in the practical application, thereby limited the response time of controller the scanning of IO module data.
Aspect controller hot backup redundancy and the raising of network redundancy reliability, present domestic employing be the shared power-supply system of active and standby controller, and need between active and standby controller to shake hands to realize master-slave redundancy switch data signal by common motherboard bus connection, active and standby controller can not be installed in different physical location respectively, thereby can't realize the purpose of the mutual safe spare of active and standby controller.Aspect the IO module communication, what present domestic PLC adopted is single net mode, can not realize the high reliability request of consistent two redundant two nets from total system.
Aspect logic programming language, present PLC only supports a kind of or a small amount of several language usually, can not all support to meet five kinds of programming languages of IEC 61131-3 standard, thereby make the versatility of PLC be subjected to certain limitation, even the programming language of some products does not meet standard, user's use difficulty is increased, and change is safeguarded in inconvenience.
For the data referencing in the programming in logic, present PLC is that the mode that adopts specific address to quote is used, and both has been not easy to read and follow-up maintenance, also is unfavorable for improving the reliability in the programming in logic design.
Summary of the invention
The purpose of this utility model provides that the abundant and conformance with standard of a kind of highly versatile, programming language, hot backup redundancy are safe and reliable, whole network can be redundant, system responses is quick, the programmable logic controller (PLC) of maintenance easy to use.
In order to reach above purpose, the utility model takes following technical scheme to realize:
A kind of programmable logic controller (PLC) is characterized in that it can be configured to single controller system or hot backup redundancy controller system; Described single controller system comprises a cover programmed configurations software, a cover logic operation system software, a controller frame, comprises a controller module, at least one power module and some IO modules on the described controller frame; Described hot backup redundancy controller system comprises a cover programmed configurations software, a cover logic operation system software, two controller frames and at least one IO extension frame and some IO modules, comprises a controller module and at least one power module on the described controller frame; Described programmed configurations software is realized the input of programmed logic; Described logic operation system software is controller system software and logical operation automotive engine system, is used for carrying out the instruction after programming language compiles; Controller module on the described controller frame is integrated 5 ethernet interfaces, a RS485/422 communication interface and a pair of pair of S bus interface, to realize two redundancy features of active and standby controller redundant copies of data and system communication net, the main and standby competition of hot backup redundancy controller is except that utilizing active and standby data backup passage, also increased controller multiplexing to IO frame Dual-Ethernet, to guarantee avoiding unusual two master or two generation that is equipped with, comprise the two redundant S buses of difference isomery on controller, backboard and the IO module; On the software, two S buses also are designed to time division multiplex, and the application layer message is cut apart and time-sharing receive and transmit(tsrt), strengthen IO data scanning efficient and reliability, adopt pair S buses to connect between each IO module and controller or the extensible processor.Adopt the Dual-Ethernet bus to connect between controller and extensible processor and between controller and external device, the Ethernet interface of the integrated abundance of controller module, realize that controller all adopts two redundant ethernet communications to host computer such as workstation with to the IO extension frame, integrated pair of S bus interface of controller and extensible processor module, realize the dual redundant bus of controller to the IO module, these have constituted the reliable two redundant via of high speed of overall data communication system jointly.
Aforesaid programmable logic controller (PLC) is characterized in that described single controller system, when needs expansion IO module, comprises an IO extension frame at least.
Programmed configurations software is input, compiling and the management of FPGA (Field Programmable Gate Array), and the application tool that IO and PLC system are configured.Aforesaid programmable logic controller (PLC), it is characterized in that described programmed configurations software supports to meet whole 5 kinds of standard program language of IEC 61131-3 standard simultaneously, described 5 kinds of standard program language comprise IL instruction list, ST structured text, LD ladder diagram, FBD FBD (function block diagram), SFC order functional diagram, and IL-LD-FBD can complete intersectionly compile.
The integrated application means that programmed configurations software provides variable-definition with in the realization program by the variable name index, strengthen programmed readability and maintainability, reduce error rate.For the data referencing in the programming, abandon and use fallibility and specific address way of reference intuitively not, but adopted entire variable name way of reference with reforming, the user can be with the variable name or the given again name that is easy to discern of user of acquiescence to each data, and every kind of language and zones of different data are all supported entire variable name indexed mode.
Aforesaid programmable logic controller (PLC) is characterized in that in the described hot backup redundancy controller system, comprises an identical controller module of software and hardware and at least one power module on two controller frames of hot backup redundancy respectively.
Aforesaid programmable logic controller (PLC) is characterized in that in the described hot backup redundancy controller system, and switch module or other communication module also can be installed on the controller frame; The IO module is installed on the IO extension frame, links to each other with two controller modules in the Ethernet mode.
Aforesaid programmable logic controller (PLC) is characterized in that described pair of S bus is to adopt two S buses of full duplex, difference, isomery, time-multiplexed pair of redundancy communication design, and bandwidth is 16Mbps.
Aforesaid programmable logic controller (PLC) is characterized in that in the described hot backup redundancy controller system, between each intermodule, active and standby controller, the Ethernet and the two S bus that connect between controller and host computer all adopt redundant fashion to connect.
Two controller module software and hardwares of hot backup redundancy are identical, and two redundant manipulator modules lay respectively on separately the frame, and single supply or redundant heat that each frame has oneself are equipped with multi-power system.Switch module or other communication module can be installed on the controller frame of hot backup redundancy system, but the IO module no longer directly is installed.This moment, the IO module all was to link to each other with two controllers of hot backup redundancy respectively in the Dual-Ethernet mode by extension frame, thereby it is easier to be reliable to make that redundant system connects.Carry out redundant copies of data by a pair of Ethernet interface between two controllers of hot backup redundancy, normal master-slave redundancy competition or handover handshake signal are linked up by this Ethernet of active and standby, in order further to strengthen reliability, prevent that two main or two abnormality that are equipped with from appearring in two controllers, the Dual-Ethernet that all links to each other with extension frame by two controllers transmission information of shaking hands also is to determine the state of active and standby switching or competition.
Controller module is the nucleus module of PLC, and integrated 5 Ethernet interfaces of this module self if there are more main frames need connect PLC, can also expand by the switch module that PLC provides.Controller module also has a RS485/422 interface.6 communication interfaces of this of controller module can satisfy the major applications demand, be controller module to single Ethernet of main frame or Dual-Ethernet interface, to Ethernet of touch panel device or RS485/422 interface, to two Ethernet interfaces of extension frame, and Ethernet contact interface between active and standby controller.When the controller module Ethernet interface is not enough, also can expand by switch module SWT is installed.The software of controller module adopts embedded real-time multi-task operating system, includes the runtime engine that meets IEC 61131-3 programmed logic.These software systems are supported 16 user PLC tasks at most, and each task can independently be provided with priority, cycle period and Watchdog.
The data transfer rate of IO module becomes a bottleneck of whole PLC system response time easily.Owing to the cost reason, the CPU processing power of IO module will be lower than the CPU processing power of controller module, so this PLC adopts soft time-division multiplex technology, solves the limitation that the IO module has little time to respond the rapid data request of upper system.At first, set up the cache memory section of the individual word of m*n (m gets 〉=1 integer get final product) on the hardware respectively for the transmitting-receiving communication of IO module, then the application layer communication message is carried out cutting apart of regular length (n word).Like this, even have little time to handle immediately under the situation of cutting apart frame, have at least an interval delay time (to utilize the wheel stream communication of different I module to obtain time-delay in the IO module.Under the extreme case that has only an IO module on the frame, time-delay need be set additionally), cut apart frame and cut apart the processing that obtains the IO module before frame arrives to guarantee this at the next one.In bit processing machine on the IO module (being controller module or the extensible processor module) software, the design message is cut apart frame and Coordination Treatment resolution unit, constantly to obtain next transmission information of cutting apart frame and to send destination address, also to make up simultaneously and resolve the data receive and cut apart frame, with the information content of reduction original application layer message.
For traffic rate and the reliability that improves the IO module, the IO module has adopted difference to the communication bus of last bit processing machine, isomery, the dual redundant bus of full duplex, bandwidth is up to 16Mbps, even under a communication port between IO module and the last bit processing machine interrupts, still can switch to another spare communication passage immediately, thereby form the full redundancy communication network of this PLC, promptly from the IO module to the extension process machine, from the extension frame to the controller and controller two redundant, and slave controller all forms the reliable redundancy communication system to the whole longitudinal passage of main station system.
The beneficial effects of the utility model are: the utility model has solved the readable and maintainable poor problem of dullness, data directory of logic programming language; Solve the problem of programmable logic controller (PLC) all-pass road redundancy and data transmission efficiency bottleneck simultaneously, and improved the reliability of communication system.
Description of drawings
Typical connection layout when Fig. 1 is configured to two redundant manipulator for the utility model.
Fig. 2 is a controller module built-in function block diagram.
Fig. 3 holds hardware circuit diagram for two S bus masters.
Fig. 4 is hardware circuit diagrams from end of two S buses.
Fig. 5 is S bus software time division multiplexing principle figure.
Fig. 6 is FPGA (Field Programmable Gate Array) variable name configuration instruction figure.
Embodiment
Below in conjunction with accompanying drawing, to concrete being described below of the utility model seat:
The utility model programmable logic controller (PLC) shown in Fig. 1-6, wherein among Fig. 1 in the dot-and-dash line frame shown in part be the utility model programmable logic controller (PLC) entity part, hot backup redundancy controller and integrated five ethernet interface E1~E5, GPS time service interface, RS485/422 communication interface thereof have been comprised, extension frame processor and integrated two ethernet interfaces, GPS time service interface, switch module SWT, communication interface modules COM and other IO module thereof.Common interconnective external unit when dot-and-dash line frame outside is divided into the utility model programmable logic controller (PLC) composition system among Fig. 1 is not in the utility model protection domain.
Among Fig. 1, the ethernet network bus is except that having only two terminal devices directly connect, and all needs by switch module SWT interconnectedly, for ease of explanation, omitted the wiring schematic diagram with the switch module coupling part among the figure.Two hot backup redundancy controllers can be that single net (as E1) or two net (as E1, E3) connect to workstation respectively among Fig. 1, and the dotted line network connectivity shown in the figure need not connect when promptly list is netted.Two hot backup redundancy controllers also are to need to switch when master-slave redundancy switches to the ethernet ip address of workstation and touch-screen, and the IP address that promptly is in master controller is fixed, even the master controller corresponding hardware has switched to another controller hardware.Two hot backup redundancy controllers lay respectively on the different controller frames among Fig. 1, and the data redundancy backup between heat is equipped with is mainly by Ethernet transmission (as E2), and two hot preparation controllers can be installed in the different location respectively, increase redundant safety.Main and standby competition between the hot backup redundancy controller not only utilizes the differentiation of shaking hands of the E2 mouth Ethernet of Fig. 1 middle controller, also can be under the situation of E2 mouth network failure, by E4, E5 with the differentiation of shaking hands of extension frame communication network, prevented unusual two main or two generations that are equipped with phenomenon to greatest extent.Among Fig. 1 GPS to the time signal be connected respectively to the GPS time service interface of each controller and extension frame so that the various piece of entire controller system obtain accurately to the time.Figure 1 shows that the hot backup redundancy controller system, two hot backup redundancy controller modules that hardware and software is identical are arranged, be installed in respectively on two hot backup redundancy frames, when needs nonredundancy controller disposes, as long as save a hot backup redundancy controller frame and relevant line thereof among the figure.
Figure 2 shows that the built-in function block diagram of controller module; controller adopts 64 PowerPC processors of band hardware Floating-point Computation function; integrated 5 Ethernet interface Eth1~Eth5 on the module; 1 RS485/422 interface; 1 GPS time service interface; LED indicates interface; the JTAG debugging interface; core bus interface (frame address, redundant two S buses, IO to time etc.); reset button; three positions (stop, moving/lead, move/be equipped with) key button, and stir selector switch (memory protect, debugging) etc.
Figure 3 shows that two S bus masters hold hardware circuit diagram.Two bus S1, S2 of two S buses adopt the isomerization hardware circuit, but software communication mechanism is identical with agreement, has both increased reliability, has reduced the complexity of software again.When controller and different I module communication, select this IO module by sheet, other module on the bus is in illegal state at this moment.The selection address of controller is by latch D7 output, and it is ADDRA1~ADDRA4 that the S1 bus address of two S buses is selected signal, and it is ADDRB1~ADDRB4 that the S2 bus address is selected signal.Because the IO number of modules has 14 at most on every layer of frame, two buses of two S buses all need sheet to select S1CS, S2CS separately, therefore need four three-eight code translator D1~D4, to select the address of IO module to be translated into controller " chip select line ".D1~D4 is installed on the backboard.D9, D10 are used for converting the cmos signal of S1 bus to differential signal, D10 is responsible for the differential conversion of bus clock signal, the Enable Pin of D10 is set to be in all the time transmit status, D9 is responsible for the differential conversion of bus data receiving and transmitting signal, and the Enable Pin of D9 is set to allow all the time the reception and the transmission of signal.D5 is the bus buffer door, is used for the signal level coupling.Similarly, D8 is used for converting the cmos signal of S2 bus to differential signal, and the Enable Pin of D8 is set to allow all the time the reception and the transmission of signal, also is that S1 and S2 bus all are to be designed to full-duplex communication, increases data-transmission efficiency.The S1 bus signals comprises that SCKA1 and SCKB1 clock differential signal are right, SDIA1 and SDIB1 received signal differential pair, and it is right that SDOA1 and SDOB1 send signal differential.The S2 bus signals comprises SDIA2 and SDIB2 received signal differential pair, and it is right that SDOA2 and SDOB2 send signal differential.
Figure 4 shows that hardware circuit diagram of two S buses, this pair S bus interface circuit is all arranged on each IO module from end.CSA1 and CSB1 are respectively the chip select lines of No. 1 slot S1 bus and S2 bus among the figure, and different slots use different chip select lines, and chip select line is from CSA1~CSA14 and the CSB1~CSB14 of Fig. 3.Chip selection signal speed is not high, but very important, therefore for improving reliability, has increased R1, C1 and R2, C2 resistance capacitor device.D1 is a buffering device, pass through D1, the IO module is also gathered into this slot address BAN1~BAN4, with identification IO module self physical address, the destination address of coming in conjunction with the communication data message, further whether the verification object data object is consistent with slot addresses, strengthened the reliability that data transmit greatly, eliminates the data transmission object risk of error that the chip selection signal entanglement brings.D3, D4 are the clock and the data differential signals conversion chips of S1 bus, control forbidding of D4 or open by the CSC signal, make that by D5B D4 is to be operated in the full duplex state when open.D2 is the data differential signals conversion chip of S2 bus, controls forbidding of D2 or open by the CSB signal, makes that by D5A D2 is to be operated in the full duplex state when open.
Figure 5 shows that S bus software time division multiplexing principle figure.For a plurality of IO modules, controller (or extensible processor) is ready to go downwards to the application layer message REP1~REPm of each IO module, and with application layer message REPm be divided into plurality of fixed length the bottom frame (frame m-1, frame m-2, frame m-3 ... frame m-k), not enough frame length partly fills up complete 1 bit data when cutting apart.From a controller scan period, the downlink data frame order is: frame 1-1, frame 2-1 ..., frame m-1, frame 1-2, frame 2-2 ... frame m-2 ... frame 1-k, frame 2-k ... frame m-k, and uplink data frames is followed each downlink frame and is obtained.From this downlink data frame order as can be seen, the time interval of IO module responds bottom frame is the time of m bottom frame, therefore guaranteed improving under the traffic rate, alleviate the communication response requirement of the more weak relatively IO module of communication performance, thereby made the total system can to operate in total high-speed transfer efficient state.
Figure 6 shows that FPGA (Field Programmable Gate Array) variable name configuration instruction figure, be depicted as an example of opening into (DI) module, channel number is that configuration tool is given tacit consent to given according to joining frame and module information among the figure, these " channel number " titles directly can be quoted as variable name in logical program, more intuitive if desired variable name, can redefine a variable name in " title " hurdle, corresponding default channel numbering variable name will not re-use this moment yet.Variable name is formed except that ordinary symbol, also support Chinese character, so readability is very strong.
Below announced the utility model with preferred embodiment, so it is not in order to restriction the utility model, and all employings are equal to replaces or technical scheme that the equivalent transformation mode is obtained, all drops on the protection domain of the utility model requirement.