If you built the project in Debug mode and want to run it using the debugger, follow these steps.
- Open Microsoft Visual Studio 2008.
- In the toolbar, go to "File > Open > Project/Solution..."
- Navigate to "SOURCEDIR\Synchrophasor\Current Version\Source", select "Synchrophasor.sln", and select "Open" (SOURCEDIR is the directory where you extracted the openPDC source code files).
- In the toolbar, go to "Debug > Start Debugging".
If you built the openPDC from source, you can run it as an application by navigating to your
installation directory and double-clicking "openPDC.exe".
Using the openPDC console
You can use the openPDC console to monitor the status of connections, configurations, errors, general statistics, and many other things.
If you installed the openPDC using
the openPDC installers, you can run the console using the executable found in your
installation directory (and there should also be a shortcut in your Start menu). If you built it from source, the console should appear as soon as you begin running the openPDC application. Once the openPDC is ready, you can begin issuing commands through
the console.
The openPDC console commands typically have three options and are entered as follows:
| Command |
Description |
| command /a |
Executes the command on the Action Adapter Collection. |
| command /i |
Executes the command on the Input Adapter Collection. |
| command /o |
Executes the command on the Output Adapter Collection. |
If you enter a command without any of the three options, it will default to the /i option. The following subsections will go over a few common uses of the system and their commands.
Note: Since input and output are taken care of in the same console, an output statement may appear while you're in the middle of typing a command. Please ignore this occurrence and simply continue typing the command; the program will still
handle the command properly.
See the list of commands (the help command)
The help command can be used to see a list of all commands that can be entered into the console.
See the list of adapters (the list command)
Used by itself, the list command will simply list the adapters in the specified adapter collection. Additionally, list can display detailed information about a specific adapter specified as an argument to the command. The argument can be
either the name or the ID of the adapter. The following images show examples of this usage and its output.


