09.03.2013 Views

Simulator 16 User Guide - PowerWorld

Simulator 16 User Guide - PowerWorld

Simulator 16 User Guide - PowerWorld

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GetParameters Function (version 9)<br />

The GetParameters function is used to request the values of specified fields for a particular object in<br />

the load flow case. For returning field values for multiple objects, you can use a loop to make repeated<br />

calls to the GetParameters function, and pass the object and desired field information for each object.<br />

This function is identical in setup to the ChangeParameters function, with the exception that the<br />

Values array will be updated with the values for the field variables defined in ParamList.<br />

GetParameters(tObjectType, ParamList, Values, EString)<br />

Parameter Definitions<br />

Example<br />

TobjectType : String The type of object you are changing parameters for. No default.<br />

ParamList : Variant A variant array storing strings. This array stores a list of <strong>PowerWorld</strong><br />

object field variables, as defined in the section on <strong>PowerWorld</strong> Object Fields. The ParamList must<br />

contain the key field variables for the specific device, or the device cannot be identified. The<br />

remaining field variables in the array define which values to retrieve from <strong>Simulator</strong>. No Default.<br />

Values : Variant A variant array storing variants. This array can store any type of information<br />

(integer, string, etc.) in each array position. Values must be passed for the key field variables in<br />

ParamList, in the same array position. The remaining field positions in the Values array can<br />

initially be filled with either empty strings or zeroes, as the values will be replaced when the<br />

function is processed. No Default.<br />

EString : Variant This parameter must be assigned a variable declared as a Variant. This<br />

parameter is for a return value only, and will assign the passed variable a string representing an<br />

error that may have occurred in the <strong>Simulator</strong> Automation Server. If no error occurred, the<br />

EString variable will return an empty string.<br />

GetParameters("gen", [pwBusNum, pwGenID, pwGenAGCAble], ValArray = [1, "1",<br />

""], EString)<br />

This function call will return the AGC Status of bus number one, generator ID number 1, in the<br />

ValArray variable. Note that the generator bus number and ID had to be passed into the<br />

function, while the remaining field could be assigned an empty string. If the bus number and ID<br />

had not been passed, an error would have been returned since <strong>Simulator</strong> would not be able to<br />

identify a generator. With a valid bus number and ID for the generator, the ValArray variable<br />

would have returned an array of the following format: ValArray = [1, "1", "Yes"].<br />

©2011 <strong>PowerWorld</strong> Corporation<br />

1475

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!