A BASIC script file is a text file that you can edit with any word processor or text edit. OneLiner and Power Flow both have built-in editors that are designed for editing script. We encourage you to use the built-in editors.
Please follow these directions to open a script file called perunit1.bas.
A 29-bus system is used in most of this tutorial. You will now open its binary data file.
1. Open the file EXAMPLE30.OLR (EXAMPLE09.OLR for Academic Suite users, and ASPEN9.OLR for Power Flow users.)
Note: It is not necessary to have a network open in order to edit a script file, but in practice, most PowerScript commands require an open data file to run.
2. Select the Tool | Scripting | Edit / Create Script command
Note: You can click on the button on the toolbar.
A blank Script Editor window will appear
3. Open the file perunit1.pas in the script editor as follows.
Select the File | Open. Click once on the file name 'perunit1.bas' in the list box. The name will appear in the File Name edit box. Click on the "Open" button.
The file will be loaded into the Script Editor
4. Perform a test run.
Select the Run | Start command. The per unit calculator main dialog box will appear. The Base MVA edit box will show the current system MVA base of 100.
Enter data: Base kV = 132; Ohm = 5;
Click on the “Ohm -> PU” button. The corresponding per unit value of 0.028696 will be displayed in the edit box labeled “p.u”
5. Press Done to close the PU calculator and return to the script editor screen.