This project has moved and is read-only. For the latest updates, please go here.

Device to Data connection string

May 31, 2011 at 9:32 PM
Edited Jun 1, 2011 at 5:49 AM


   I am new to openPDC, I am working on testing of PDC's and I was trying to develop a module which captures the data which is streaming out from a PMU/PDC.I followed the steps in the Device to Data and I was able to run the code for the example file=Sample1344.PmuCapture.

Now I am trying to rerun the module but with a small difference,i want to connect it to a real PMU/PMU simulator and get the streaming data.The problem i face is with the connection string that

is to be entered in the code.The tried to look at the stream using the PMU connection tester and was working fine.

The PMU/PMU simulator is streaming the data in UDP (with TCP parameters) 

Local port=8701 ( Host IP=  port=8501,this information is entered in a tab which springs up when you click configure alternate command channel)

(I am attaching a screen shot for more clarity)


I would be greatly thankful if somebody can help me how to use a correct connection string for this type of connection


I have made changes to the connection string only.Can you guys please advice me if anyhing else has to be changed for such a type of communication




Jul 22, 2011 at 2:12 PM

Did you get this resolved?


Jul 24, 2011 at 5:07 PM

Yes Ritchie I did ,one of my friends had a old version of open PDC where a connection string for such a type of communication was configured for.


vijay krishna

Jul 29, 2011 at 4:19 PM
Edited Aug 1, 2011 at 2:05 PM

hi krishna, i have the same problem, i followed the  steps in the Device to Data but i need to connect to a real pmu via tcp/ip,  what did u do???? can u help me?? i  dont know too much about what lines i have to add  




Jul 29, 2011 at 4:36 PM


 parser.ConnectionString =                "phasorProtocol=IeeeC37_118V1; accessID=103; " + "TransportProtocol=Udp;localport=8301;commandchannel={protocol=tcp; server=; port=8201}";


hope it helps

Aug 1, 2011 at 2:49 PM

hi krishna, i have some problems when i run my program like this  

bad ip address format   how can i force IPv4?? 

Aug 1, 2011 at 5:03 PM

kmilo8712 -- You can force IPv4 by adding this to your connection string: "interface=;"

Aug 4, 2011 at 9:42 PM


Hi ,

    I am working with the Device to data program to look into the data coming from the PMU stream.I have a PMU simulator running in my computer where I can save the commandframe sent by the Devicetodata program

  The connection string used for establishing the connection is shown below.Strangely the IDCODE in the command frame(to turn on data frames) sent by devicetodata to the PMUsimulator is  always 1 and thus not match with PMU ID.From the openPDC source code seen below this will happen when  settings.TryGetValue("accessID", out setting) returns false,and accessid is set to 1,


but we have accessID in the connection string.

parser.ConnectionString =
                "phasorProtocol=IeeeC37_118V1; accessID=103; " + "TransportProtocol=Udp;localport=8800;commandchannel={protocol=tcp; server=; port=8900}";



openPDC source code
                    Dictionary settings = connectionString.ParseKeyValuePairs();
                    string setting;
                    ushort accessID;

                    // Get accessID from connection string
                    if (settings.TryGetValue("accessID", out setting))
                        accessID = ushort.Parse(setting);
                        accessID = 1;

can somebody please let me know where i would be going wrong,if My connection string format is wrong(for entering ID code)

Vijay Sukhavasi
research assistant
Virginia Tech
Aug 5, 2011 at 5:53 PM

The multi-protocol frame parser does not automatically attempt to parse an access ID out of the connection string.

You will need to do that yourself (if that's how you want to configure your code) using code similar to what you posted above.

Basically all you need to do is assign the multi-protocol frame parser's DeviceID property to make this work (e.g., parser.DeviceID = accessID; ).

Hope that helps!

Aug 5, 2011 at 9:45 PM

Thanks  Ritchie, it sends a proper idcode now