First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered Sep 12 '2

perolofl gravatar image

Variable IVAL will contain the index of the first STATE for the wind generator model at bus 2, machine 1.

The third VAR should be VAR(L+2) = STATE(IVAL)

Variable IERR is zero when the call is succesful. It is wrong to assign VAR(L+3) = VAR(IERR), since VAR array doesn't have index 0. Remove the statement for VAR(L+3).