Background technology
What require along with the continuous expansion of production of hydrocarbons scale with to Automation of Manufacturing Process improves constantly, utilize the basic means of data conversion technique as DATA REASONING, acquisition process and process control, and the distributed monitoring system combining with computer technology, mechanics of communication, having replaced integrated system becomes the trend of operating system hardware advances.Wherein, long-haul telemetry terminal control unit (RTU) is as one conventional in distributed monitoring system, and its application is more and more universal.Long-haul telemetry terminal control unit (RTU) is widely used at Chinese Petroliferous as the product that embodies " observing and controlling disperses, manages and concentrate " thinking.
Long-haul telemetry terminal control unit (RTU) is the abbreviation of REMOTE TERMINAL UNIT, for monitoring, the application of control and data acquisition, integrate remote measurement, remote signalling, remote regulating, distant control function, and be widely used in various data acquisitions and monitor operating system (Supervisory Control And Data Acquisit, SCADA).
Conventionally, long-haul telemetry terminal control unit (RTU) is to be conventionally made up of several major parts such as CPU (central processing unit) (microprocessor), communication interface, storage unit, simulating signal input-output unit, switching signal input-output unit, digital signal input-output unit, power supply units.In addition,, according to practical application request, some long-haul telemetry terminal control units (RTU) product has also increased some specific functions, as the function such as video, hardware redundancy.
At engineering construction scene, although existing long-haul telemetry terminal control unit has carried different independently programs according to its inner operating system of different application scene, for industry is provided convenience, long-haul telemetry terminal control unit is also along with the development development of technology, serve the long-haul telemetry terminal control unit of oil on-site data gathering industry and install in a large number, be also widely used in the fields such as electric power, water conservancy, the energy, environmental protection, traffic, Geographic Information System.At present, due to the difference of the dispersion of oil gas factory mouth geographic position, operating mode etc., long-haul telemetry terminal control unit is proposed to following demand:
1, long-haul telemetry terminal control unit is at data acquisition control scene, needs that acknowledge(ment) signal type is various, interface is counted abundant, gathers unlike signal type, the different production scenes signal larger demand of difference of counting to adapt to production scene.
2, long-haul telemetry terminal control unit need to be on communication mode compatible different communication modes, user can be according to site environment, selects to realize the interconnection with field controller from communication.
3, because Oil Field is various, circumstance complication, long-haul telemetry terminal control unit can suffer in the course of the work thunderbolt, heavy current, storer damage etc., so more need the stable of long-haul telemetry terminal control unit system.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Below with reference to Figure of description, describe the present invention in detail.
Fig. 1 the invention provides a kind of long-haul telemetry terminal control unit schematic diagram.As shown in Figure 1, described long-haul telemetry terminal control unit comprises microprocessor, communication module, data acquisition and control module, memory module, hardware watchdog, power module,
Wherein, described hardware watchdog is connected with microprocessor, for monitor operating system software program operation conditions; Described communication module comprises communication interface, and communication module is connected with microprocessor, communicates for long-haul telemetry terminal control unit and external device; Described data acquisition and control module comprises data acquisition and control interface, and data acquisition and control module is connected with microprocessor, for long-haul telemetry terminal control unit, on-the-spot IO interface is carried out to data collection and control; Described power module is connected with microprocessor; It comprises primary storage, secondary storage, internal memory described memory module, and described primary storage, secondary storage, internal memory are connected with microprocessor respectively, and described primary storage is for storage operation system; Described secondary storage is for storing the operating system identical with primary storage and boot loader.
Further, described primary storage is connected with microprocessor by parallel interface, and described secondary storage is connected with microprocessor by serial line interface.
Further, described primary storage adopts Nand-flash, and secondary storage adopts SPI-fLASH, and internal memory adopts SDRAM.
Further, described operating system adopts linux operating system.
Further, described boot loader comprises: bootstrap, U-boot; Described bootstrap is used for starting U-boot; U-boot is for school inspection operating system and read the operating system in secondary storage.
Further, described communication module comprises Ethernet interface, RS232 interface, RS485 interface.
Further, described Ethernet interface adopts 10/,100,000,000 adaptive network interfaces; Described RS232 interface, RS485 interface are for receiving and send the data that meet Modbus agreement.
Further, described data acquisition and control interface comprises DI interface, DO interface, AI interface, AO interface, PI interface.
Further, between described microprocessor and communication module, data acquisition and control module, be provided with photoelectrical coupler.
A kind of specific embodiment below in conjunction with a kind of long-haul telemetry terminal control unit of the present invention describes the present invention in detail.
Fig. 2 is a kind of long-haul telemetry terminal control unit of the present invention embodiment device schematic diagram, as shown in the figure, the long-haul telemetry terminal control unit of described the present embodiment comprises microprocessor, hardware watchdog, memory module, power module, wireless communication module, Ethernet interface, RS232 interface, RS485 interface, DI interface, DO interface, AI interface, AO interface, PI interface.Described hardware watchdog, power module, ZIGBEE communication module, Ethernet interface, RS232 interface, RS485 interface, DI interface, DO interface, AI interface, AO interface, PI interface are connected with microprocessor respectively.It comprises primary storage, secondary storage, internal memory described memory module, and described primary storage, secondary storage, internal memory are connected with microprocessor respectively.
Described primary storage is Nand-flash, and it is connected with microprocessor by parallel interface, for storage operation system.Described pair is stored as SPI-flash, and it is connected with microprocessor by serial line interface, for storing standby operation system and boot loader.Internal memory adopts SDRAM, and it is connected with microprocessor by parallel interface.
Described boot loader comprises bootstrap and U-boot, starts U-boot by bootstrap.First school checking functions by U-boot examines the operating system in Nand-flash in school:
If school inspection is correct, the operating system that remote-terminal controller directly starts Nand-flash is moved;
If school error detection mistake, the operating system that U-boot can read in SPI-flash arrives internal memory, then the operating system in internal memory is write to Nand-flash, and then whether the operating system in school inspection Nand-flash is correct again, if school inspection is correct, starts the operating system in Nand-flash, if mistake, illustrate that Nand-flash may comprise bad piece of large area, cannot continue to use, and then now directly start operating system in internal memory so that long-haul telemetry terminal control unit normally moves.
Described hardware watchdog is connected with microprocessor, for monitoring the present embodiment long-haul telemetry terminal control unit operating system software program operation conditions.Power module adopts DC/DC insulating power supply module.More specifically; the isolation voltage of described DC/DC insulating power supply can reach 2 kilovolts of DC, and allows 18~36 volts of DC input ranges, and work efficiency reaches 86%; support reverse connecting protection and short-circuit protection, to reduce the electromagnetic interference (EMI) of the present embodiment long-haul telemetry terminal control unit system.
The present embodiment long-haul telemetry terminal control unit adopts RS485 interface, RS232 interface and other equipment to carry out communication, also can pass through with wireless communication mode and other device talks, can also be by Ethernet interface and device talk, and use microprocessor to complete the repertoires such as control, collection, computing, Communication processing.
Described RS485 interface and RS232 interface sending and receiving meet the data of Modbus agreement.The data transmission that interface receives is in operating system, and the data transmission that interface sends arrives other equipment outside long-haul telemetry terminal control unit.Described RS485 interface, RS232 interface are equipped with photoelectrical coupler, described photoelectrical coupler is used at described each interface in the time carrying out signal transmission with outside, once suffer strong surge impact, limit its damage envelope in this functional unit inside, other functional unit is unaffected, can continue to make the work of long-haul telemetry terminal control unit, reach and reduce the object that surge destroys.
Described Ethernet interface can adopt 10/,100,000,000 adaptive network interfaces, for carrying out the data interaction between long-haul telemetry terminal control unit and network.
Described ZIGBEE communication module sending and receiving meets the data of ZIGBEE agreement, to make interconnection, control and the exchanges data of long-haul telemetry terminal control unit and other wireless instruments (as the instrument such as Wireless loading, wireless angular displacement).
Further illustrate the present embodiment, described communication module comprises 3 road RS485 interfaces, 2 road RS232 interface 1 road Ethernet interfaces, 1 road ZIGBEE communication interface.
As shown in Figure 2, described AI interface comprises AI interface, ADC device, photoelectrical coupler.AI interface is connected with ADC device, and ADC device is connected with microprocessor, and, between ADC device and microprocessor, be provided with photoelectrical coupler.Described ADC device (simulating signal turns digital signal device) is input to microprocessor for the simulating signal of AI interface input is converted to digital signal; photoelectrical coupler is for avoiding AI interface to be subject to strong surge impact, protects in this unit other functional units unaffected.Described AO interface is for outputting analog signal.AO interface comprises AO interface, DAC device, photoelectrical coupler.AO interface is connected with ADC device, and DAC device is connected with microprocessor, and, between DAC device and microprocessor, be provided with photoelectrical coupler.The digital signal that described DAC device (digital signal turns analog signal instrumentation) is exported for microprocessor transfers simulating signal to and is sent to AO interface carries out analog signal output; Photoelectrical coupler is for avoiding AO interface to be subject to strong surge impact, protects in this unit other functional units unaffected.Described DI interface is for supplied with digital signal; DI interface comprises DI interface and photoelectrical coupler; DI interface is connected with microprocessor; and be provided with photoelectrical coupler between DI interface and microprocessor; photoelectrical coupler is for avoiding DI interface to be subject to strong surge impact, protects in this unit other functional units unaffected.Described DO interface is for supplied with digital signal; DO interface comprises DO interface and photoelectrical coupler; DO interface is connected with microprocessor; and be provided with photoelectrical coupler between DO interface and microprocessor; photoelectrical coupler is for avoiding DO interface to be subject to strong surge impact, protects in this unit other functional units unaffected.Described PI interface is for input pulse signal; PI interface comprises PI interface and photoelectrical coupler; PI interface is connected with microprocessor; and be provided with photoelectrical coupler between PI interface and microprocessor; photoelectrical coupler is for avoiding PI interface to be subject to strong surge impact, protects in this unit other functional units unaffected.
AI interface, AO interface, DI interface and DO interface are also provided with resettable fuse and bilateral transient voltage suppression diode (TVS pipe) protects, and further improves the stability of interface transmission data.
More illustrate the present embodiment long-haul telemetry terminal control unit, described AI interface adopts 8 road analog inputs; AO interface adopts 4 road analog outputs; DI interface adopts 8 railway digital amount inputs; DO interface adopts 4 railway digital amount outputs; PI interface adopts 4 road high-speed pulse counting inputs.Like this, long-haul telemetry terminal control unit can gather 8 road analog datas, 8 railway digital amount data, 4 tunnel pulse input data simultaneously.
The present embodiment long-haul telemetry terminal control unit is stored by pair is set, and in the secondary stored memory storage operating system identical with primary storage.The in the situation that of existing bad piece to affect its domestic os startup in primary storage, boot loader in storing by pair goes the operating system in pair storage again to write in primary storage and again start, so just can avoid long-haul telemetry terminal control unit in situation that primary storage cannot start the operating system normally to move, ensure the collection of data.And under extreme case, primary storage is subject to larger damage, cause cannot the situation of write operation system under, can also, by internal storage starting, further strengthen the stability of long-haul telemetry terminal control unit system.
As shown in Figure 3, the present invention also provides a kind of long-haul telemetry terminal control unit system start method, application as above-mentioned long-haul telemetry terminal control unit, and it comprises:
S1, starts the boot loader in secondary storage;
S2, the operating system of described boot loader school inspection primary storage,
If school inspection is correct, directly start the operating system from primary storage;
If school inspection is incorrect, the operating system that boot loader reads secondary storage is to internal memory, then copies in primary storage and the operating system of school inspection primary storage again from internal memory, if school inspection is correct, start the operating system from primary storage, if school inspection is incorrect, from internal storage starting operating system.
Describe a kind of long-haul telemetry terminal control unit of the present invention system start method in detail below in conjunction with Figure of description 4.
Accompanying drawing 4 is a kind of long-haul telemetry terminal control unit of the present invention system start method embodiment flow chart of steps.As shown in Figure 4, the present embodiment comprises:
Start after long-haul telemetry terminal control unit, first bootstrap starts, and after bootstrap starts, starts U-boot by bootstrap; Whether U-boot starts linux operating system in school inspection NAND-flash after starting correct;
If the inspection of U-boot school is correct, start the operating system in NAND-flash, and then long-haul telemetry terminal control unit starts;
If NAND-flash inside exists bad piece or receives other influences, the inspection of U-boot school is incorrect, and the linux operating system reading in SPI-flash is arrived SDRAM by U-boot; Then, the operating system in the linux in SDRAM is written to after NAND-flash again the operating system in school inspection NAND-flash by U-boot, if school inspection is correct, and the operating system in moving NAND-flash, and then long-haul telemetry terminal control unit starts; If still school inspection is incorrect, illustrate and in NAND-flash, has a large amount of bad pieces so that can not normally use, and then operating system in startup SDRAM so that long-haul telemetry terminal control unit normally start.
In the present invention, applied specific embodiment principle of the present invention and embodiment are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.