CFPRIME DISMON                                                          DISMON      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
      SUBROUTINE DISMON(IDISW)                                          DISMON      3
CD                                                                      DISMON      4
CD    THIS IS THE MAIN ROUTINE THAT CHECKS THE TRIPPING STATUS OF ALL   DISMON      5
CD    DISTANCE RELAY.                                                   DISMON      6
CD                                                                      DISMON      7
CD     LDISTR          Starting position of IDATPT array  of DIST relay DISMON      8
CD                     scheme, LDISTR is in the common labelled PT of   DISMON      9
CD                     include file CNPT.                               DISMON     10
CD                                                                      DISMON     11
CD     NDISTR          Finishing position of IDATPT array of DIST relay DISMON     12
CD                     scheme, NDISTR is in common labelled AUTO of     DISMON     13
CD                     include file CNAUTO.                             DISMON     14
CD                                                                      DISMON     15
CD     let k = k-th DIST RELAY                                          DISMON     16
CD                                                                      DISMON     17
CD     N = IDATPT(k)    IDATPT is the array that stores the start       DISMON     18
CD                      position of the K-TH DIST relay scheme data     DISMON     19
CD                                                                      DISMON     20
CD     IADATA(N+1)=ICD1RD   LOCAL RELAY STATUS                          DISMON     21
CD                          = 1 RELAY NOT TRIPPED                       DISMON     22
CD                          = 2 LOCAL TRIPPING COMPLETED,REMOTE         DISMON     23
CD                              TRIPPING STARTED                        DISMON     24
CD                          = 3 BOTH LOCAL AND REMOTE TRIPPING HAVE     DISMON     25
CD                              BEEN COMPLETED.                         DISMON     26
CD                                                                      DISMON     27
CD     IADATA(N+2)=IBUSRD   LEFT HAND SIDE BUS NO.                      DISMON     28
CD                                                                      DISMON     29
CD     IADATA(N+3)=JBUSRD   RIGHT HAND SIDE BUS NO.                     DISMON     30
CD                                                                      DISMON     31
CD     IADATA(N+4)=IPARRD   PARALLEL IDENTIFICATION FOR THE LINE        DISMON     32
CD                                                                      DISMON     33
CD     IADATA(N+5)=ICD3RD   =1      USE SIGNAL TO TRIP THE LINE         DISMON     34
CD                          =C OR 2 DO NOT TRIP THE LINE; SIGNAL        DISMON     35
CD                                  IS USED FOR REMOTE TRIPPING.        DISMON     36
CD                                                                      DISMON     37
CD     IADATA(N+6)=ICD2RD   RELAY TYPE OPTION                           DISMON     38
CD                          =1 IMPEDANCE RELAY (T1)                     DISMON     39
CD                          =2 DEFAULT DISTANT RELAY (T2)               DISMON     40
CD                                                                      DISMON     41
CD     IADATA(N+7)=ICD4RD   NUMBER OF REMOTE RELAY ATTACH TO THE LOCAL  DISMON     42
CD                          RELAY                                       DISMON     43
CD                                                                      DISMON     44
CD     IADATA(N+8)          REMOTE RELAY TRIP FLAG                      DISMON     45
CD                                                                      DISMON     46
CD                                                                      DISMON     47
CD     ADATA(N+9) =TRCRD    T1 :READ IN AS THE Tcenter, INITIALIZED AS  DISMON     48
CD                              Tcenter*COS(TANGLE) FOR CIRCLE T.       DISMON     49
CD                          T2 :USER SUPPLIED R/X RATIO                 DISMON     50
CD                                                                      DISMON     51
CD                                                                      DISMON     52
CD     ADATA(N+10)=TXCRD    T1 :READ IN AS THE TORQUE ANGLE, INITIALIZEDDISMON     53
CD                              AS Tcenter*SIN(TANGLE) FOR CIRCLE T.    DISMON     54
CD                          T2 :ZONE ONE REACH (DEFAULT=0.8)            DISMON     55
CD                                                                      DISMON     56
CD     ADATA(N+11)=TRD2RD   T1 :READ IN AS THE DIAMETER OF THE CIRCLE T;DISMON     57
CD                              STORE AS THE RADIUS SQUARE OF CIRCLE T. DISMON     58
CD                          T2 :ZONE TWO REACH (DEFAULT=1.2)            DISMON     59
CD                                                                      DISMON     60
CD                                                                      DISMON     61
CD     ADATA(N+12)=TTRPRD   T1 :CIRCLE T TRIP TIME IN CIRCLE            DISMON     62
CD                          T2 :MIN TORQUE ANGLE OVER WHICH THE RELAY   DISMON     63
CD                              LOGIC WILL BE ACTIVIATED.(DEFAULT=60)   DISMON     64
CD                                                                      DISMON     65
CD     ADATA(N+13)=TZDYRD   T1 :ZONE 1 (CIRCLE T)  TIMER                DISMON     66
CD                          T2 :NOT USED                                DISMON     67
CD                                                                      DISMON     68
CD                                                                      DISMON     69
CD     ADATA(N+14)=BRCRD    T1 :READ IN AS THE Bcenter, INITIALIZED     DISMON     70
CD                              AS Bcenter*COS(BANGLE) FOR CIRCLE B.    DISMON     71
CD                          T2 : MAX TORQUE ANGLE (DEFAULT=75)          DISMON     72
CD                                                                      DISMON     73
CD     ADATA(N+15)=BXCRD    T1 :READ IN AS THE TORQUE ANGLE, INITIALIZEDDISMON     74
CD                              AS Bcenter*SIN(BANGLE) FOR CIRCLE B.    DISMON     75
CD                          T2 :NOT USED                                DISMON     76
CD                                                                      DISMON     77
CD     ADATA(N+16)=BRD2RD   T1 :READ IN AS THE DIAMETER OF THE CIRCLE B;DISMON     78
CD                              STORE AS THE RADIUS SQUARE OF CIRCLE B. DISMON     79
CD                          T2 :NOT USED                                DISMON     80
CD                                                                      DISMON     81
CD     ADATA(N+17)=BTRPRD   T1 :CYCLE B  TRIP TIME IN CYCLES            DISMON     82
CD                          T2 :NOT USED                                DISMON     83
CD                                                                      DISMON     84
CD     ADATA(N+18)=BZDYRD   T1 :ZONE 2 (CYCLE B) TIMER                  DISMON     85
CD                          T2 :RELAY TIMER                             DISMON     86
CD                                                                      DISMON     87
CD     ADATA(N+19)=TRCLSE   T1,T2 :RECLOSING TIME DELAY.                DISMON     88
CD                                                                      DISMON     89
CD     ADATA(N+20)=RTIMER   T1,T2 :RECLOSING TIMER                      DISMON     90
CD                                                                      DISMON     91
CD                                                                      DISMON     92
CD                                                                      DISMON     93
CD     FOR T1: LINE PARAMETER IN PI-CIRCUIT FORM                        DISMON     94
CD                                                                      DISMON     95
CD                                                                      DISMON     96
CD                                                                      DISMON     97
CD     ADATA(N+21)=GIJRD    GKM                                         DISMON     98
CD     ADATA(N+22)=BIJRD    BKM                                         DISMON     99
CD     ADATA(N+23)=GIORD    GK1                                         DISMON    100
CD     ADATA(N+24)=BIORD    BK1                                         DISMON    101
CD     ADATA(N+25)=GJORD    GK2                                         DISMON    102
CD     ADATA(N+26)=BJORD    BK2                                         DISMON    103
CD                                                                      DISMON    104
CD                                                                      DISMON    105
CD     FOR T2:                                                          DISMON    106
CD                                                                      DISMON    107
CD                                                                      DISMON    108
CD     ADATA(N+21)         TAN60                                        DISMON    109
CD     ADATA(N+22)         A1                                           DISMON    110
CD     ADATA(N+23)         B1                                           DISMON    111
CD     ADATA(N+24)         A2                                           DISMON    112
CD     ADATA(N+25)         B2                                           DISMON    113
CD     ADATA(N+26)         NOT USED                                     DISMON    114
CD                                                                      DISMON    115
CD     IADATA(N+27)        NJSELI        FLAG FOR PI-LINE WITH UNEQUAL  DISMON    116
CD                                       SHUNTS.                        DISMON    117
CD                                                                      DISMON    118
CD                                                                      DISMON    119
      INCLUDE 'PARX.INS'                                                DISMON    120
      INCLUDE 'CNPT.INS'                                                DISMON    121
      INCLUDE 'CNAUTO.INS'                                              DISMON    122
      INCLUDE 'CNVOLT.INS'                                              DISMON    123
      INCLUDE 'CNFLAG.INS'                                              DISMON    124
      INCLUDE 'CNB4.INS'                                                DISMON    125
      INCLUDE 'CNB19.INS'                                               DISMON    126
      INCLUDE 'CNUNIT.INS'                                              DISMON    127
      LOGICAL IDISW                                                     DISMON    128
C                                                                       DISMON    129
      LDEB=.FALSE.                                                      DISMON    130
C                                                                       DISMON    131
C      IF(IDISW)RETURN                                                  DISMON    132
C                                                                       DISMON    133
      DO 2400 I=LDISTR,NDISTR                                           DISMON    134
      K=IDATPT(I)                                                       DISMON    135
      IF(IADATA(K+1).GT.9)GOTO 2400                                     DISMON    136
      IOPT = IADATA(K+6)                                                DISMON    137
      IF(IOPT.EQ.1)THEN                                                 DISMON    138
       CALL IPZMON(K,IDISW)                                             DISMON    139
      ELSE                                                              DISMON    140
       CALL DDRMON(K)                                                   DISMON    141
      ENDIF                                                             DISMON    142
 2400 CONTINUE                                                          DISMON    143
      RETURN                                                            DISMON    144
      END                                                               DISMON    145
                                                                        DISMON    146
                                                                        DISMON    147
                                                                        DISMON    148
