Thank you for your response... I have assumed that they are initial values that we need to give. please correct me if I am wrong.
Please find the below code
C[PSS_EDB] SIMPLIFIED EXCITATION SYSTEM MODEL
C (Version Independent Form)
C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
C * *
C * THIS PROGRAM AND ITS DOCUMENTATION ARE TRADE SECRETS OF POWER TECHNO- *
C * LOGIES, A DIVISION OF S&W CONSULTANTS, INC. THEY HAVE BEEN LEASED TO *
C * YOU, OUR CLIENT, *
C * SUBJECT TO TERMS WHICH PROHIBIT YOU FROM DISCLOSING OR TRANSFERRING *
C * THE PROGRAM OR ITS DOCUMENTATION, WHETHER IN ITS ORIGINAL OR MODIFIED *
C * FORM, TO A THIRD PARTY, OR FROM USING THE PROGRAM FOR ANY PURPOSE *
C * OTHER THAN COMPUTATION RELATING TO YOUR OWN SYSTEM. ANY SUCH *
C * TRANSFER OR USE BY YOU OR YOUR EMPLOYEES WILL CONSTITUTE A BREACH OF *
C * CONFIDENCE AND OF THE CONTRACT UNDER WHICH RIGHTS OF USE HAVE BEEN *
C * GRANTED. *
C * *
C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SUBROUTINE PSS_EDN(MC,SLOT)
C++
C define the local variables and global variables that are going to be used
C in the model
C--
USE PSSDM ! this is the global declaration
IMPLICIT NONE
C++
C Now add all the local variable declarations that will be used in this
C model
C--
INTEGER IB ! bus index
INTEGER IERR ! error code
INTEGER J ! starting CON index
INTEGER K ! starting state index
INTEGER L ! starting VAR index
INTEGER M ! starting ICON index
INTEGER MC ! this is the machine index
INTEGER SLOT ! used to get starting indices J, K, L & M
REAL VINP ! block input
REAL VOUT ! block output
LOGICAL ERRFLG ! used in docu,check functionality
IF (GET_MODE() == 8) THEN
C++
C Add the logic here for whatever the model is expected to do when MODE is
C 8.
C--
J=1
CALL SETCONDSCRPT('KVT (pu), VTGain onstant', J)
CALL SETCONDSCRPT('TR (s), lead time constant', J+1)
CALL SETCONDSCRPT('TC2 (s), lag time constant', J+2)
CALL SETCONDSCRPT('TB2 (s), lag time constant', J+3)
CALL SETCONDSCRPT('TC1 (s), lag time constant', J+4)
CALL SETCONDSCRPT('TB1 (s), lag time constant', J+5)
CALL SETCONDSCRPT('KR (pu), exciter gain', J+6)
CALL SETCONDSCRPT('KS (pu), exciter gain', J+7)
CALL SETCONDSCRPT('TS (s), exciter time constant', J+8)
CALL SETCONDSCRPT('KC (pu), exciter gain', J+9)
CALL SETCONDSCRPT('EMIN (pu), exciter minimum', J+10)
CALL SETCONDSCRPT('EMAX (pu), exciter maximum', J+11)
K=1
CALL SET_STATE_DSCRPT('First state of the block', K)
CALL SET_STATE_DSCRPT('Second state of the block', K+1)
CALL SET_STATE_DSCRPT('Third state of the block', K+2)
CALL SET_STATE_DSCRPT('Fourth state of the block', K+3)
RETURN
ENDIF
C++
C At this point in the code, MODE is any value 1 through 7
C--
J = GETSTRTIN(1,SLOT) ! starting CON index
K = GETSTRTIN(2,SLOT) ! starting state index
L = GETSTRTIN(3,SLOT) ! since this model does not use VAR, L ... (more)
At the end of the first line you write six hardcoded values of the CONS, "4 0 0 6 2 0". Why? Please also show the write statement.
Thank you When I use my Dyr File to include the user defined model I used the below format @! savnw_PSS_EDN.dyr - user defined exciter model 101 'USRMDL' 1 'PSS_EDN' 4 0 0 6 2 0 4 0 0 6 2 0 / But It is not reading all the 12 values as required by the user defined mod