• In railroad rainfall observation system’s long-distance correspondence

    Abstract: Gives one kind to use in the long-distance correspondence the distributed computer and the monolithic integrated circuit network architecture. With emphasis the introduction monolithic integrated circuit and the computer long-distance correspondence’s MODEM software processing method, and gives the part application procedure to refer for the reader. This system success applies in the Railroad Department’s rainfall monitor.

        Key word: Monolithic integrated circuit MODEM long-distance correspondence observation system VB

    Introduction

    The Railroad Department’s rainfall monitor is a related railroad security important link. The flood which excessively causes by the rainfall can affect the railway bed, causes the train traffic accident. Therefore, to guarantee the transportation life the security, should promptly rainfall feedback the rail line to the railway administration department. In the past the rainfall monitor was copies artificially by various stands records the rainfall monitor instrumented data, compiled the railway administration department again. Obviously the information transmission is not prompt, and has the human factor, sets up a file the difficulty.

    Microcomputer’s development and the computer communication’s enhancement, causes each kind of information acquisition the automation, timeliness possibly to become. The author utilizes the microcomputer and the monolithic integrated circuit successfully composes main from the type microcomputer network, constitutes a distributional rainfall observation system the railroad rainfall monitor. This system the monolithic integrated circuit rainfall monitor meter gathering data, collects automatically from MODEM the system main computer, thus causes several hundred kilometer long long-distance correspondence both the economy and to be reliable, sharpened ability which greatly the Railroad Department resists natural calamities.

    First, system structure design

    The rainfall observation system is the host who is composed of the microcomputer and the monolithic integrated circuit from the type microcomputer network. Distributes take the monolithic integrated circuit as the core rainfall monitor meter in railroad various stands. This instrument function has the gathering rainfall, the memory rainfall information, the rainfall warning, the scene rainfall curve printing as well as the correspondence. Control section take personal computer as system main engine. Rainfall observation system structure as shown in Figure 1.

    Sees the system main engine from Figure 1 to be direct and monolithic integrated circuit establishment correspondence relation. Because various stands are far away from the system main engine, in does not attach hardware facility foundations and so on exterior in the segment, adds the MODEM way as well as the telephone line using the monolithic integrated circuit realizes the monolithic integrated circuit long-distance. The system main engine may carry on each kind of establishment and the data acquisition to each station monolithic integrated circuit rainfall monitor meter, the monolithic integrated circuit rainfall monitor meter basis rainfall situation may also automatically to the system main engine transmission current rainfall data, like this may achieve provides the scene promptly the rainfall situation.

    Second, monolithic integrated circuit rainfall monitor meter and long-distance correspondence

    Various stands’ rainfall monitor meter take 8051 series monolithic integrated circuits as CPU, auxiliary has custom-made the liquid-crystal display, SRAM, the hot sensitive -like plotting machine, the rainfall sensor and so on, its functional block diagram as shown in Figure 2. In the chart W87E58 is MCU, its compatible MCS-51 monolithic integrated circuit and has 32KB internal EEPROM.

    The monolithic integrated circuit long-distance correspondence connects MODEM by ST16C450 to realize. ST16C450 is one kind of general asynchronous receive transmitter, the interior has 10 registers, including the MODEM control register and the MODEM condition register. MCU realizes through these 2 register’s operation to MODEM the control and understands MODEM the active status, thus carries on the data communication smoothly. Before ST16C450 carries on the correspondence, first to carry on the initialization to it, namely establishment baudrate, correspondence data format, whether to use the interrupt and so on. After ST16C450 initialization, may use the procedure inquiry or the interrupt mode carries on the correspondence.

    The MODEM use mainly has the following 4 operations:

    ①Initialization MODEM;

    ②Digit dialing;

    ③Reply arrival call;

    ④Hangs up the line, enables MODEM to return to at command phase.

    The MODEM control order collection completes by Hayes at, the procedure may transmit directly (starts by at character to add order and the senate again) the number gives MODEM. But, at order is unable to complete file transfer between system’s, the transmission or the receive document must according to the communication protocol which stipulated in advance complete by the correspondence software.

    The MODEM initialization command string ” AT&FS0=3 “, “&F ” reset MODEM, “S0=3 ” the expression reply bell makes a sound 3 times. The rainfall monitor meter MODEM initialization subroutine is as follows:

    MSTR:MOV R4,#0

    MST0:MOV DPTR,#P3FE; MODEM condition register address

    MST1:MOVX A,@DPTR

    ANL A,#30H

    CJNE A,#30H, MST1

    MOV DPTR,#P3FD; Order wire condition register

    MST2:MOVX A,@DPTR

    JNB ACC.5, MST2

    MOV DPTR,#MTAB

    MOV A, R4

    MOVC A,@A DPTR

    JZ MST3

    MOV DPTR,#P3F3; The data transmission maintains a register

    MOVX @DPTR, A

    INC R4

    SJMP MST0

    MST3:RET

    MTAB:DB 41H,54H,26H,53H,30H,3DH,33H

    DB 0DH,0; AT&FS0=3

    After subroutine execution, MODEM replies ” OK “, indicated that the initialization completes.

    The MODEM digit dialing command string ” ATDTxxxxx “, xxxxx is the telephone number; The digit dialing succeeds when MODEM will reply the string of character which the character starts by ” CONNECT “. After Shan Shuiji and the system main engine connection completes, stipulates the burst correspondence exchange data according to the communication protocol. After the data communication had ended, the procedure transmission hangs up the line command string ” ATH0 “, MODEM automatic broken line, thus completes 1 correspondence.

    Third, the system main engine and the rainfall monitor meter’s correspondence

    The system main engine software establishes with VB5.0, moves in the Windows 95 environment. The entire software by modules and so on correspondence, date report form, monthly statement, year report form, hypothesis, diagram of curves, warning is composed, service platform as shown in Figure 3. The main engine may with 30 stand rainfall monitor meter connections.

    In the procedure uses MSComm to control, through approaches the connection to transmit at order on serial port MODEM to control. The main engine correspondence condition divides into 2 kinds: Initiative correspondence and passive correspondence. Below performs to introduce separately.

    1. initiative correspondence

    Main engine to stand rainfall monitor meter transmission warning setting value and collection at the same day or when the day before yesterday’s rainfall data is called the initiative correspondence. The telephone icon expresses various stands rainfall monitor meter, once is selected, the procedure sends out ” ATDTxxxxx ” the digit dialing order, rainfall monitor meter MDOEM is in the auto answer way to connect. After MODEM connects successfully, the main engine can receive ” CONNECT 4800 ” the information, this time, the main engine may to the stand routing directive and the burst. If the stand receives the correct data, according to the order code (by communication protocol stipulation) may know that the main engine was must the setup parameter to collect at the same day or the day before yesterday’s rainfall data. If collection rainfall data, stand rainfall monitor meter rainfall data transfer for main engine; After the main engine receives the stand correct rainfall data, to the MODEM transmission ” ATH0 ” the off-line on-hook order, finished this correspondence.

    In master station transmission burst including stand number, correspondence code, current date and time, security value and verification and so on information. Started with @K and the @J achievement with the end mark.

    Below is the initiative correspondence main source program:

    Private Sub initiative correspondence (code sending)

    Dim i, j, ss, FsStr, ret

    Establishes permits sufficiently corresponds False

    For i=0 T0 29 ‘work area number

    The If work area selects (i) Then

    Displayed information ” digit dialing ” work area (i) “… “

    FsStr= ” ATDT ” telephone number (i) vbCr

    ‘digit dialing AT order

    ret= transmits at order (FsStr, “CONNECT”, 60000)

    ‘transmission digit dialing order, time limit 60s

    If ret= ” normal ” Then

    FsStr=Format (i, “00″) code sending

    ‘transmission string of character combination

    FsStr=FsStr Format (Now, “yymmddhhmmss”)

    FsStr=FsStr setting value

    FsStr=FsStr computation accumulation and (FsStr)

    FsStr= ” @K ” FsStr ” @J “

    ret= transmits at order (FsStr, “@J”, 5000)

    ‘transmission data, waiting receive string conclusion symbol @J

    If InStr (receive string, “@KCUO@J”) Then

    ‘receives the lower position machine returns is ” wrong “

    Demonstrated that ” the returns has the mistake. “information processing

    Else

    The processing receive string ‘the lower position machine receive is correct

    End If

    Demonstrates ” on-hook… “the information processing

    ret= transmits at order (” “, “OK”, 3000)

    ‘on-hook, waits for OK, time limit 3S

    ret= transmits at order (”ATH0 ” vbCrLf, “OK”, 3000)

    End If

    End If

    Next i

    End Sub

    2. passive correspondence

        When the stand monitors the rainfall surpasses the security value, the driving digit dialing gives the main engine, speaking of the main engine is the passive correspondence. Usually main engine MODEM is also at the auto answer condition, momentarily may receive the stand call. After the mainframe program receives the correct burst, preserves the data record corresponding document, lightens in the service platform this stand alarm indicator lamp reminder user, simultaneously approaches the stand transmission ” the receive is correct ” the information. After the stand receives the main engine correct information, to the MODEM transmission ” ATH0 ” the off-line on-hook order, finished this correspondence. The stand sends in burst including stand number, correspondence code, each kind of rainfall data, warning data and verification and so on information. Started with @K and the @J achievement with the end mark.

    The passive correspondence part’s main source program is as follows:

    Private Sub MSComm1_OnComm()

    Dim strSh, Shc

    Shc=MSComm1.InBufferCount ‘takes the receive character integer

    If Shc>0 Then

    strSh=MSComm1, Input ‘takes this receive string

    The receive string = receive strings together strSh

    If InStr (receive string, “RING”) Then ‘, if telephone bell sound

    Demonstrated that ” the receive data… “the information is ‘the demonstration receive data message

    Receive string = “”

    End If

    If InStr (receive string, “@J”) Then ‘received the receive string conclusion to answer @J

    Processing receive string ‘processing receive string

    End If

    End If

    End Sub

    Concluding remark

    This system has succeeded applies in the Railroad Department. It has timeliness to be good, the information transmission is away from, the reliability to be high far, the electric circuit simple, invests and so on merits few. It may promote uses in other need information acquisition and the long-distance correspondence department, like Meteorological department temperature and wind speed collection, hydrology department water level and rainfall monitor; Electric power department electrical network monitor and so on.

    Share/Save/Bookmark

    Sunday, September 28th, 2008 at 01:53
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3