Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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

 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