CFPRIME ASWDAT                                                          ASWDAT      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 ASWDAT(IEBK)                                           ASWDAT      3
CD                                                                      ASWDAT      4
CD    THIS IS THE MAIN DRIVER FOR READING THE SYSTEM RELAY DATA.        ASWDAT      5
CD                                                                      ASWDAT      6
CD    KEYWORD AND TYPE OF RELAYS:                                       ASWDAT      7
CD                                                                      ASWDAT      8
CD     UFVD - UNDER FREQUENCY VOLTAGE LOAD SHEDDING RELAY               ASWDAT      9
CD     UFLS - UNDER FREQUENCY LOAD SHEDDING CF-1 RELAY                  ASWDAT     10
CD     GUFR - UNDER FREQUENCY GENERATOR TRIPPING RELAY                  ASWDAT     11
CD     UFLT - UNDER FREQUENCY LINE TRIPPING RELAY                       ASWDAT     12
CD     SCGR - SERIES CAPACITOR GAP RELAY                                ASWDAT     13
CD     DIST - IMPEDANCE/DEFAULT DISTANCE RELAY                          ASWDAT     14
CD     RCPR - RATE OF CHANGE OF POWER RELAY                             ASWDAT     15
CD     RBRA - DYNAMIC RESISTANCE BRAKE (NOT IMPLEMENTED)                ASWDAT     16
CD     VDLD - VOLTAGE DIFFERENCE LOAD DROPPING RELAY                    ASWDAT     17
CD     DPDA - POWER ANGLE RELAY                                         ASWDAT     18
CD     DLSO - DOUBLE LENS SHAPE OUT-OF-STEP RELAY                       ASWDAT     19
CD     SLBO - STRAIGHT LINE BLINDER OUT-OF-STEP RELAY                   ASWDAT     20
CD     DCLR - DOUBLE CIRCLE OR LENS OUT-OF-STEP RELAY                   ASWDAT     21
CD     OCRE - OVERCURRENT RELAY                                         ASWDAT     22
CD     DCSI - DIRECTIONAL COMPARISON SUPERVISORY OVERCURRENT RELAY      ASWDAT     23
CD                                                                      ASWDAT     24
CD                                                                      ASWDAT     25
      INCLUDE 'PARX.INS'                                                ASWDAT     26
      INCLUDE 'CNPT.INS'                                                ASWDAT     27
      INCLUDE 'CNFLAG.INS'                                              ASWDAT     28
      INCLUDE 'CNUNIT.INS'                                              ASWDAT     29
      INCLUDE 'CNAUTO.INS'                                              ASWDAT     30
      INCLUDE 'CNREN.INS'                                               ASWDAT     31
      INCLUDE 'CNMSG.INS'                                               ASWDAT     32
C                                                                       ASWDAT     33
      CHARACTER*80 SIMBUF                                               ASWDAT     34
      CHARACTER*4 ISEM,IEND,ISIDAT(15)                                  ASWDAT     35
C                                                                       ASWDAT     36
      DATA ISIDAT/'UFVD','UFLS','GUFR','UFLT','SCGR','DIST',            ASWDAT     37
     1'RCPR','RBRA','VDLD','DPDA','DLSO','SLBO','DCLR','OCRE',          ASWDAT     38
     2'DCSI'/                                                           ASWDAT     39
      DATA IEND/' END'/                                                 ASWDAT     40
C                                                                       ASWDAT     41
      LDEB=(JDEB(10).NE.0)                                              ASWDAT     42
C                                                                       ASWDAT     43
      IEBK=0                                                            ASWDAT     44
C                                                                       ASWDAT     45
       JSEM=0                                                           ASWDAT     46
C                                                                       ASWDAT     47
  100 CONTINUE                                                          ASWDAT     48
      CALL GETLIN(IU54,SIMBUF)                                          ASWDAT     49
      READ(SIMBUF,1010) ISEM                                            ASWDAT     50
      IF(LDEB)WRITE(IUD6,1230) ISEM                                     ASWDAT     51
      IF(ISEM.EQ.IEND) GOTO 500                                         ASWDAT     52
  110 JSEM=JSEM+1                                                       ASWDAT     53
      IF(JSEM.GT.15)GOTO 490                                            ASWDAT     54
      IF(ISEM.EQ.ISIDAT(JSEM)) GOTO 120                                 ASWDAT     55
      GOTO 110                                                          ASWDAT     56
