Background technology
Constantly expanding and improving constantly Automation of Manufacturing Process requirement along with production of hydrocarbons scale, utilizes data conversion technique
As the basic means of DATA REASONING, acquisition process and process control, and the distribution combined with computer technology, mechanics of communication
Formula monitoring system, having replaced integrated system becomes the trend of operating system hardware advances.Wherein, long-haul telemetry terminal controller
(RTU) as one conventional in distributed monitoring system, its application is the most universal.Long-haul telemetry terminal controller (RTU)
It is widely used at Chinese Petroliferous as the product embodying " observing and controlling dispersion, management are concentrated " thinking.
Long-haul telemetry terminal controller (RTU) is the abbreviation of REMOTE TERMINAL UNIT, is used for monitoring, controlling and data
The application gathered, integrates remote measurement, remote signalling, remote regulating, distant control function, and in various data acquisitions and supervision operating system
(Supervisory Control And Data Acquisit, SCADA) is widely used.
Generally, long-haul telemetry terminal controller (RTU) be generally by CPU (microprocessor), communication interface, deposit
Storage unit, analogue signal input-output unit, switching signal input-output unit, digital signal input-output unit, power supply list
A few major part composition such as unit.Additionally, according to practical application request, some long-haul telemetry terminal controller (RTU) products also increase
Some specific functions are added, such as the function such as video, hardware redundancy.
It is on-the-spot in engineering construction, although existing long-haul telemetry terminal controller is according to its internal operating system of different application scene
Carry different independent programs, provide convenient for industry, long-haul telemetry terminal controller also with the development development of technology,
The long-haul telemetry terminal controller serving oil field data collection industry is installed in a large number, is also widely used in electric power, water conservancy, energy
The fields such as source, environmental protection, traffic, GIS-Geographic Information System.At present, due to the difference of the dispersion of oil gas factory mouth geographical position, operating mode etc.,
To the long-haul telemetry terminal controller following demand of proposition:
1, long-haul telemetry terminal controller is on-the-spot in data acquisition control, needs to accept that signal type is various, interface is counted abundant,
To adapt to production scene and gather unlike signal type, different production scenes signal counts the bigger demand of difference.
2, long-haul telemetry terminal controller needs compatible different communication mode on communication mode, user can according to site environment,
Carry out selecting to realize the interconnection with field controller from communication.
3, various due to Oil Field, circumstance complication, long-haul telemetry terminal controller can suffer in the course of the work thunderbolt,
Heavy current, memorizer damage etc., so more needing stablizing of long-haul telemetry terminal controller system.
Detailed description of the invention
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 retouched
State, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments.Based on the present invention
In embodiment, the every other embodiment that those of ordinary skill in the art are obtained under not making creative work premise,
Broadly fall into the scope of protection of the invention.
Below with reference to Figure of description, describe the present invention in detail.
Fig. 1 is that the present invention provides a kind of long-haul telemetry terminal controller schematic diagram.As it is shown in figure 1, described long-haul telemetry terminal control
Device processed includes 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 logical
News module includes that communication interface, communication module are connected with microprocessor, carries out with external device for long-haul telemetry terminal controller
Communication;Described data acquisition and control module includes that data acquisition and control interface, data acquisition and control module are connected with microprocessor,
For long-haul telemetry terminal controller, on-the-spot input/output interface is carried out data collection and control;Described power module and micro-process
Device is connected;Described memory module it include first memory, second memory, the 3rd memorizer, described first memory,
Two memorizeies, the 3rd memorizer are connected with microprocessor respectively, and described first memory is used for storing operating system;Described
Two memorizeies are for storing the operating system identical with first memory and boot loader.
Further, described first memory is connected with microprocessor by parallel interface, and described second memory passes through serial interface
Mouth is connected with microprocessor.
Further, described first memory uses Nand-flash, and second memory uses SPI-fLASH, the 3rd memorizer
Use SDRAM.
Further, described operating system uses linux operating system.
Further, described boot loader includes: bootstrap, U-boot;Described bootstrap is used for starting U-boot;
U-boot is for school inspection operating system and reads the operating system in second memory.
Further, described communication module includes Ethernet interface, RS232 interface, RS485 interface.
Further, described Ethernet interface uses 10/,100,000,000 adaptive network interfaces;Described RS232 interface, RS485 connect
Mouth is for receiving and sending the data meeting Modbus agreement.
Further, described data acquisition and control interface includes DI interface, DO interface, AI interface, AO interface, PI interface.
Further, it is provided with photoelectrical coupler between described microprocessor and communication module, data acquisition and control module.
A kind of specific embodiment below in conjunction with the present invention a kind of long-haul telemetry terminal controller describes the present invention in detail.
Fig. 2 is one long-haul telemetry terminal controller embodiment device schematic diagram of the present invention, as it can be seen, described the present embodiment
Long-haul telemetry terminal controller include 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.Institute
State hardware watchdog, power module, ZIGBEE communication module, Ethernet interface, RS232 interface, RS485 interface, DI connect
Mouth, DO interface, AI interface, AO interface, PI interface are connected with microprocessor respectively.Described memory module it include first
Memorizer, second memory, the 3rd memorizer, described first memory, second memory, the 3rd memorizer are respectively with micro-
Processor is connected.
Described first memory is Nand-flash, and it is connected with microprocessor by parallel interface, is used for storing operating system.
Described second memory is SPI-flash, and it is connected with microprocessor by serial line interface, is used for storing alternate operating system and opening
Dynamic loading procedure.3rd memorizer uses SDRAM, and it is connected with microprocessor by parallel interface.
Described boot loader includes bootstrap and U-boot, starts U-boot by bootstrap.Pass through U-boot
School checking functions first school inspection Nand-flash in operating system:
If school inspection is correct, then remote-terminal controller directly initiates the operating system of Nand-flash and runs;
If school error detection is by mistake, then U-boot can read the operating system in SPI-flash to the 3rd memorizer, then deposits the 3rd
Operating system in reservoir writes Nand-flash, and then the operating system in school inspection Nand-flash is the most correct again, if
School inspection is correct, then start the operating system in Nand-flash, if mistake, then explanation Nand-flash may be included greatly
Area bad block, it is impossible to be continuing with, and then now directly initiate the operating system in the 3rd memorizer so that long-haul telemetry terminal control
Device processed is properly functioning.
Described hardware watchdog is connected with microprocessor, is used for monitoring the present embodiment long-haul telemetry terminal controller operating system software
Program operation conditions.Power module uses DC/DC insulating power supply module.More specifically, described DC/DC insulating power supply
Isolation voltage can reach 2 kilovolts of DC, and allow 18~36 volts of DC input ranges, work efficiency reaches 86%, supports anti-
Connect protection and short-circuit protection, to reduce the electromagnetic interference of the present embodiment long-haul telemetry terminal controller system.
The present embodiment long-haul telemetry terminal controller uses RS485 interface, RS232 interface and other equipment to carry out communication, it is possible to
With by with wireless communication mode and other device talks, it is also possible to by Ethernet interface and device talk, and use micro-process
Device completes the repertoires such as control, collection, computing, Communication processing.
Described RS485 interface and RS232 interface send and receive the data meeting Modbus agreement.Interface received data
Being transferred in operating system, the data that interface is sent are transferred to other equipment outside long-haul telemetry terminal controller.Described RS485
Interface, RS232 interface are equipped with photoelectrical coupler, and described photoelectrical coupler is for carrying out letter at each interface described with outside
During number transmission, once suffering strong surge impact, limit its damage envelope inside this functional unit, other functional unit is not
Impacted, can continue to make long-haul telemetry terminal controller work, reduce the purpose that surge destroys.
Described Ethernet interface can use 10/,100,000,000 adaptive network interfaces, be used for carrying out long-haul telemetry terminal controller with
Data interaction between network.
Described ZIGBEE communication module sends and receives the data meeting ZIGBEE agreement, in order to make long-haul telemetry terminal controller
Interconnection, control and data exchange with other wireless instruments (such as the instrument such as Wireless loading, wireless angular displacement).
Further illustrating the present embodiment, described communication module includes 3 road RS485 interfaces, 2 RS232 interface 1 road, road Ethernets
Interface, 1 road ZIGBEE communication interface.
As in figure 2 it is shown, described AI interface includes AI interface, ADC device, photoelectrical coupler.AI interface and ADC device phase
Connecting, ADC device is connected with microprocessor, and, it is provided with photoelectrical coupler between ADC device and microprocessor.Described
ADC device (analogue signal turns digital signal device) is input to for the analogue signal that AI interface inputs is converted to digital signal
In microprocessor, photoelectrical coupler, for avoiding AI interface by strong surge impact, protects other function lists in this unit
Unit is unaffected.Described AO interface is used for exporting analogue signal.AO interface includes AO interface, DAC device, photoelectrical coupler.
AO interface is connected with ADC device, and DAC device is connected with microprocessor, and, arrange between DAC device and microprocessor
There is photoelectrical coupler.Described DAC device (digital signal turns analog signal instrumentation) turns for the digital signal of microprocessor output
For analogue signal and be sent to AO interface be simulated signal output;Photoelectrical coupler is for avoiding AO interface by strong wave
Gushing impact, in protecting this unit, other functional units are unaffected.Described DI interface is used for supplied with digital signal, DI interface bag
Including DI interface and photoelectrical coupler, DI interface is connected with microprocessor, and is provided with photoelectricity between DI interface and microprocessor
Bonder, photoelectrical coupler is for avoiding DI interface by strong surge impact, and in protecting this unit, other functional units are not
Impacted.Described DO interface is used for supplied with digital signal, and DO interface includes DO interface and photoelectrical coupler, and DO interface is with micro-
Processor is connected, and is provided with photoelectrical coupler between DO interface and microprocessor, and photoelectrical coupler is used for avoiding DO interface
By strong surge impact, in protecting this unit, other functional units are unaffected.Described PI interface is believed for input pulse
Number, PI interface includes that PI interface and photoelectrical coupler, PI interface are connected with microprocessor, and PI interface and microprocessor
Between be provided with photoelectrical coupler, photoelectrical coupler for avoid PI interface by strong surge impact, in protecting this unit
Other functional units are unaffected.
AI interface, AO interface, DI interface and DO interface are additionally provided with resettable fuse and bidirectional transient voltage suppresses two poles
Pipe (TVS pipe) protects, and improves the stability of interface transmission data further.
More specific explanation the present embodiment long-haul telemetry terminal controller, described AI interface uses 8 road analog inputs;AO connects
Mouth uses 4 road analog outputs;DI interface uses 8 railway digital amount inputs;DO interface uses 4 railway digital amount outputs;PI connects
Mouth uses 4 road high-speed pulse countings inputs.So, long-haul telemetry terminal controller can gather simultaneously 8 road analog datas,
8 railway digital amount data, 4 tunnel pulse input data.
The present embodiment long-haul telemetry terminal controller is by arranging second memory, and storage and the first storage in second memory
The operating system that device is identical.Exist in first memory bad block affect its domestic os start in the case of, by second
Boot loader in memorizer is again started up in going the operating system in second memory is re-written to first memory, this
In the case of sample just can avoid first memory cannot start operating system, long-haul telemetry terminal controller can also be properly functioning,
The collection of guarantee data.And, in extreme circumstances, first memory is by bigger damage, and causing cannot write operation system
In the case of system, it is also possible to started by the 3rd memorizer, further enhance the stability of long-haul telemetry terminal controller system.
As it is shown on figure 3, the present invention also provides for a kind of long-haul telemetry terminal controller system start method, application is as above-mentioned the most distant
Survey terminal controller, comprising:
S1, starts the boot loader on second memory;
S2, the operating system of described boot loader school inspection first memory,
If school inspection is correct, then directly start operating system from first memory;
If school inspection is incorrect, then the operating system of boot loader reading second memory is to the 3rd memorizer, then deposits from the 3rd
Reservoir copies to interior and school inspection first memory again the operating system of first memory, if school inspection is correct, then from first memory
Start operating system, if school inspection is incorrect, then start operating system from the 3rd memorizer.
One long-haul telemetry terminal controller system start method of the present invention is described in detail below in conjunction with Figure of description 4.
Accompanying drawing 4 is one long-haul telemetry terminal controller system start method embodiment flow chart of steps of the present invention.As shown in Figure 4,
The present embodiment includes:
After starting long-haul telemetry terminal controller, first bootstrap starts, and bootstrap is opened by bootstrap after starting
Dynamic U-boot;The linux operating system that U-boot starts after starting in school inspection NAND-flash is the most correct;
If the inspection of U-boot school is correct, then start the operating system in NAND-flash, and then long-haul telemetry terminal controller starts;
If there is bad block inside NAND-flash or receiving other influences, the inspection of U-boot school is incorrect, then U-boot will read
Linux operating system in SPI-flash is to SDRAM;Then, U-boot is by the operating system in the linux in SDRAM
It is written to after NAND-flash again the operating system in school inspection NAND-flash, if school inspection is correct, then moves NAND-flash
Interior operating system, and then the startup of long-haul telemetry terminal controller;If still school inspection is incorrect, NAND-flash internal memory is described
At a large amount of bad blocks so that can not normally use, and then start the operating system in SDRAM so that long-haul telemetry terminal controller is normal
Start.
The present invention applies specific embodiment principle and the embodiment of the present invention are set forth, the explanation of above example
It is only intended to help to understand method and the core concept thereof of the present invention;Simultaneously for one of ordinary skill in the art, according to this
The thought of invention, the most all will change, and in sum, this specification content should not
It is interpreted as limitation of the present invention.