CFPRIME RTIMER                                                          RTIMER      1
C***********************************************************************RIGHTE      1
C*                                                                     *RIGHTE      2
C*        Extended Transient-Midterm Stability Program (ETMSP)         *RIGHTE      3
C*        ====================================================         *RIGHTE      4
C*                                                                     *RIGHTE      5
C*       Copyright (C) (1993) Electric Power Research Institute        *RIGHTE      6
C*                                                                     *RIGHTE      7
C* EPRI reserves all rights in the software and associated             *RIGHTE      8
C* documentation as delivered. The software and its associated         *RIGHTE      9
C* documention or any portion thereof may not be reproduced in any form*RIGHTE     10
C* whatsoever without the consent of EPRI, except as explicity provided*RIGHTE     11
C* for by license. Licensee shall submit a detailed description to EPRI*RIGHTE     12
C* of any changes or modifications to the software within two (2)      *RIGHTE     13
C* months after such changes or modifications are made. At EPRI's sole *RIGHTE     14
C* discretion, the software, as changed or modified, shall be given a  *RIGHTE     15
C* new designation sufficiently different from its then current        *RIGHTE     16
C* designation as to prevent mistake,confusion, or deception as between*RIGHTE     17
C* the current software as changed or modified.                        *RIGHTE     18
C*                                                                     *RIGHTE     19
C* A license under EPRI's rights in the software can be obtained       *RIGHTE     20
C* directly from EPRI.                                                 *RIGHTE     21
C*                                                                     *RIGHTE     22
C* This program and supporting materials may be independently available*RIGHTE     23
C* from Electric Power Software centre (EPSC) for an appropriate       *RIGHTE     24
C* distribution fee. The EPSC is a service of                          *RIGHTE     25
C*                                                                     *RIGHTE     26
C*                    Power Computing Company                          *RIGHTE     27
C*                    1930 Hi Line                                     *RIGHTE     28
C*                    Dallas, Tx 75207                                 *RIGHTE     29
C*                                                                     *RIGHTE     30
C* NEITHER EPRI, ANY MEMBER OF EPRI, NOR ANY PERSON OR  ORGANIZATION   *RIGHTE     31
C* ACTING ON BEHAVE OF THEM:                                           *RIGHTE     32
C*                                                                     *RIGHTE     33
C* 1. MAKE ANY WARRANTY OR REPRESENTATION WHATSOEVER, EXPRESS OR       *RIGHTE     34
C*    IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS OR *RIGHTE     35
C*    ANY PURPOSE WITH RESPECT TO THE SOFTWARE OR ITS ASSOCIATED       *RIGHTE     36
C*    DOCUMENTATION; OR                                                *RIGHTE     37
C*                                                                     *RIGHTE     38
C* 2. ASSUMES ANY LIABILITY WHATSOEVER WITH RESPECT TO ANY USE OF THE  *RIGHTE     39
C*    SOFTWARE OR ITS ASSOCIATED DOCUMENTATION OR ANY PORTION THEREOF  *RIGHTE     40
C*    OR WITH RESPECT TO ANY DAMAGES WHICH MAY RESULT FROM SUCH USE.   *RIGHTE     41
C*                                                                     *RIGHTE     42
C* THIS NOTICE MAY NOT BE REMOVED FROM THE SOFTWARE BY ANY USER        *RIGHTE     43
C* THEREOF.                                                            *RIGHTE     44
C*                                                                     *RIGHTE     45
C***********************************************************************RIGHTE     46
C                                                                       RTIMER      3
      SUBROUTINE RTIMER(K,KSWITC)                                       RTIMER      4
CD                                                                      RTIMER      5
CD    TO START THE REMOTE TRIP TIMER FOR EACH REMOTE RELAY.             RTIMER      6
CD                                                                      RTIMER      7
      INCLUDE 'PARX.INS'                                                RTIMER      8
      INCLUDE 'CNPT.INS'                                                RTIMER      9
      INCLUDE 'CNNNEW.INS'                                              RTIMER     10
      INCLUDE 'CNAUTO.INS'                                              RTIMER     11
      INCLUDE 'CNB4.INS'                                                RTIMER     12
      INCLUDE 'CNB19.INS'                                               RTIMER     13
      INCLUDE 'CNFLAG.INS'                                              RTIMER     14
      INCLUDE 'CNPARX.INS'                                              RTIMER     15
      INCLUDE 'CNREN.INS'                                               RTIMER     16
      INCLUDE 'CNUNIT.INS'                                              RTIMER     17
      INCLUDE 'CNMSG.INS'                                               RTIMER     18
C                                                                       RTIMER     19
      CHARACTER*1 A                                                     RTIMER     20
C                                                                       RTIMER     21
      INCLUDE 'CNISOC.INS'                                              RTIMER     22
C                                                                       RTIMER     23
      DATA A/'A'/                                                       RTIMER     24
C                                                                       RTIMER     25
      LDEB=(JDEB(16).NE.0)                                              RTIMER     26
C                                                                       RTIMER     27
      JLNA=K                                                            RTIMER     28
C                                                                       RTIMER     29
      DO 200 JJ=1,KSWITC                                                RTIMER     30
C                                                                       RTIMER     31
CD                                                                      RTIMER     32
CD   STEP 1. SET OFF THE TIMER                                          RTIMER     33
CD                                                                      RTIMER     34
      ADATA(JLNA+2)=ADATA(JLNA+1)+TS                                    RTIMER     35
CD                                                                      RTIMER     36
CD   STEP 2. SET THE TRIP STATUS FOR THE REMOTE RELAY                   RTIMER     37
CD                                                                      RTIMER     38
      IADATA(JLNA+1)=0                                                  RTIMER     39
