Specific embodiment
It is practical new below in conjunction with this to keep the objectives, technical solutions, and advantages of the embodiments of the present invention clearer
Type attached drawing, the technical scheme in the utility model embodiment is clearly and completely described, it is clear that described embodiment
It is the utility model a part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, this field is general
Logical technical staff every other embodiment obtained without making creative work belongs to the utility model guarantor
The range of shield.
Referring to Fig.1-3, a kind of multiplex roles protocol-intelligent converter based on Linux platform uses TI (Texas Instrument)
Embedded Hardware Platform, (SuSE) Linux OS and the application software of AM3352 processor are by the various communications of industrial field device
Interface carries out network conversion, by Jlink emulator and Jtag interface, the uboot that AM3352 processor is provided and open source
Linux3.2.0 operating system is burnt in falsh memory, then installs the interface driver that AM3352 processor provides
Finish, realizes the deployment of operating system within hardware, while providing necessary environment for application software operation.In system starting
Flash storage is loaded.As long as program is in compiling plus the library FlashFileSystemD river to Flash
Memory is written and read.By loading Flash File System in an operating system, server end receives the configuration number of client
According to rear, save it in flash storage.Meanwhile corresponding process is opened and closed according to parameter, complete client
Specified protocol conversion.
Protocol conversion can carry out reading and writing data, data parsing, and data are transmitted according to configuration, automatic identification equipment.
Data are uploaded to server, cloud platform by computer network, can utilize cloud computing, big data fusion and analytical technology hand
Section carries out scientific disposal to data, to realize visualized management and the control of field device.
The multiplex roles protocol-intelligent converter based on Linux platform, specifically includes following functions: device configuration and pipe
Reason, multi-protocols access, protocol conversion and standard data format data are transmitted.
The multiplex roles protocol-intelligent converter based on Linux platform includes Embedded Hardware Platform, operating system, application
Three parts of software.
Transfer principle is described by taking CAN bus and the protocol conversion of the end RS485 as an example below:
In the memory headroom of main control chip, RS485 end data buffer area and CAN end data buffer area is respectively divided out,
It is the transmitting-receiving message buffer at the end RS485 and the transmitting-receiving message buffer at the end CAN respectively, protocol converter is by RS485 bus
On the data message that receives be deposited into the reception buffer area of RS485 bus, starting is sent as needed after message frame
The data message for receiving buffer area is deposited into the buffer area that sends datagram at CAN bus end, is then converted into CAN by program
The protocol specification type of bus needs is simultaneously sent;, whereas if being the data packet sent from CAN bus, then phase is used
Anti- data communication process.The storage of data continuation address may be implemented using the register inside main control chip, which is just
In progress cyclic redundancy check and send data.In actual operation, corresponding buffer area is incorporated and using round-robin queue
Buffer area data structure: RS485 receives buffer area and merges with the transmission buffer area at the end CAN;The end RS485 send buffer area with
The end CAN receives buffer area and merges;Round-robin queue stores so that under limited RAM environment, significantly more efficient to utilize memory space,
Effectively prevent usually occurring the case where receiving data accumulation and having little time processing in CAN communication simultaneously, when the data of buffer area
When available, the value difference or full flag set of pointer are read and write;When buffer area data are empty, the value for reading and writing pointer is identical.
1, Embedded Hardware Platform
1.1 main control chip
Embedded Hardware Platform is using 32 ARM central processing unit designs, TI (Texas Instrument) AM3352 processor conduct
Main control chip, the processor are adopted based on ARM Cortex-A8 framework, and second level cache is possessed, and universal memory interface (is supported
DDR/DDR2/DDR3), general memory interface has been internally integrated two gigabit ethernet link layer interface function (Ethernet interfaces
1, Ethernet interface 2), 6 UART (serial ports), 2 McSPI, 3 I2C interfaces and a Jtag interface.Its internal height is integrated
Interface while reducing design difficulty, greatly improve the reliability of system.
AM3352 microcontroller and ethernet control module, CAN control module and UART are packaged, internal ROM
The integrated initialization api function and CommAPI function used for above-mentioned interface standard, user can call directly, enable CAN,
The exploitation of RS485, RS232 application greatly simplifies;CANopen driving is embedded in R0M in piece and not only improves reduction overall risk
And complexity, also bring the advantage of low-power consumption.Entire encapsulation is designed as the communication of each interface in industry and built-in network
Using providing inexpensive, easy to use, height optimization solution.
X5043 is " house dog " chip with EEPROM that Xicor company, the U.S. releases in recent years, also referred to as P control
Circuit.In existing control circuit, the characteristics of due to microcomputer and hardware itself, one-denier of control system is interfered and makes program
Out of control, microcomputer cannot automatically restore to normal condition and continue to run, after human intervention just can state back to normal, in view of very much
Industry control occasion is all unattended, so " house dog " circuit comes into being.This makes microcomputer can be certainly after occurring extremely
It is dynamic to reset to normal operating condition.X5043 provides four kinds of common functions: power supply electrifying resets control, " house dog " timing
Device, decompression management and ' 40 of the serial EEPROM with block protection function.The chip is simplifying hardware circuit design, reduces print
There is very big advantage in terms of the area occupied and raising reliability of making sheet.
The design of 1.2 network interfaces
In multiple network control chip, transmission rate, price, power consumption and the factors such as anti-interference, selection are comprehensively considered
The LXT972ALC chip of Intel Company, main PCS (Physical Coding Sublayer), the PMA (object completing IEEE802.3 standard and defining
Manage media additional sub-layer) major function.Mutual conversion in addition to completing other interface data and network data, system it is online
Configuration and the long-range update of program are realized also by the network interface.In the design of network, the selection of isolating transformer is coupled
Influence to network interface is most important.
This system selects the HR61H40 transformer of Han Ren group to make Network Isolation, mainly realizes two functions:
(1) enhance signal;
(2) varying level of heterogeneous networks equipment room that isolation cable is connected, damage when preventing network cable transmission different voltages
Bad equipment.
The design of 1.3 serial line interfaces
UART interface is connect with embeded processor;DDR3 is connect with universal memory interface;Nandflash and common store
Interface connection;CAN module MCP2510CAN controls chip and realizes, is connect by McSPI interface with embeded processor.
The hardware protocol of RS485 is mainly that conversion completion is carried out by UART Universal Asynchronous Receiver Transmitter (UART);General transmitting-receiving
Device is exactly the main modular that equipment room carries out asynchronous serial communication, its main function is as follows:
(1) data conversion of external bus and serial port asked is handled;
It (2), can be the case where not sharing clock signal as long as communicating pair is using identical frame format and transmission rate
Under, communication process only can be completed with two signal wires (RxD and TxD);
(3) when the asynchronous serial port is communicated, using independent Transmit-Receive Unit, controller is largely improved
Receive and dispatch efficiency.
The selection of 1.3 memories and other
For storage program area, application program, user's Interactive Web Page, the configuration information of system and parameter, need to depositing
Reservoir is extended.This system is using the AM29F040B-90JF of Advanced Micro Devices as the flash storage chip extended out, capacity
For the bit of 4 M × 8, the needs of system are very well satisfied.32M SDRAM, data acquisition module realized with ADS7842, and by
DG506 chip realizes the selection to data acquisition channel;CAN communication module is realized by CAN controller SJA1000.There is provided 3
RS232/RS485 isolation communication serial ports, supports the programming of serial ports Free, CAN protocol is supported freely to program, communicate by 2 CAN mouthfuls
Port is all made of the design of full Phototube Coupling, at the same isolation signals line, power supply, and have lightning stroke and carrying out surge protection;Traffic rate
User is configurable, every to have independent data indication LED, 300~115200bps of RS232/RS485 traffic rate all the way;TCP
Traffic rate 10/100Mbps.
2, Design of System Software
Operating system is that the Linux3.2.0 system of open source is provided TI by Jlink emulator and Jtag interface
Uboot and Linux3.2.0 are burnt in nandfalsh, and the interface driver for then providing TI installs, and realize operation system
The deployment of system within hardware, while necessary environment is provided for application software operation.
The selection of 2.1 development languages
The development language that T1 Texas Instrument AM3352 is supported has assembler language, C language and Java language.Wherein Java language
It is write at interface and is allowed to better meet the requirement of development system with the advantage on network.Meanwhile JVM (the Java of TI2N I
Virtual machine), although 40 kb of low memory occupied, it can but support most JVM functions, such as to the complete of thread
Full support (could support up 16 threads), the support to all fundamental types and support to Strings etc..In addition to complete
It supports that java. net packet is outer, also includes a javax. com subsystem completely realized.TI2N IOS operating system more makes
Java becomes the ideal chose of this system development language.
The division of 2.2 system tasks
In conjunction with the characteristics of system and the principle of task division, the task of system divide as follows:
A) general each embedded system manages all user jobs by a job control task, so, it is more
Interface protocol converter will also have a job control task to manage all operations.
B) it needs to open and close certain interfaces according to the demand of client in systems, and interface is initialized, with
And the data conversion of distinct interface is realized according to the requirement of configuration, this just needs an interface task to realize above-mentioned function.It connects
Mouth task is responsible for managing RS2232, RS2485 and network interface.
C) in order to enable client visually to view the state of equipment, and easily system is configured, it is necessary to people
Machine interactive task completes these functions.
D) for the ease of the diagnosis of the maintenance of system and failure, system need to carry out the downloading of program, update, debugging and
Configuration.And Telnet the and FTP function that the Slush in TIN I is provided can complete aforesaid operations.Program is realized using FTP
Downloading and update, utilize Telnet complete node Remote configuration.
In summary, system can functionally be divided into 4 tasks from realization:
(1) main task;(2) interface management task;(3) human-computer interaction task;(4) remote interaction task.
From design angle, then embedded software can be divided into 4 modules:
(1) Operation control module;(2) interface administration module;(3) human-computer interaction module;(4) remote loading module.
The realization of 2.3 parameter configurations
Its basic ideas are as follows: in Java App let source program, create a Socket (socket) to complete and assist
Discuss the communication of converter.Then App let source program is compiled into Java bytecode, and Java bytecode is embedded in Web page
In, the web data on Web server is accessed by B/S mode.In this way, when client browser browses this webpage,
App let upon activation, carries out as the automatic downloading of a part of webpage Socket communication with protocol converter, realizes ginseng
Number configuration.System balances the load of server end and browser end by Java App let, and a part was operated in originally
Browser end has been assigned in work on server, reduces the load of server.
3, the main points of the utility model:
(1) it is based on Linux platform embedded development
Protocol conversion technology is based on Linux embedded system development, makes it have very hard real-time, can be used for various equipment
In control;It is capable of providing powerful network function, ICP/IP protocol and other agreements is supported, TCP/UDP/IP/PPP agreement is provided
It supports and unified MAC accesses layer interface, can be various mobile computing device spare interfaces.And it is convenient and simple for operation, mention
For friendly graphical interfaces.
(2) the online mass configuration of multi-protocols parameter
The online mass configuration of multi-protocols parameter is realized by flush type WEB server mode, and user is not necessarily to by upper
Machine configuration software carries out parameter configuration, and respective protocol IP address, port numbers, wave can be realized by the access of Computer Browser
The configuration of the parameters such as special rate.
(3) in such a way that B/S and C/S structure combines
User obtains the configuration interface of system by the browser of computer, how computer and agreement is realized on the page
The dynamic interaction of converter is the problem of must be taken into consideration.It can be greatly simplified according to traditional B/S structure is although easy to operate
The load of client computer, but cause the load of protocol converter excessive.Although and can be balanced using traditional C/S structure
The load of server and client side, but client software must be installed, versatility is bad, and the maintenance of system is larger.Consider
To the processing capacity and its versatility of protocol converter, this system is in design in such a way that B/S and C/S are combined.Visit
Ask in mode or using B/S mode, embedded web server accessed by browser, and on communication pattern with C/S model and
The mode that Java App let technology combines is realized based on Windows Sockets.Java App let can be compatible Java's
It is directly run on the Web browser of any platform.Respective advantage is thus combined, to make the operation of protocol converter more
Add stabilization.
4, the technical indicator of product
4.1 functional parameter
(1) it supports multi-protocols access: supporting RS-232, RS-485, CAN and network interface, no replacement is required existing serial equipment,
Without a large amount of human and material resources are put into, real-time data acquisition, production monitoring, the network automatically of industry spot can be realized
Management.
(2) support remote parameter setting: the system of multi-protocols intelligent converter operation realizes embedded type WEB _ Server
Function, connect network and protocol conversion device, logged in, its running parameter can be configured by IE browser.
(3) it supports the programming of serial ports Free, supports CAN protocol freely to program, facilitate operating with for user;
(4) hardware configuration complies fully with industrial standard, in temperature range, vibration, Electro Magnetic Compatibility and interface diversity etc.
Aspect is all made of special designing, ensure that the steady operation under adverse circumstances, provides high quality guarantee for your equipment.
4.2 performance indicator
(1) using 32 arm processor designs, it be furnished with the memory block 4M and 32M SDRAM;
(2) PORT COM is all made of the design of full Phototube Coupling, at the same isolation signals line, power supply, and have lightning stroke and wave
Gush the function of protection;
(3) 3 RS232/RS485 isolation communication serial ports are provided, 2 CAN mouthfuls;
(4) traffic rate user is configurable, and per there is independent data indication LED all the way, RS232/RS485 communication is fast
300~115200bps of rate;TCP communication rate 10/100Mbps;
(5) power supply uses two-way DC9-36V/AC90~264V hot backup redundancy (optional), facilitates plant-grid connection;
(6) working environment index: operating temperature: -25 DEG C~70 DEG C, humidity: 5%-95%RH is without condensation, IP20 protection;
(7) there is power failure memory function, do not need Reparametrization after power-off.
The problem of present application addresses multiclass interface, various protocols equipment can not interconnect in industry spot supports institute
There are device data interaction, data acquisition, push promotion and application of the informatization in underlying device, in addition, this is practical new
Type joined equipment management and configuration module, have great convenience for the user the communication to all kinds of mass production equipment configuration and
Property management.