Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here's some example code for getting the CON index for a plant-related model:

ierr, con_index = psspy.mdlind(101, '1 ', 'GOV', 'CON')
ierr, con_num = psspy.mdlind(101, '1 ', 'GOV', 'NCON')
max_con_index = con_index + con_num

# now get those values from the dynamic data storage arrays
psspy.dlst(
 1,              # length of ATYPE array
 [1],            # Get CONs (this is the ATYPE array)
 [con_index],    # start at this index
 [max_con_index],# end at this index
)

This will print the result to a report window:

      PTI INTERACTIVE POWER SYSTEM SIMULATOR--PSSĀ®E      TUE, NOV 20 2012   5:25
 PSS(R)E PROGRAM APPLICATION GUIDE EXAMPLE
 BASE CASE INCLUDING SEQUENCE DATA


 CONS:

     1:  6.500          2: 0.6000E-01      3: 0.2000          4: 0.5000E-01
     5:  4.000          6:  0.000          7:  1.800          8:  1.750
     9: 0.6000         10: 0.8000         11: 0.3000         12: 0.1500
    13: 0.9000E-01     14: 0.3800         15:  6.500

--------------------------------------------------------------------------------

You'll need to parse the resultant output, which is painful and what you were trying to avoid I know. But the result looks a little more regular than the docu output which is all over the place.

Here are a list of the functions to get those indices:

dc2auxmind - auxiliary signal model associated with 2-terminal dc line.
dc2mind    - 2-terminal dc line model
dcnauxmind - auxiliary signal model
fcdauxmind - auxiliary signal model associated with FACTS device 
fcdmind    - FACTS device model 
lmodind    - load related model
mdlind     - plant related model
rmodind    - branch relay model 
slmodind   - subsystem load related model
swsmind    - switched shunt model 
vscauxmind - auxiliary signal model associated with VSC dc line
vscmind    - VSC dc line
windmind   - wind model

Does this get you closer to what you wanted?