C                                                                       RTIMER     40
      I=IADATA(JLNA+3)                                                  RTIMER     41
      ITYP=ISOC(I)                                                      RTIMER     42
C                                                                       RTIMER     43
C                                                                       RTIMER     44
C            1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  RTIMER     45
C          ALI ATR APL ABT RLI RTR RPL RBT ASL RSL DLI DTR DPL DLR DBT  RTIMER     46
      GOTO(420,420,420,420,420,420,420,420,420,420,420,420,420,420,420  RTIMER     47
C                                                                       RTIMER     48
C                                F   F   F                              RTIMER     49
C       16  17  18  19  20  21  22  23  24  25  26  27  28  29          RTIMER     50
C      DSL MLI MTR MPL MSL RCG FCG  ZA  ZR  YK LGF LLF LGR LLR          RTIMER     51
     &,420,420,420,420,420,420,420,230,230,230,550,550,550,550          RTIMER     52
C                                                                       RTIMER     53
C       30  31  32  33  34  35  36                                      RTIMER     54
C      SLD RLD  TH  TO  DN AUD RUD                                      RTIMER     55
     &,220,220,550,550,550,550,550                                      RTIMER     56
C                                                                       RTIMER     57
C        F   F   F   F   F   F   F   F   F   F   F                      RTIMER     58
C       37  38  39  40  41  42  43  44  45  46  47  48                  RTIMER     59
C       GR  GM GFD  PR  PM  VR  FV  OF  SR TEB DIM RIM                  RTIMER     60
     &,260,260,260,260,260,260,260,260,260,260,410,410                  RTIMER     61
C                                                                       RTIMER     62
C       49  50  51  52  53                                              RTIMER     63
C       DF  DR  DI  DP ESC                                              RTIMER     64
     &,550,550,550,550,600),I                                           RTIMER     65
C                                                                       RTIMER     66
 220  CONTINUE                                                          RTIMER     67
C                                                                       RTIMER     68
C   LOAD CHANGE (LD & LS) CARD2                                         RTIMER     69
C                                                                       RTIMER     70
      JLNA=JLNA+7                                                       RTIMER     71
      GO TO 200                                                         RTIMER     72
C                                                                       RTIMER     73
 230  CONTINUE                                                          RTIMER     74
C                                                                       RTIMER     75
C   FOR ZR,ZA,YK                                                        RTIMER     76
C                                                                       RTIMER     77
      JLNA=JLNA+6                                                       RTIMER     78
      GOTO 200                                                          RTIMER     79
 260  CONTINUE                                                          RTIMER     80
C                                                                       RTIMER     81
C   GENERATION SYSTEM CHANGE                                            RTIMER     82
C                                                                       RTIMER     83
      JLNA=JLNA+7                                                       RTIMER     84
      GO TO 200                                                         RTIMER     85
C                                                                       RTIMER     86
 410  CONTINUE                                                          RTIMER     87
C                                                                       RTIMER     88
C   INDUCTION MOTOR SWITCHING                                           RTIMER     89
C                                                                       RTIMER     90
      JLNA=JLNA+5                                                       RTIMER     91
      GO TO 200                                                         RTIMER     92
C                                                                       RTIMER     93
 420  CONTINUE                                                          RTIMER     94
C                                                                       RTIMER     95
C   READ IN LINE DATA CHANGE CARD                                       RTIMER     96
C                                                                       RTIMER     97
      JTYP=I                                                            RTIMER     98
C                                                                       RTIMER     99
C            1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  RTIMER    100
C          ALI ATR APL ABT RLI RTR RPL RBT ASL RSL DLI DTR DPL DLR DBT  RTIMER    101
      GOTO(450,460,470,450,430,430,430,430,550,440,430,430,430,430,430  RTIMER    102
C                                                                       RTIMER    103
C       16  17  18  19  20  21  22                                      RTIMER    104
C      DSL MLI MTR MPL MSL RCG FCG                                      RTIMER    105
     &,440,450,460,470,550,440,440),JTYP                                RTIMER    106
C                                                                       RTIMER    107
 430  CONTINUE                                                          RTIMER    108
      JLNA=JLNA+7                                                       RTIMER    109
      GOTO 200                                                          RTIMER    110
 440  CONTINUE                                                          RTIMER    111
      JLNA=JLNA+8                                                       RTIMER    112
      GOTO 200                                                          RTIMER    113
 450  CONTINUE                                                          RTIMER    114
      JLNA=JLNA+10                                                      RTIMER    115
      GOTO 200                                                          RTIMER    116
 460  CONTINUE                                                          RTIMER    117
      JLNA=JLNA+11                                                      RTIMER    118
      GOTO 200                                                          RTIMER    119
 470  CONTINUE                                                          RTIMER    120
      JLNA=JLNA+14                                                      RTIMER    121
 550  CONTINUE                                                          RTIMER    122
      IEBK=1                                                            RTIMER    123
      WRITE(MSG(1),3020)ITYP                                            RTIMER    124
      CALL PRTMSG(1)                                                    RTIMER    125
 3020 FORMAT(' *** ERROR CONTROL TRIPPING OF TYPE',A4,'IS NOT ALLOWED') RTIMER    126
      GOTO 200                                                          RTIMER    127
 600  CONTINUE                                                          RTIMER    128
 200  CONTINUE                                                          RTIMER    129
C                                                                       RTIMER    130
C    RETURN WITH THE MOST CURRENT PONITER                               RTIMER    131
C                                                                       RTIMER    132
      K=JLNA                                                            RTIMER    133
C                                                                       RTIMER    134
      RETURN                                                            RTIMER    135
C                                                                       RTIMER    136
       END                                                              RTIMER    137
