5. First Time setup

When setting up a PC to run the PARTF for the first time, several important steps must be performed. If these are not performed properly, you will get an error message. At the end of this section is a trouble shooting guide to help with error messages common to incomplete first-time setup. to begin with make sure MATLAB and Python have been installed on the PC. PARTF has only been tested with Python 2.7 an it is recommended to use the 2.7 version of Python because Python 3.x has incomplete support at the time of the PARTF development.

5.1. Labview Dependencies

A number of Labview packages are needed to run the PARTF. You can download them and install them with VI Package Manager (VIPM) (which comes bundled with labview after 2014).

(note: for the below, x.x.x.x refers to the latest version available)

5.1.1. NISTErrorLib

Download and install NISTErrorLib.

The NISTErrorLib builds on the native LabVIEW error handler and allows for muttiple errors to be carried in an error array, adds error priority, error severity, logging, ability to cleanly exit the program on Critical and Fatal Errors and a uniform error dialog. Once the NISTErrorLib package is installed, you can find an example of how to use it in in the ErrorLib pallette: “Producer Consumer Design Pattern (Events).vi, labeled “Test Errors”

5.1.2. BaseClasses Library

Download and install BaseClasses.

All classes in PARTF inheret from the BaseObject class. All Plugin classes inheret from BasePlugin class. All of the Plugin modules have a Base Plugin class for that module which all the plugin classes inheret from.

5.1.3. ModuleAdmin Library

Download and install ModuleAdmin.

The administrative library and classes for the Cloneable, Pluggable modules used in the PARTF. Provides a ModuleAdmin class for maintining module properties. CloneRegistration providing properties and methods for adding, removing and accounting for instantiated clones, and VIs for synchronizing module clones and their calling applications.

5.1.4. Socket API Class

Download and install SocketAPI.

The Socket class provides an API and some middleware for TCP and UDP point to point and multicast communications. Once installed, useage examples can be found using the labview Example Finder. Look under the task “Networking/TCP & UDP” for the examples beginning with the word “Socket.”

5.1.5. OpenG Variant Configuration File Library

Download and install either from the VI Package Network using VIPM by going to the the OpenG Variant Configuration Library

The OpenG Variant Configuration File Library package contains tools for writing and reading variant data to and from INI files. Installing this package requires a free account with JKI Software During installation, the package will automatically download some other OpenG dependencies.

5.2. Matlab Path

The PARTF When the PARTF is loaded, a MATLAB command window is opened in the background. the Matlab icon appears in your taskbar. The MATLAB command window path must be set up. The command window does not use the same MATLAB path as the MATLAB IDE so it must be set up from within the command window using the pathtool command. Select Add with Subfolders and browse to ..\<your PARTF Location>\Modules\Matlab and select the folder. Note that you can use the matlab command which \-all pathdef to locate the pathdef.m file. There should only be one pathdef file in the list, usually located at <matlab location>\toolbox\local\pathdef.m

5.3. Matlab Libraries used by LSE Application Example

The Linear State Estimation Example Application uses two Matlab toolboxes that need to be downloaded:

  • Go to the PSERC MatPower Page and click Download Now.

  • Unzip the downloaded file into your Documents\MATLAB\Toolbox folder.

  • Add the path to MatPower to the Matlab Path using the instructions in the Matlab pathtool similar to the Matlab Path section above.

  • PARTF requires some of the .m files in MatPower to be modified. Find the following folder: <partf install path)Modules\MATLAB\Events\IEEEBus\IEEE cases, copy the nine ‘case##.m’ files and copy them to the matpower main folder, replacing the files that were there. The most part of the files are the same, but little modifications were made to save the reference voltages of the IEEE systems.

The LSE Application Example also includes Dynamic Events. These examples require the Matlab Power System Toolbox available from The Royal Institute of Technology in Stockholm, Sweden.

Note that the Power System Toolbox is not open source software and cannot be redistributed.

5.4. Python Path

5.5. Troubleshooting

ISSUE EXPLANATION
Error 1050 occurred at LabVIEW: Error occurred while executing script. Error messege from server: ??? Undefined function “<name>” … The Matlab path is not set correctly. In the matlab command window, type ‘’pathtool’‘. The search path should include a set of folders under …ModulesMatlab… If it does, then check the path to the pathdef.m folder using which -all pathdef, there should be only one pathdef.m file listed.