View performance details about the openPDC service (the health command)
The health command lists performance details about the openPDC service allowing the viewer to see the system state and performance statistics.
View low level data (the status command)
The status command outputs a significant amount of low level data about each connection. Due to the voluminous nature of this data, it is recommended that you look back to the "StatusLog.txt" file (located in the output directory "SOURCEDIR\Synchrophasor\Current
Version\Build\Output\Debug\openPDC") which saves each output seen on the screen. If you only want detailed information on a specific adapter,
the list command can be used to display only that information.
Connect and disconnect a PMU or PDC (the connect and disconnect commands)
The connect and disconnect commands are somewhat self-explanatory. These commands are used to connect and disconnect a PMU or PDC which is available as seen in the output of the list command. The adapter can be specified
by entering its name or ID as an argument to the command. The following image shows an example of the usage of these commands.

Running the PMU Connection Tester
The PMU Connection Tester can be used to verify that the data stream from any known phasor measurement device is being received.
If you are running the openPDC in Debug mode, you can run this application by right-clicking "PMU Connection Tester" in the Solution Explorer view and going to "Debug > Start new instance". You may need to redisplay the Solution Explorer view by going to
"View > Solution Explorer" in the toolbar.
If you built the system from source and do not wish to run the PMU Connection Tester in the Visual Studio debugger, the executable can be found in one of the following directories (depending on whether you built the openPDC in Release mode or Debug mode respectively).
- SOURCEDIR\Synchrophasor\Current Version\Build\Output\Release\Tools\PMUConnectionTester
- SOURCEDIR\Synchrophasor\Current Version\Build\Output\Debug\Tools\PMUConnectionTester
Where SOURCEDIR is the directory where you extracted the openPDC source code.
The following subsections will instruct you on creating a data stream and verifying that it is being received.
Creating and verifying an IEEE C37.118-2005 data stream
- Run openPDC.
- Go to the PMU Connection Tester window and select the "Udp" tab toward the top of the window.
- In the text box labeled "Local Port", enter "8800".
- In the drop-down list under the "Protocol" tab, select "IEEE C37.118-2005".
- Still under the "Protocol" tab, click "Configure alternate command channel".
- Clear the check box labeled "Not defined".
- In the text box labeled "Port", enter "8900".
- Click "Save".
- Still under the "Protocol" tab, click "Connect".
The following images show the PMU Connection Tester windows populated with the correct settings and marked with numbers corresponding to those in the steps listed above.


Creating and verifying a BPA PDCstream data stream
- In your openPDC database, modify the "OutputStream" table.
- Change the value of the "Type" column to "1".
- Change the value of the "ConnectionString" column to "iniFileName=TESTSTREAM.ini".
- Run openPDC
- Go to the PMU Connection Tester window and select the "Udp" tab toward the top of the window.
- In the text box labeled "Local Port", enter "8800".
- In the drop-down list under the "Protocol" tab, select "BPA PDCstream".
- Select the "Extra Parameters" tab.
- Select the "ConfigurationFileName" property and click "..."
- Navigate to "SOURCEDIR\openPDC\Synchrophasor\Current Version\Build\Output\Debug\Applications\openPDC", select TESTSTREAM.ini, and select "Open" (SOURCEDIR is the directory where you extracted the openPDC source code files).
- Select the "Protocol" tab.
- Click on "Configure alternate command channel".
- Ensure that the check box labeled "Not defined" is selected.
- Select "Save".
- Still under the "Protocol" tab, click "Connect".
The following images show the PMU Connection Tester windows populated with the correct settings and marked with numbers corresponding to those in the steps listed above.



Configuring openPDC security
In the latest version, security is enabled by default. See http://openpdc.codeplex.com/wikipage?title=Remote%20Console%20Security for more information.
Using the in-process historian adapter
The in-process historian adapter optionally allows for the metadata and the time-series data stored in the local archive to be accessed via REST web services. The openPDC by default has both the metadata and time-series web services enabled, and they can
be accessed at http://localhost:6151/historian and http://localhost:6152/historian URLs respectively. See below for a brief description of the REST API for these web services:
Note: The format in which data is returned by these web services depend on the format specified at the end of all the URLs below. The formats currently supported by these web services are XML and JSON.
Metadata Web Service
- http://localhost:6151/historian/metadata/read/[xml|json]
Returns metadata for all of the measurements defined in the archive.
- http://localhost:6151/historian/metadata/read/<one or more ID delimited by comma>/[xml|json]
Returns metadata for the measurement IDs specified in the comma-delimited list.
- http://localhost:6151/historian/metadata/read/<starting ID in the range>-<ending ID in the range>/[xml|json]
Returns metadata for all the measurement IDs specified in the range.
Time-series Web Service
- http://localhost:6152/historian/timeseriesdata/read/current/<one or more ID delimited by comma>/[xml|json]
Returns the latest time-series data for the measurement IDs specified in the comma-delimited list.
- http://localhost:6152/historian/timeseriesdata/read/current/<starting ID in the range>-<ending ID in the range>/[xml|json]
Returns the latest time-series data for the measurement IDs specified in the range.
- http://localhost:6152/historian/timeseriesdata/read/historic/<one or more ID delimited by comma>/<start time>/<end time>/[xml|json]
Returns historic time series data for the measurement IDs specified in the comma-delimited list for the specified GMT time span. The time can be absolute time (Example: 09-21-09 23:00:01 for Sep 21, 09 11:00:01 pm) or relative to the current time (Example:
* for now or *-1m for 1 minute ago where s = seconds, m = minutes, h = hours and d = days).
- http://localhost:6152/historian/timeseriesdata/read/historic/<starting ID in the range>-<ending ID in the range>/<start time>/<end time>/[xml|json]
Returns historic time series data for the measurement IDs specified in the range for the specified GMT time span (time format is same as above).
Configuring a Connection String
This section contains information about how to configure the connection string for the MultiProtocolFrameParser. The connection string can be found on lines 29-31 of the code snippet from the
Device to Data in 5 easy steps page and also in the Device table of the openPDC database. The first step to configuring your connection string is to determine which transport protocol you're using and change the value of the transportProtocol key accordingly.
The following subsections detail the keys that are specific to each transport protocol. The possible values for the transportProtocol key are
file,
tcp,
udp, and
serial.
File
Note: The connection string is already configured for the file transport protocol in the
example code snippet.
The file key specifies the name of the file from which phasor measurements are read.
The following is an example connection string using the file transport protocol:
phasorProtocol=Ieee1344; accessID=2; transportProtocol=file; file=Sample1344.PmuCapture
TCP
The server key specifies the name or IP address of the device and the port on which it is listening (localhost:8888 or 127.0.0.1:8888 format).
The interface key is optional and specifies the interface through which the TCP connection is being made.
The following is an example connection string using the TCP transport protocol:
phasorProtocol=IeeeC37_118V1; accessID=5; transportProtocol=tcp; server=localhost:8888
UDP
The port key specifies which UDP port the device is broadcasting to.
The interface key is optional and specifies the interface through which the UDP connection is being made.
The server key is optional and is used to broadcast data over a UDP connection.
The following is an example connection string using the UDP transport protocol:
phasorProtocol=BpaPdcStream; iniFileName=TestConfig.ini; transportProtocol=udp; port=8500
Serial
The port key can be entered as "COM1", "COM2", etc.
The baudrate key is an integer.
The parity key should be entered as one of the following: None, Odd, Even, Mark, Space.
The stopbits key should be entered as one of the following: None, One, Two, OnePointFive.
The databits key is an integer.
The dtrenable key is is an optional boolean value that enables the Data Terminal Ready (DTR) signal.
The rtsenable key is an optional boolean value that enables the Request to Send (RTS) signal.
The following is an example connection string using the serial transport protocol:
phasorProtocol=SelFastMessage; transportProtocol=serial; port=COM1; baudrate=57600; parity=None; stopbits=One; databits=8
Installation directory
If you installed the openPDC using
the openPDC installers the default installation directory can be found at the following location.
C:\Program Files\openPDC
If you built the openPDC from source, the output directory is in one of two places (depending on whether you built the system in Release mode or Debug mode respectively).
- SOURCEDIR\Synchrophasor\Current Version\Build\Output\Release\Applications\openPDC
- SOURCEDIR\Synchrophasor\Current Version\Build\Output\Debug\Applications\openPDC
Where SOURCEDIR is the directory where you extracted the openPDC source code.