C           'UFVD','UFLS','GUFR','UFLT','SCGR','DIST','RCPR','RBRA'     ASWDAT     57
  120 GOTO (  130 ,  140,   150 ,  160,   170,   180,   190,   200,     ASWDAT     58
C      'VDLD'  'DPDA'  'DLSO'  'SLBO'  'DCLR'  'OCRE'  'DCSI'           ASWDAT     59
     &   210,   220,    230 ,    240,    250,    260,    270) JSEM      ASWDAT     60
C                                                                       ASWDAT     61
  130 CONTINUE                                                          ASWDAT     62
C                                                                       ASWDAT     63
C   READ IN THE UFVD DATA                                               ASWDAT     64
C                                                                       ASWDAT     65
      CALL LSHDAT(IEBK)                                                 ASWDAT     66
C                                                                       ASWDAT     67
      GOTO 100                                                          ASWDAT     68
C                                                                       ASWDAT     69
  140 CONTINUE                                                          ASWDAT     70
C                                                                       ASWDAT     71
C   READ IN UNDERFREQUENCY LOAD SHEDDING  CF-1 RELAY DATA               ASWDAT     72
C                                                                       ASWDAT     73
      CALL UFLDAT(IEBK)                                                 ASWDAT     74
C                                                                       ASWDAT     75
      GOTO 100                                                          ASWDAT     76
C                                                                       ASWDAT     77
  150 CONTINUE                                                          ASWDAT     78
C                                                                       ASWDAT     79
C   READ IN GENERATOR UNDERFREQUENCY RELAY DATA                         ASWDAT     80
C                                                                       ASWDAT     81
      CALL GUFDAT(IEBK)                                                 ASWDAT     82
C                                                                       ASWDAT     83
      GOTO 100                                                          ASWDAT     84
  160 CONTINUE                                                          ASWDAT     85
C                                                                       ASWDAT     86
C   READ IN UNDER FREQUENCY LINE TRIPPING RELAY DATA                    ASWDAT     87
C                                                                       ASWDAT     88
      CALL FLTDAT(IEBK)                                                 ASWDAT     89
C                                                                       ASWDAT     90
      GOTO 100                                                          ASWDAT     91
  170 CONTINUE                                                          ASWDAT     92
C                                                                       ASWDAT     93
C   READ IN SERIES CAPACITOR GAP RELAY DATA                             ASWDAT     94
C                                                                       ASWDAT     95
      CALL SCGDAT(IEBK)                                                 ASWDAT     96
C                                                                       ASWDAT     97
      GOTO 100                                                          ASWDAT     98
C                                                                       ASWDAT     99
  180 CONTINUE                                                          ASWDAT    100
C                                                                       ASWDAT    101
C   READ IN THE DISTANT RELAY DATA                                      ASWDAT    102
C                                                                       ASWDAT    103
      CALL DISDAT(IEBK)                                                 ASWDAT    104
C                                                                       ASWDAT    105
      GOTO 100                                                          ASWDAT    106
C                                                                       ASWDAT    107
  190 CONTINUE                                                          ASWDAT    108
C                                                                       ASWDAT    109
C   READ IN THE RATE OF CHANGE OF POWER RELAY                           ASWDAT    110
C                                                                       ASWDAT    111
      CALL RCPDAT(IEBK)                                                 ASWDAT    112
C                                                                       ASWDAT    113
      GOTO 100                                                          ASWDAT    114
C                                                                       ASWDAT    115
  200 CONTINUE                                                          ASWDAT    116
      GOTO 100                                                          ASWDAT    117
  210 CONTINUE                                                          ASWDAT    118
C                                                                       ASWDAT    119
C   READ IN VOLTAGE DIFFERENCE LOAD DROPPING RELAY DATA                 ASWDAT    120
C                                                                       ASWDAT    121
      CALL VDLDAT(IEBK)                                                 ASWDAT    122
C                                                                       ASWDAT    123
      GOTO 100                                                          ASWDAT    124
C                                                                       ASWDAT    125
 220  CONTINUE                                                          ASWDAT    126
