Summary of the invention
Technical problem to be solved by the invention is to provide a kind of at low cost, highly-safe, have flexible basic software and expand
The safe and intelligent programmable logic controller (PLC) based on open system of exhibition and customization capability.
In order to solve the above-mentioned technical problem the present invention uses following technical scheme: the present invention devises a kind of based on Open System
The safe and intelligent programmable logic controller (PLC) of system, including peripheral interface circuit mainboard, and it is set to peripheral interface circuit mainboard
On CPU engine, input module, output module, communication expansion module, double 10 needle expand interface, power module, input mould
Block, output module, communication expansion module pass through the docking CPU engine of the circuit layout on peripheral interface circuit mainboard respectively;Power supply
Module is docked modules by the circuit layout on peripheral interface circuit mainboard respectively and is powered;
Meanwhile input module, output module, communication expansion module pass through the circuit layout pair on peripheral interface circuit mainboard respectively
It connects double 10 needle and expands interface;Wherein, input module, output module dock double 10 needle and expand on interface that wherein 10 needle of a row connects
Mouthful, communication expands double 10 needle of module docking and expands another 10 needle interface of row on interface;
10 needle interface structures of each row are mutually the same, each to arrange in 10 needle interfaces, and 1-2 stitch is expanded in interface for distinguishing double 10 needle
10 needle interfaces of each row, judgment module docks 10 needle interfaces;4-7 stitch is ethernet communication stitch, for passing through Ethernet
Realize the data real-time, interactive between external expansion equipment;8-10 stitch is that RS485 communicates stitch, for outer to what is accessed
Portion expands equipment and carries out parameter configuration, realizes that external expansion equipment automatic identification configuration is communicated and used.
As a preferred technical solution of the present invention: further include be set to it is each on the peripheral interface circuit mainboard
Specified type data-interface, each specified type data-interface pass through the docking of the circuit layout on peripheral interface circuit mainboard institute respectively
State CPU engine.
As a preferred technical solution of the present invention: the specified type data-interface includes that network interface, serial ports, HDMI connect
Mouth, MicroUSB interface and USB interface.
As a preferred technical solution of the present invention: the corresponding input signal of the input module include discrete signal and
Analog signal, the corresponding output signal of the output module includes discrete signal and analog signal.
As a preferred technical solution of the present invention: the CPU engine is by being set to the peripheral interface circuit master
CPU socket on plate is set on peripheral interface circuit mainboard, and CPU engine is the consumer CPU based on open hardware design
Hardware.
As a preferred technical solution of the present invention: the consumer CPU hardware is raspberry pie CPU or banana pie CPU.
With it is above-mentioned corresponding, the present invention also technical problems to be solved be to provide a kind of safe and intelligent based on open system
The function of flexible optimized integration software extensions and customization capability is capable of in the application of programmable logic controller (PLC).
In order to solve the above-mentioned technical problem the present invention uses following technical scheme: the present invention devises a kind of based on Open System
The application of the safe and intelligent programmable logic controller (PLC) of system, the safe and intelligent programmable logic controller (PLC) are operated using Linux
System, wherein program runs software system is realized using OpenPLC, and built-in IPsec VPN is used for the certification of communication interface.
As a preferred technical solution of the present invention: program runs software system includes user program interpreter, user
Program actuator, IO drive system, other communication extension systems and communication encryption security protection system;Wherein,
User program interpreter, the interpretation of programs for being edited user are carried out at the code that user program actuator is identified
It executes;
User program actuator, the operation for being responsible for user logic program calculates, and operation result is met at IO drive system
It is exported;
IO drive system, for program logical operation in user logic program to be converted into the bottom code collection of Hardware I/O output,
And it is responsible for the communication and data exchange expanded between module;
Other communication extension systems, the expansion for providing various industry communications protocols and interface are supported;
Communication encryption security protection system, for the network data exchange for the safe and intelligent programmable logic controller (PLC)
Security protection is provided.
A kind of safe and intelligent programmable logic controller (PLC) and application based on open system of the present invention, using the above skill
Art scheme compared with prior art, has following technical effect that
Designed safe and intelligent programmable logic controller (PLC) and application based on open system of the invention, is set based on open hardware
The core CPU engine of the consumer hardware realization controller of meter, substitutes traditional programmable logic controller (PLC) hardware, can effectively drop
Low hardware cost, and controller uses general (SuSE) Linux OS, substitutes the firmware system of traditional programmable logic controller (PLC)
System, and director demon runs software system also uses open source software such as OpenPLC to be realized, allow controller's intellectualization from
And have flexible basic software extension and customization capability;And controller uses general (SuSE) Linux OS environment, integrates
Built-in IPsec VPN can also be done with protecting the safety of configuration and communication process between controller and engineer station, controller
It to the certification of identity, is protected based on national secret algorithm, can also be achieved the autonomous controllable of safe level, to realize truly
Safe and intelligent programmable logic controller (PLC).
Specific embodiment
Specific embodiments of the present invention will be described in further detail with reference to the accompanying drawings of the specification.
The present invention devises a kind of safe and intelligent programmable logic controller (PLC) based on open system, specific practical application
In, as shown in Figure 1, include peripheral interface circuit mainboard, and be set on peripheral interface circuit mainboard CPU engine, input
Module, output module, communication expansion module, double 10 needle expand interface, power module, each specified type data-interface, defeated
Enter module, output module, communication expansion module, each specified type data-interface to pass through respectively on peripheral interface circuit mainboard
Circuit layout docks CPU engine;Power module docks modules by the circuit layout on peripheral interface circuit mainboard respectively
It is powered.
In practical application, power module design provides the direct current 24V power supply of safety and stability, each specified class for whole system
Type data-interface includes network interface, serial ports, HDMI interface, MicroUSB interface and USB interface;CPU engine is described by being set to
CPU socket on peripheral interface circuit mainboard is set on peripheral interface circuit mainboard, and CPU engine is based on open hardware
The consumer CPU hardware of design, such as selects consumer CPU hardware for raspberry pie CPU or banana pie CPU, substitute it is traditional can
Programmed logic controller hardware, can effectively reduce hardware cost.
Meanwhile input module, output module, communication expansion module pass through the circuit cloth on peripheral interface circuit mainboard respectively
Office docks double 10 needle and expands interface;Wherein, input module, output module dock double 10 needle and expand on interface a wherein row 10
Needle interface, communication expand double 10 needle of module docking and expand another 10 needle interface of row on interface.
10 needle interface structures of each row are mutually the same, each to arrange in 10 needle interfaces, and 1-2 stitch connects for distinguishing double 10 needle expansion
10 needle interfaces of each row in mouthful, judgment module dock 10 needle interfaces;4-7 stitch be ethernet communication stitch, for by with
Too net realizes the data real-time, interactive between external expansion equipment;8-10 stitch is that RS485 communicates stitch, for being accessed
External equipment of expanding carry out parameter configuration, realize it is external expand the configuration of equipment automatic identification and communicate simultaneously uses.
In practical application, as shown in fig. 6, the expansion mode of double 10 needle interface is centered on CPU engine, communication module exists
A left side, I/O module is on the right side;It is connected by 10 needle interface of right row of 10 needle interface of center interface left bank and left module of interface, interface is right
10 needle of left bank for arranging 10 needle interfaces and right module connects, and can so connect most 10 modules.
In practical application, input module is packaged into module for electric interfaces are inputted, and built-in chip is controlled, and is passed through
Double 10 needle expands interface and carries out expansion communication, and wherein input signal corresponding to input module includes discrete signal and simulation letter
Number two kinds of forms, discrete signal interface form have PNP and NPN both of which, can be matched by software according to industrial requirement
It sets, analog signal has the input interface of the signals such as voltage, electric current, thermocouple and thermal resistance, the input of compatible all industrial systems
Signal;In addition the included serial ports all the way of input module can be debugged individually and PC machine is cooperated to use.
By all output signal interface encapsulations of Industry Control at module, included chip is controlled, is passed through output module
Double 10 needle expands interface and carries out expansion communication, and wherein output signal corresponding to output module includes discrete signal and simulation letter
Number two kinds of forms, discrete signal interface form have PNP and NPN both of which, can be matched by software according to industrial requirement
It sets, analog signal has the input interface of the signals such as voltage, electric current, thermocouple and thermal resistance, the input of compatible all industrial systems
Signal;In addition the included serial ports all the way of output module can be debugged individually and PC machine is cooperated to use.
Communicating expansion module can pass through in the case that the included communication interface of CPU engine is unable to satisfy requirement quantity
Communication expansion module expanded, communication expansion module using standard communication chip carry out communications protocol encapsulation, automatically with set
It is standby to be communicated, and communication data is interacted by double 10 needle interface with CPU engine.
With it is above-mentioned corresponding, the present invention devises a kind of safe and intelligent programmable logic controller (PLC) based on open system
Using the safe and intelligent programmable logic controller (PLC) uses (SuSE) Linux OS, substitutes traditional programmable logic controller (PLC)
Fixer system, wherein program runs software system realizes that it is flexible to have to allow controller's intellectualization using OpenPLC
Basic software extension and customization capability, and built-in IPsec VPN is used for the certification of communication interface, protects controller and engineer
Stand, between controller configuration and communication process safety, can also accomplish the certification of identity.It is protected based on national secret algorithm, may be used also
Realize the autonomous controllable of safe level.
Wherein, as shown in Fig. 2, program runs software system includes user program interpreter, user program actuator, IO drive
Dynamic system, other communication extension systems and communication encryption security protection system;Wherein,
User program interpreter, the interpretation of programs for being edited user are carried out at the code that user program actuator is identified
It executes;
User program actuator, the operation for being responsible for user logic program calculates, and operation result is met at IO drive system
It is exported;
IO drive system, for program logical operation in user logic program to be converted into the bottom code collection of Hardware I/O output,
And it is responsible for the communication and data exchange expanded between module;
Other communication extension systems, the expansion for providing various industry communications protocols and interface are supported;
Communication encryption security protection system, for the network data exchange for the safe and intelligent programmable logic controller (PLC)
Security protection is provided.
It is corresponding with designed controller intermediate range sort run software systems, in practical application, as shown in Fig. 2, further including pair
The end PC answered, wherein software systems include program editing software systems and program runs software system, wherein software for editing system
Including programming system, program compilation system and data communication system;
Programming system: using the five kinds of programming languages i.e. ladder diagram standardized in International Electrotechnical Commission's IEC61131 standard
(LAD), flow chart (SFC), functional diagram (FBD), structured text (ST) and statement list (STL), it is ripe that user can choose oneself
Any one language known carries out programming in logic.
Program compilation system uses the open source compiler based on MatPLC, presses button activation by the compiling of programming system
Compilation facility.
Data communication system is responsible for the data communication between the end PC and controller, including downloading compiled user program
To controller, from controller upload program to PC and the real time data inspecting debugging function at the end PC and controller.
The application of the above-mentioned designed safe and intelligent programmable logic controller (PLC) based on open system, works as in practical application
In, as shown in figure 3, program runs software system is explained by user program interpreter, by user program to user program execution
Progress program execution in device, and by IO drive system and extension system reading input signal progress operation is communicated in real time, one
Operation result is output to IO drive system after a cycle operation and communication extension system carries out signal output.
For the end PC, the 5 kinds of standard language design programming interfaces according to as defined in IEC61131 provide 5 kinds of standards and compile
Journey format is selected for user, after user edits logical program by a kind of oneself known language, passes through program compilation system
It downloads in controller and runs.User logic is compiled into ANSI C language using MatPLC by compilation process, is then compiled into again
Computer language is issued to operating system identification movement, and compilation process is as shown in Figure 4.
Designed safe and intelligent programmable logic controller (PLC), in practical application, as shown in figure 5, due to controller
Using general (SuSE) Linux OS as program runs software system bearing environment, this allows for us to integrate open source
IPsec VPN can also accomplish body to protect the safety of configuration and communication process etc. between controller and engineer station, controller
The certification of part.It is protected based on national secret algorithm, can also be achieved the autonomous controllable of safe level.And built-in IPsec preventing mechanism,
Real end-by-end security protection may be implemented, so that all untrusteds be blocked to access, also ensure the data secret of transmission
Property and integrality, ensure that the safe and stable operation of industrial control system.
By the application of the safe and intelligent programmable logic controller (PLC) designed by above-mentioned technical proposal based on open system, application
In reality, i.e., tested in certain factory automation drilling machine practical application, operation half a year multistable determines fault-free, workpieces processing quality
Required precision is complied fully with, all control functions do not have difference with the control function compared to certain the brand controller used originally,
It is also promoted on operation beat and speed.Specific test process is as follows:
Step1: designed safety governor and related accessories are installed to a control cabinet and are packaged, external signal is needed
It guides on terminal and is connect with other electric components.Certain original brand controller of drilling machine is removed, by connecting line production
Good control cabinet is linked on all electrical equipments.
Step2: downloading in the controller made according to the good control program of technics institution to raspberry pie, then uses configuration
King makes host computer HMI picture, and program picture is as shown in Figure 7.
Step3: practical operation production run, the parameters such as statistical product qualification rate and equipment failure rate, and longer-term network
Packet capturing simulation attack actual measurement security performance.In the actual measurement for simulating various existing attacks, the exception for carrying out automatic network can be effectively defendd
Attack, guarantees the normal operation of production, and actual measurement network safety prevention packet capturing is as shown in Figure 8.
The designed safe and intelligent programmable logic controller (PLC) and application based on open system of above-mentioned technical proposal, based on opening
The core CPU engine for putting the consumer hardware realization controller of formula hardware design, it is hard to substitute traditional programmable logic controller (PLC)
Part can effectively reduce hardware cost, and controller uses general (SuSE) Linux OS, substitutes traditional programmable logic control
The fixer system of device processed, and director demon runs software system also uses open source software such as OpenPLC to be realized, allows control
Device intelligence processed is to have flexible basic software extension and customization capability;And controller is operated using general Linux
System environments integrates built-in IPsec VPN to protect configuration and communication process between controller and engineer station, controller
Safety can also accomplish the certification of identity, be protected based on national secret algorithm, can also be achieved the autonomous controllable of safe level, thus real
Now safe and intelligent programmable logic controller (PLC) truly.
Embodiments of the present invention are explained in detail above in conjunction with attached drawing, but the present invention is not limited to above-mentioned implementations
Mode within the knowledge of a person skilled in the art can also be without departing from the purpose of the present invention
It makes a variety of changes.