Summary of the invention
The present invention be directed to existing Profibus DP intelligent electric actuating mechanism and cannot realize the problem of analog quantity control and high reliability, the hold concurrently intelligent electric control executive system of analog quantity control of a kind of on site redundant bus has been proposed, on the basis of intelligent electric actuating mechanism Profibus DP redundancy communication function, increased analog quantity control, can carry out combination in any to analog quantity control signal and Profibus DP Fieldbus Control signal, typical case is set to: control section is realized by traditional analog amount, information feedback and fault diagnosis etc. realize by Profibus DP signal.The realization of this function is in strict accordance with <Profibus Specification:Slave Redundancy V1.2>(standard for Fieldbus: from the V1.2 that requires of equipment redundancy), the same with original Profibus DP redundancy intelligent electric actuating mechanism, this standard form product also can carry out remote monitoring and setting by fieldbus, can set whole parameters by Infrared remote controller, as control mode, ratio Long-distance Control and output alarm switching configuration etc.; In addition, analog quantity control technology is the control technology of DCS system maturation, is convenient to the hold concurrently control system of analog quantity control technology of Profibus DP fieldbus that design has a high reliability.
Technical scheme of the present invention is: the hold concurrently intelligent electric control executive system of analog quantity control of a kind of on site redundant bus, comprise two micro-control units, auxiliary micro-control unit comprises man-machine display interface, position transmitter, DP communication card, power module and low-power consumption treatment circuit; Master control micro-control unit comprises driving circuit, signal processing circuit and electronic moment testing circuit; Between master control micro-control unit and auxiliary micro-control unit, pass through RS-232 swap data; 4~20mA analog input signal send master control micro-control unit after signal processing circuit is processed, electronic moment testing circuit output signal is sent master control micro-control unit, the position detection signal that auxiliary micro-control unit receiving position transmitter is sent here send master control micro-control unit after processing, master control micro-control unit outputs a control signal to driving circuit, three phase electric machine motion is controlled in driving circuit output, and position transmitter detects three phase electric machine motor message and feeds back to auxiliary micro-control unit again; Man-machine interface setup parameter outputs to auxiliary micro-control unit, and auxiliary micro-control unit output state value shows to man-machine interface; Auxiliary micro-control unit is by DP communication card and the communication of Profibus DP main website.
Described auxiliary micro-control unit is selected PIC18F87K90, is with two enhancement mode USART serial communication modules, can connect one or two DP communication cards.Described DP communication card is by AT91SAM7SE256 processor, SPC42, and serial port control circuit, RS485 driving circuit forms, and two DP communication cards are coordinated swap data by serial port control circuit, and RS485 driving circuit is connected with Profibus DP main website.
Beneficial effect of the present invention is: the hold concurrently intelligent electric control executive system of analog quantity control of on site redundant bus of the present invention, first, compatible original Profibus DP redundancy communication protocol function; Secondly, intelligent electric actuating mechanism also can be realized analog quantity control, can carry out combination in any to analog quantity control signal and Profibus DP Fieldbus Control signal.For original Profibus DP redundancy control system, can substantially need not change system wiring, safeguard original investment; Again, analog quantity control is the control technology of DCS system maturation, has improved the high reliability of intelligent electric actuating mechanism, thereby has further improved the Profibus DP fieldbus availability of analog control system of holding concurrently.
Embodiment
The on site redundant bus intelligent electric control executive system theory diagram of analog quantity control of holding concurrently as shown in Figure 1.Whole control divides 2 micro-control units to realize, and master control micro-control unit 8 is responsible for the control and protection part of system, and auxiliary micro-control unit 9 is responsible for demonstration, operation, counting and low power consumption control.Between master control micro-control unit 8 and auxiliary micro-control unit 9, pass through RS-232 swap data.Between auxiliary micro-control unit 9 and DP communication card 6, with RS-232, carry out swap data.Auxiliary micro-control unit 9 comprises man-machine display interface 2, position transmitter 4, Profibus DP communication card 6, power module 7 and low-power consumption treatment circuit 11; Master control micro-control unit 8 comprises driving circuit 3, signal processing circuit 10 and electronic moment testing circuit 12; Driving circuit 3 also comprises the control circuit of solid-state relay and composition thereof; Profibus DP communication card 6 is by AT91SAM7SE256 processor, SPC42, and serial port control circuit, RS485 driving circuit forms.Power module 7 provides power supply for main control microprocessor 8 and support microprocessor 9, from the signal of signal processing circuit 10 and the simulating signal from position transmitter 4, through master control micro-control unit 8, compare computing, according to both deviations, output a control signal to driving circuit 3, driving circuit 3 outputs are controlled three phase electric machine 5 and are moved, and the stroke of three phase electric machine 5 feeds back to auxiliary micro-control unit 9 by position transmitter 4 simultaneously and forms closed-loop control.Meanwhile, outer signals is sent into auxiliary micro-control unit 9 after also can processing by Profibus DP communication card 6, the auxiliary micro-control unit 9 of man-machine interface 2 setup parameter output, and these auxiliary micro-control unit 9 output state values show to man-machine interface 2.
The present invention is by arranging Profibus DP communication card 6, master control micro-control unit 8, auxiliary micro-control unit 9, 4~20mA analog input signal send master control micro-control unit 8 and the position detection signal that the position transmitter 4 receiving from auxiliary micro-control unit 9 is sent here to process through master control micro-control unit 8 through signal processing circuit 10, compare computing, according to both deviations, output a control signal to driving circuit 3, location the drive motor 5 of realizing intelligent electric actuating mechanism move, the stroke of motor 5 feeds back to auxiliary micro-control unit 9 by position transmitter 4 simultaneously and forms closed-loop control, meanwhile, Profibus DP communication card 6 receives the data from Profibus DP main website by running order Profibus DP redundancy communication interface, is transmitted to auxiliary micro-control unit 9 on intelligent electric actuating mechanism body and processes, the result of processing sends to Profibus DP main website through in running order Profibus DP redundancy communication interface.In the present invention, when Long-distance Control source is set to Profibus DP communication, primary variables, control information, other procedure parameters, device configuration, calibration and configuration info are are all received and dispatched by Profibus DP redundancy communication interface by auxiliary micro-control unit 9 on intelligent electric actuating mechanism body, and Profibus DP communication card 6 is responsible for realizing two-way Profibus DP interface and is automatically switched in working order and between stand-by state.
(1) master control micro-control unit 8
The inner integrated 8 Channel 12-Bit ADC converters of master control micro-control unit 8,12 DAC converters of 2 channel voltage type, up to data XRAM storer in 62KB in-chip FLASH/EEROM storer, 4KB in-chip FLASH/EERAM storer and 2KB sheet, can save many peripheral chips, greatly simplify hardware circuit design.
(2) auxiliary micro-control unit 9
PIC18F87K90 has a series of serial communication peripheral hardwares, comprising two enhancement mode USART serial communication modules; 24 12, tunnel A/D converters; LP WatchDog Timer (WDT); Band LCD driver; Up to the FLASH storer of 128KB, the RAM storer of 4KB, can save many peripheral chips, greatly simplify hardware circuit design.
(3) Profibus DP communication card 6
Consider that in the development plan of original DP communication card, processor resource is very limited, and field programming inconvenience, therefore adopt specifically the mentality of designing of AT91SAM7SE256 processor+SPC42.This Profibus DP communication card 6 is by AT91SAM7SE256 processor, SPC42, and serial port control circuit, RS485 driving circuit forms.Adopt after AT91SAM7SE256, the integrated 256kB Flash of this chip internal and SRAM, only need a little peripheral components to move, and support JTAG online programming, also can utilize the abundant peripheral hardware resource of this chip simultaneously, UART0 is as carrying out the passage of exchanges data with topworks mainboard, and UART1 is as redundant data interchange channel between two DP communication boards.Every DP communication card is except realizing the Profibus DPV0 of standard, outside DPV1 function, also by this redundant channel of dual port RAM and another piece DP communication card swap data.As shown in Figure 2 between two DP communication cards and electric operator body by serial ports swap data.Therefore by serial port control circuit, between two communication cards, coordinate, guarantee that exchanges data is effective fast.Every DP communication card moves by watch dog monitoring program, once overtime, is autoboot.Between DP communication card and Profibus DP network, by RS-485 driving circuit, realize electrical isolation and RS-485 driving.
About analog quantity communication card and DP communication card, we adopt modular mentality of designing.In Fig. 2, DP_Board_A and DP_Board_B hardware are just the same, just by wire jumper, are configured to difference in functionality; 4-20mA Input Board is on the one hand as 4-20mA signal imitation amount tablet, on the other hand as the card extender of DP communication card.First the signal accessing from the patching panel of topworks outside receives 4-20mA Input Board, then by the connector on this plate, links DP_Board_A or DP_Board_B again.Can select only to weld 4-20mA signal tablet device or DP communication card card extender device according to the needs of Practical Project, or all weld up, realize different function combinations.
DP_Board_A or DP_Board_B can select to place one or two according to actual needs.By the different combination of DP_Board_A, DP_Board_B and 4-20mA Input Board, can realize following function:
1) binary channels DP redundancy+4-20mA input, as shown in Figure 3;
2) single channel DP communication+4-20mA input, as shown in Figure 4;
3) binary channels DP communication, as shown in Figure 5;
4) single channel DP communication, as shown in Figure 6;
5) 4-20mA input, as shown in Figure 7.
When normally powering on, the initialization respectively of two DP communication cards and 4-20mA analog signal input card, if control mode is long-range Profibus DP communication, next two DP communication cards are by redundant channel co-ordination state, and two DP communication cards will be respectively in one of following two states:
S_Primary: this DP communication card and Profibus DP main website set up exchanges data relation, realize Profibus DP bus communication;
S_Waiting: this DP communication card, all the time in init state, is not realized Profibus DP bus communication.
In two DP communication cards, there is one to enter S_Primary state, by Profibus DP slave station state machine, carry out sequence starting, once receive correct SET_PRM message, think that this DP communication card starts successfully, and set up correspondence with Profibus DP main website.If in predetermined starting time (Start_Up_Time), do not start in the normal order, in the DP of S_Primary state communication card, can notify the communication card in the DP of S_Waiting state by redundant channel, think this DP communication card fault, redundancy switching is carried out in requirement, now in the DP of S_Primary state communication card, be switched to S_Waiting state, and switching to S_Primary state in the DP of S_Waiting state communication card, the DP communication card that has just been switched to S_Primary state continues to wait for main website initialization command.Once main website is successful by the DP communication card initialization in S_Primary state, and enters exchanges data state.This DP communication card just keeps S_Primary state always, notifies the communication card in the DP of S_Waiting state by redundant channel simultaneously.Two DP communication card start-up courses are illustrated in fig. 8 shown below.
In Profibus DP main website and Profibus DP redundancy communication interface, before DP communication card swap data, main website must define slave station parameter this slave station of configuration, completes slave station (DP communication card) power-up initializing process.Slave station (DP communication card) initialization procedure is as shown in Figure 9: first Profibus DP main website checks that the DP communication card (slave station) of Profibus DP redundancy communication interface is whether in bus, if this DP communication card is in running order, main website checks DP communication card preparation by request slave station diagnostic data, when when in running order DP communication card report, it has been ready to, main website sends to this DP communication card by slave station supplemental characteristic and configuration data, and whether main website asks the diagnostic data of slave station ready to be sure of this DP communication card again.Complete after parametrization and configuration data contrast, main website starts and in running order DP communication card circulation exchanging user data.Now in running order DP communication card is notified in the DP of stand-by state communication card current state information, realizes information redundancy.
Two DP communication cards of Profibus DP redundancy communication interface can carry out redundancy switching in two kinds of situations below again, make to be switched to duty in the DP of stand-by state communication card, and in running order DP communication card is switched to stand-by state.
1) Profibus DP redundancy communication interface keeps the supervision to its internal state always, once detect that (fault type is by <Profibus Specification:Slave Redundancy V1.2> requirements definition) occurs certain fault, as WatchDog Timer overflows, in Profibus DP redundancy communication interface, two DP communication cards carry out duty switching.
2) main website detects that communication line breaks down or non-fault between in running order DP communication card, but in the situation for other objects, main website sends state switch command to this DP communication card, and this DP communication card will carry out duty switching after receiving main website redundancy switching command.
In redundancy handoff procedure, regulation Profibus DP redundancy communication interface is carrying out can not changing slave station output signal in duty handoff procedure, when the DP communication card in stand-by state is switched to after duty, first it adopt before this output data that in running order DP communication card passes over by the redundant channel currency as it, after only first data exchange process after redundancy is switched completes, the DP communication card that has just been switched to duty just can write new output valve to its output buffer.Stability and the continuity of input/output signal have so just been guaranteed.
In running order DP communication card is when proper communication, can start inner house dog Twd communication process is monitored, once Twd overflows, represent that this DP communication card communication breaks down, now, on the one hand by being outputted under fail safe pattern of this DP communication card, starting on the other hand redundancy and switch.At timer Toh of the inner increase of every DP communication card of Profibus DP redundancy communication interface, monitor that the rear in running order DP communication card of redundancy switching and Profibus DP main website set up the time of proper communication, once Toh exceedes preset value, just in running order DP communication card fails to set up correspondence with Profibus DP main website, whole Profibus DP redundancy communication interface enters fail safe pattern, the Safety output value of configuration and setting will be passed to intelligent electric actuating mechanism body as Profibus DP redundancy communication interface output valve, realize electric motor protecting.If receive main website request of data before Toh overflows, stop Toh timing.