CFPRIME ASWCHK                                                          ASWCHK      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 ASWCHK(H)                                              ASWCHK      3
CD                                                                      ASWCHK      4
CD    THIS IS THE MAIN DRIVER TO CHECK SYSTEM RELAY STATUS.             ASWCHK      5
CD                                                                      ASWCHK      6
      INCLUDE 'PARX.INS'                                                ASWCHK      7
      INCLUDE 'CNPT.INS'                                                ASWCHK      8
      INCLUDE 'CNB4.INS'                                                ASWCHK      9
      INCLUDE 'CNUNIT.INS'                                              ASWCHK     10
      INCLUDE 'CNAUTO.INS'                                              ASWCHK     11
C                                                                       ASWCHK     12
      LOGICAL IDISW                                                     ASWCHK     13
C                                                                       ASWCHK     14
      IF(H.NE.0.0)THEN                                                  ASWCHK     15
      IDISW=.FALSE.                                                     ASWCHK     16
      ELSE                                                              ASWCHK     17
      IDISW=.TRUE.                                                      ASWCHK     18
      ENDIF                                                             ASWCHK     19
C                                                                       ASWCHK     20
      NAWR=NALAST                                                       ASWCHK     21
      IASWF=0                                                           ASWCHK     22
      IASWX=0                                                           ASWCHK     23
CD                                                                      ASWCHK     24
CD    NOTE:                                                             ASWCHK     25
CD                                                                      ASWCHK     26
CD    NUFVDB - NUMBER OF UNDER FREQUENCY VOLTAGE LOAD SHEDDING RELAYS   ASWCHK     27
CD    NUFREQ - NUMBER OF UNDER FREQUENCY LOAD SHEDDING CF-1 RELAYS      ASWCHK     28
CD    NGUFRE - NUMBER OF UNDER FREQUENCY GENERATOR TRIPPING RELAYS      ASWCHK     29
CD    NUFLTR - NUMBER OF UNDER FREQUENCY LINE TRIPPING RELAYS           ASWCHK     30
CD    NSCGRE - NUMBER OF SERIES CAPACITOR GAP RELAYS                    ASWCHK     31
CD    NDISTR - NUMBER OF IMPEDANCE/DEFAULT DISTANCE RELAYS              ASWCHK     32
CD    NRCPRA - NUMBER OF RATE OF CHANGE OF POWER RELAYS                 ASWCHK     33
CD    NVDLDR - NUMBER OF VOLTAGE DIFFERENCE LOAD DROPPING RELAYS        ASWCHK     34
CD    NDPDA  - NUMBER OF POWER ANGLE RELAY                              ASWCHK     35
CD    NDLSO  - NUMBER OF DOUBLE LENS OUT-OF-STEP RELAY                  ASWCHK     36
CD    NSLBOR - NUMBER OF STRAIGHT LINE BLINDER RELAY                    ASWCHK     37
CD    NDCOSR - NUMBER OF DOUBLE CIRCLE OR LEN SHAPE RELAY               ASWCHK     38
CD    NOCRE  - NUMBER OF OVERCURRENT RELAYS                             ASWCHK     39
CD    NDCSI  - NUMBER OF DIRECTIONAL COMPARISON SUPERVISORY OVERCURRENT ASWCHK     40
CD             RELAYS                                                   ASWCHK     41
CD         H - INTEGRATION INTERVAL IN SECOND                           ASWCHK     42
CD     IDISW - LOGICAL DISCONTINUITY FLAG                               ASWCHK     43
CD                                                                      ASWCHK     44
      IF(NUFVDB.NE.0)CALL LSHMON(IDISW,H)                               ASWCHK     45
      IF(NUFREQ.NE.0)CALL UFLMON(IDISW,H)                               ASWCHK     46
      IF(NGUFRE.NE.0)CALL GUFMON(IDISW,H)                               ASWCHK     47
      IF(NVDLDR.NE.0)CALL VDLMON(IDISW)                                 ASWCHK     48
      IF(NSCGRE.NE.0)CALL SCGMON(H)                                     ASWCHK     49
      IF(NUFLTR.NE.0)CALL FLTMON(IDISW,H)                               ASWCHK     50
      IF(NDISTR.NE.0)CALL DISMON(IDISW)                                 ASWCHK     51
      IF(NRCPRA.NE.0)CALL RCPMON(IDISW,H)                               ASWCHK     52
      IF(NDPDA.NE.0)CALL DPAMON(H)                                      ASWCHK     53
      IF(NDLSO.NE.0)CALL DLSMON(H)                                      ASWCHK     54
      IF(NSLBOR.NE.0)CALL SLBMON(H)                                     ASWCHK     55
      IF(NDCOSR.NE.0)CALL DCOMON                                        ASWCHK     56
      IF(NOCRE.NE.0)CALL OCRMON(H)                                      ASWCHK     57
      IF(NDCSI.NE.0)CALL DCSMON(H)                                      ASWCHK     58
C                                                                       ASWCHK     59
C      LINE AUTO RECLOSING                                              ASWCHK     60
C                                                                       ASWCHK     61
       IF(NDLR.NE.0)CALL RECLSE(H)                                      ASWCHK     62
       RETURN                                                           ASWCHK     63
C                                                                       ASWCHK     64
C                                                                       ASWCHK     65
       ENTRY ASWREP                                                     ASWCHK     66
CD                                                                      ASWCHK     67
CD    TO REPOSITION AUTOMATIC SWITCHING FILE (ISWFA).                   ASWCHK     68
CD                                                                      ASWCHK     69
      IF(IASWX.NE.0)THEN                                                ASWCHK     70
      WRITE(ISWFA,2010) ECARD                                           ASWCHK     71
      NAWR=NAWR+1                                                       ASWCHK     72
      IASWCT=NAWR-NALAST                                                ASWCHK     73
      DO 500 I=1,IASWCT                                                 ASWCHK     74
      BACKSPACE ISWFA                                                   ASWCHK     75
 500  CONTINUE                                                          ASWCHK     76
      NALAST=NAWR                                                       ASWCHK     77
      ENDIF                                                             ASWCHK     78
      RETURN                                                            ASWCHK     79
 2010 FORMAT(A132)                                                      ASWCHK     80
      END                                                               ASWCHK     81
C                                                                       ASWCHK     82