C                                                                       ASWDAT    127
C   READ IN THE POWER ANGLE RELAY DATA                                  ASWDAT    128
C                                                                       ASWDAT    129
      CALL DPADAT(IEBK)                                                 ASWDAT    130
C                                                                       ASWDAT    131
      GOTO 100                                                          ASWDAT    132
C                                                                       ASWDAT    133
 230  CONTINUE                                                          ASWDAT    134
C                                                                       ASWDAT    135
C   READ IN THE DOUBLE LENS SHAPE OUT-OF-STEP RELAY DATA                ASWDAT    136
C                                                                       ASWDAT    137
      CALL DLSDAT(IEBK)                                                 ASWDAT    138
C                                                                       ASWDAT    139
      GOTO 100                                                          ASWDAT    140
C                                                                       ASWDAT    141
 240  CONTINUE                                                          ASWDAT    142
C                                                                       ASWDAT    143
C   READ IN THE LINE BLINDER OUT-OF-STEP RELAY DATA                     ASWDAT    144
C                                                                       ASWDAT    145
      CALL SLBDAT(IEBK)                                                 ASWDAT    146
C                                                                       ASWDAT    147
      GOTO 100                                                          ASWDAT    148
C                                                                       ASWDAT    149
 250  CONTINUE                                                          ASWDAT    150
C                                                                       ASWDAT    151
C   READ IN THE CIRCLE OR LENS SHAPE OUT-OF-STEP RELAY DATA             ASWDAT    152
C                                                                       ASWDAT    153
      CALL DCODAT(IEBK)                                                 ASWDAT    154
C                                                                       ASWDAT    155
      GOTO 100                                                          ASWDAT    156
C                                                                       ASWDAT    157
260   CONTINUE                                                          ASWDAT    158
C                                                                       ASWDAT    159
C   READ IN OVERCURRENT RELAY DATA                                      ASWDAT    160
C                                                                       ASWDAT    161
      CALL OCRDAT(IEBK)                                                 ASWDAT    162
C                                                                       ASWDAT    163
      GOTO 100                                                          ASWDAT    164
C                                                                       ASWDAT    165
270   CONTINUE                                                          ASWDAT    166
C                                                                       ASWDAT    167
C   READ IN DIRECTIONAL COMPARISON SUPERVISORY OVERCURRENT RELAY DATA   ASWDAT    168
C                                                                       ASWDAT    169
      CALL DCSDAT(IEBK)                                                 ASWDAT    170
C                                                                       ASWDAT    171
      GOTO 100                                                          ASWDAT    172
C                                                                       ASWDAT    173
  490 CONTINUE                                                          ASWDAT    174
      WRITE(MSG(1),1140) ISEM                                           ASWDAT    175
      WRITE(MSG(2),1150)                                                ASWDAT    176
      CALL PRTMSG(2)                                                    ASWDAT    177
      SIMBUF='ASWDAT: DATA BLOCK OUT OF RANGE EXTRA BLANK CARD!'        ASWDAT    178
      CALL ASTOP(SIMBUF,49)                                             ASWDAT    179
C                                                                       ASWDAT    180
  500 CONTINUE                                                          ASWDAT    181
C                                                                       ASWDAT    182
      CALL CLOSEF(IU54)                                                 ASWDAT    183
C                                                                       ASWDAT    184
      IF(IEBK.NE.0)THEN                                                 ASWDAT    185
      SIMBUF='ASWDAT: AUTOMATIC RELAY DATA ERRORS'                      ASWDAT    186
      CALL ASTOP(SIMBUF,35)                                             ASWDAT    187
      ENDIF                                                             ASWDAT    188
C                                                                       ASWDAT    189
      RETURN                                                            ASWDAT    190
C                                                                       ASWDAT    191
 1010 FORMAT(1X,A4)                                                     ASWDAT    192
 1140 FORMAT(' *** ERROR  BLOCK DATA GROUP ',A4,' OUT OF RANGE')        ASWDAT    193
 1150 FORMAT(12X,'CHECK YOUR DATA KEY WORD.')                           ASWDAT    194
 1230 FORMAT(1X,'ISEM= #',A4,'#')                                       ASWDAT    195
      END                                                               ASWDAT    196
