Background technology
The exploitation of field bus technique starts from the eighties in 20th century.Along with the development of microprocessor technology, computer network system is developed rapidly, and the scope of information communication contact constantly enlarges.Industrial Ethernet EPA standard be China first have the standard for Fieldbus of independent intellectual property right, also be the up to now first industrial automation standard that is received and issue by ISO (International Standards Organization) of China, realized China's industrial automation international standard breakthrough of zero.
And be in the observing and controlling automated system of enterprise production process basic unit, still realizing man-to-man communication connection by switch, valve and sensing measurement instrument, simulating signal with voltage and current is measured control, or adopt the distributing system of certain self-closed type, between the realization equipment and the message exchange between system and the external world, make automated system become " information island ", seriously restricted the development of industry itself.
Fieldbus will be the developing direction of futurity industry control system, the information that realizes enterprise is integrated, Comprehensive Automation, just must design a kind ofly can move at industrial environment, communication system that reliability is high, real-time and cheap, form factory's bottom-layer network, finish the multipoint digital communication between the on-the-spot automation equipment, realize between the field apparatus and the message exchange in automation equipment and the external world.Intelligent valve positioner based on the EPA standard involved in the present invention has important practical significance for enlarging the EPA application.
Summary of the invention
The objective of the invention is: a kind of intelligent valve positioner based on the EPA standard is provided, solves existing valve positioner and can't carry out digitizing, the problem of networking.
For achieving the above object, the technical scheme that adopts is: based on the intelligent valve positioner of EPA standard, comprise communication card and main control card two parts, communication card is realized the communication of EPA network, main control card is realized the control of valve position of pneumatic control valve, it is characterized in that: described communication card is made of network transformer, ethernet controller, ARM microprocessor, FLASH storer and power circuit, and described network transformer is realized the isolation of EPA signal; Described ethernet controller is in order to realize the transmitting-receiving of network data, and described power circuit is got from the EPA signal and can be each modular circuit power supply; The ARM microprocessor is in order to the transmitting-receiving of data between realization and the ethernet controller; Described main control card is made of I/P converting unit, MSP430 microprocessor, monitoring panel, potentiometer, described I/P converting unit also comprises two piezo electric valves and gas circuit control and amplifier section, and its function is electric signal is converted to the action that pneumatic singal drives valve position; The MSP430 microprocessor is realized control to the I/P converting unit according to the feedback signal of potentiometer; Button and LCD show as the monitoring panel, can correlation function or menu be set according to user's request; Realize bi-directional digital communication by the Modbus agreement between described ARM microprocessor and the MSP430 microprocessor.
Described ARM microprocessor adopts ARM7 chip AT91R40008.
Described ARM microprocessor is connected with FLASH chip SST39VF1601.
Described ethernet controller adopts the AX88796 chip with EPA chip interface compatibility.
Advantage of the present invention is: adopt the mode of total digitalization to realize control to pneumatic control valve, and can realize digital communication with system, instrument and terminal in Industrial Ethernet by the EPA network, have stronger antijamming capability and traffic rate faster; System adopts bus-powered mode, does not need additional power supply, has reduced the complicacy of installing, and has improved security and economy; Can make the user by Ethernet interface the intelligent valve positioner in the EPA network be controlled and be accessed, make and to transmit production run measurement and control information between control system and the field instrument, and can transmit a large amount of non-control information of field instrument, so that the integrated possibility that becomes of the management of industrial enterprise control.
Embodiment
As seen shown in Figure 1 by hardware connection side block diagram of the present invention, intelligent valve positioner based on the EPA standard, comprise communication card and main control card two parts, communication card is realized the communication of EPA network, main control card is realized the control of valve position of pneumatic control valve, it is characterized in that: described communication card is made of network transformer, ethernet controller, ARM microprocessor, FLASH storer and power circuit, and described network transformer is realized the isolation of EPA signal, improves the antijamming capability of system; Described ethernet controller is in order to realize the transmitting-receiving of network data, and described power circuit is got from the EPA signal and can be each modular circuit power supply; The ARM microprocessor is in order to the transmitting-receiving of data between realization and the ethernet controller; Described main control card is made of I/P converting unit, MSP430 microprocessor, monitoring panel, potentiometer, described I/P converting unit also comprises two piezo electric valves and gas circuit control and amplifier section, and its function is electric signal is converted to the action that pneumatic singal drives valve position; The MSP430 microprocessor is realized control to the I/P converting unit according to the feedback signal of potentiometer; Button and LCD show and can correlation function or menu be set according to user's request on the monitoring panel; Realize bi-directional digital communication by the Modbus agreement between described ARM microprocessor and the MSP430 microprocessor.
Communication card is made of network transformer, ethernet controller, power circuit, ARM microprocessor, FLASH.Wherein:
Described ARM microprocessor adopts the ARM7 chip AT91R40008 of atmel corp, it mainly contains 16 bit instruction collection of high-performance 32-bit RISC architecture, high instruction density, embedded ICE unit, 32 256K monocycles and accesses SRAM, complete external bus interface able to programme, supports nearly 8 silvers to select signal, volume little, stable and reliable for performance, and arithmetic speed satisfies the requirement of communication and control.
Described ethernet controller adopts the AX88796 of the ASIC company chip with EPA chip interface compatibility, has realized the transmitting-receiving of network data.
Described ARM microprocessor is not directly controlled AX88796, and it only carries out the reading and writing operation to the EPA chip.The EPA chip has been realized the communication interface with AX88796, and the data that will send are sent to AX88796, reads simultaneously the data in the AX88796 reception buffer memory.The EPA chip links to each other with microcontroller by 16 bit data bus, realizes receiving joining the communication scheduling formation from the data of microcontroller and with it, realizes that simultaneously the network data that receives from AX88796 is sent to microcontroller.Because AT91R40008 does not have built-in FLASH, thus FLASH chip SST39VF1601 configured, in order to deposit code and data.SST39VF1601 is 2M byte FLASH, with AT91R40008 be 16 bit data bus interfaces.In program when operation, copy code among the FLASH to first in the internal SRAM of AT91R40008 and rerun, and improved travelling speed and stability, reduced power consumption.Power circuit is from the Ethernet power taking, and is the needed supply voltage of each module of system with the 24V voltage transitions.
Main control card is made of I/P converting unit, MSP430 microprocessor, monitoring panel (LCD shows and button), potentiometer.The I/P converting unit also comprises gas circuit control and the amplifier section of two piezo electric valves and composition thereof, and its function is electric signal is converted to the action that pneumatic singal drives valve position; The MSP430 microprocessor function is to realize on the one hand the digital communication with the ARM microprocessor, realizes control to the I/P converting unit according to the feedback signal of potentiometer simultaneously; Button and LCD show as the monitoring panel can arrange correlation function or menu according to user's request.
Software of the present invention comprises EPA communication card software and main control card software two parts.It is characterized in that EPA communication card software mainly comprises Hardware drive module and EPA protocol stack bag.Main control card software comprises that mainly parameter self-tuning program, button and LCD drive, control master routine and working procedure.The present invention has used the EPA protocol stack of standard, makes the present invention can access any standard EPA of manufacturer network.A/D sampling process flow diagram and main program flow chart are shown in Fig. 2 and Fig. 3.
(1) EPA communication card software
The EPA protocol stack sofeware has adopted the real-time kernel of multitask, and main modular has ICP/IP protocol stack, IEEE1588 precise synchronization protocol engine, EPA deterministic schedule engine, EPA management information bank, EPA application service and EPA management service.
The hardware drive program module has comprised the contents such as the initialization (comprise start-up code, peripherals configuration, interrupt vector setting, storehouse arrange etc.), ethernet controller driver (network interface initialization and reception send data), Flash driving of processor.
The EPA protocol stack sofeware is realized the task of three aspects: namely data (comprising in real time and non-real-time data) transmission service, the service interface that provides for client layer and EPA management service (comprise that equipment is identified automatically, system clock synchronously, the management of management, equipment item number and other information of working state of system etc.).EPA communication is based on the UDP/IP agreement, for the client layer application program provides in real time and the non-real-time data transmission service.EPA communication protocol has realized three kinds of communication mechanisms such as client/server, publisher/subscriber, report distribution, and wherein Client/Server is mainly used in uploading/downloading of configuration info, the inquiry of facility information, and the download of user-written subroutine etc.; Publisher/subscriber communication then be for the production of the process real-time information (as measure, the control data) cyclical transmission etc., usually adopt the transmission mode of broadcasting, multicast, clean culture; Report distribution then is for the transmission of control procedure warning message etc., usually adopts the communication of multicast/broadcast issue.
The requirement that EPA application layer services interface mainly transmits according to process control information, be the exploitation of the data communication between the client layer application program, and realize following service: upload in territory management, territory, territory download, incident management, event report, affirmation event report, change that event guard condition, variables access, variable are read, variable is write and information distribution services.The EPA management service is the important component part in the EPA communication protocol.Following system management function is mainly finished in the EPA system management: recognition of devices, object location, address assignment, clock synchronous and functional block scheduling.IEEE1588 also is referred to as the PTP accurate clock synchronization protocol, has the high characteristics of synchronization accuracy.In the EPA protocol stack sofeware, realized the precision clock synchronization engine of complete PTP agreement.IEEE1588 precise synchronization engine mainly comprises the modules such as clock synchronization algorithm, local precision clock and local data sets.It receives and dispatches message on the EPA network by TCP/IP in the mode of multicast or multicast.The mode that the local clock module adopt to be interrupted is safeguarded an accurate local clock, and precision can determine according to actual needs, and IEEE1588 can reach the synchronization accuracy of nanosecond in theory.EPA deterministic schedule purpose is the uncertainty that sends in order to solve the Ethernet message, and the EPA deterministic schedule guarantees to only have an equipment sending message at each moment network, has avoided the caused message transmission of the collision of message uncertainty on the network.EPA deterministic schedule engine implementation complete EPA deterministic schedule mechanism.
(2) main control card software
Certainly adjusting among the present invention mainly comprises the following aspects: determine that 1. 2. the positive and negative effect of topworks determine that 3. zero point of topworks and stroke measure the execution time and determine that 4. 5. minimum pulse optimize transient response.