How to use CURNT() ?

asked 2022-06-29 06:10:22 -0600

YKC gravatar image

updated 2022-06-30 00:41:27 -0600

I am a beginner of writing PSSE user-defined model, and I would want to write the wind turbine generator model (REGCAU1). However, I have no idea how to write the "interface to network model".

I have already tried to use "CURNT(IB)" in my UDM, I set "IB" to be my bus sequence number. But when I load the dll into system and run the simulation, PSSE would suddenly shut down. Moreover, when I use CURNT(actual bus number), the same situation will happen again.

When I use CURNT(), should I write any function library to load in this internal array? (like "include comon4.ins")

My PSSE is version 33.5 Oct. 16, 2013.

Thanks a lot!!!

The following is my code, which is used to measure the current on bus 40. If I change CURNT to VOLT, I can read the absolute value of voltage; but if I use CURNT, PSSE will shut down.


SUBROUTINE CONEC

INCLUDE 'COMON4.INS'

INTEGER i

INTRINSIC ABS

VAR(4000)=ABS(CURNT(40))

RETURN

END

edit retag flag offensive close merge delete