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 24 '19

VISHNU gravatar image

ierr, variableNumber = psspy.mdlind(busNumber, 'machine id', 'GEN', 'VAR') psspy.var_channel([-1,variableNumber],"variableName")

Here the first command stores the first variable 'VAR' associated with GEN into the variable varname. The second command add the channel corresponding to the variable varname. You can use any this commands to get any variable associated with any components. If you want to store the second variable then, psspy.var_channel([-1,variableNumber+1],"anotherVariableName")

Hope this helps

click to hide/show revision 2
No.2 Revision

ierr, variableNumber = psspy.mdlind(busNumber, 'machine id', 'GEN', 'VAR') psspy.var_channel([-1,variableNumber],"variableName")

Here the first command stores the first variable 'VAR' associated with GEN into the variable varname. The second command add the channel corresponding to the variable varname. variableNumber. You can use any this commands to get any variable associated with any components.

For instance, If you want to store the second variable then, psspy.var_channel([-1,variableNumber+1],"anotherVariableName")

Hope this helps

click to hide/show revision 3
No.3 Revision

updated Sep 25 '19

perolofl gravatar image

 ierr, variableNumber = psspy.mdlind(busNumber, 'machine id', 'GEN', 'VAR')
 psspy.var_channel([-1,variableNumber],"variableName")

psspy.var_channel([-1,variableNumber],"variableName")

Here the first command stores the first variable 'VAR' associated with GEN into the variable varname. The second command add the channel corresponding to the variable variableNumber. You can use this commands to get any variable associated with any components.

For instance, If you want to store the second variable then,

 psspy.var_channel([-1,variableNumber+1],"anotherVariableName")

psspy.var_channel([-1,variableNumber+1],"anotherVariableName")

Hope this helps