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

Problem with Historian that use mysql.

May 31, 2011 at 5:38 AM
Edited May 31, 2011 at 5:41 AM

Hello Everybody !

I'm newbie with OpenPDC.

I installed the OpenPDC version 1.5Beta and everything work well.

I configured the Historian to save the data to mysql server. the OpenPDC can connect to the database and insert data normally but only the Value Field have data, the SignalID and Tag fields are null, the value of Time field is '0000-00-00 00:00:00'.

Bellow is the table structure:

 

CREATE TABLE `adapt` (
  `SignalID` varchar(36) DEFAULT NULL,
  `Timestamp` bigint(20) NOT NULL,
  `Value` varchar(50) NOT NULL,
  `Tag` varchar(200) DEFAULT NULL,
  `Time` timestamp NULL DEFAULT NULL,
  `Source` varchar(100) DEFAULT NULL,
  `TimestampQualityIsGood` tinyint(1) DEFAULT NULL,
  `ValueQualityIsGood` tinyint(1) DEFAULT NULL,
  `Id` int(15) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`Id`)
) ENGINE=MyISAM AUTO_INCREMENT=2967883 DEFAULT CHARSET=latin1;

The configuration of Historian:

Type Name: AdoAdapters.AdoOutputAdapter

Connectstring:
tableName=adapt;dbconnectionString={server=localhost;database=openpdc;uid=root;pwd=''};
dataProviderString={AssemblyName={MySql.Data, Version=5.2.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d};
ConnectionType=MySql.Data.MySqlClient.MySqlConnection; AdapterType=MySql.Data.MySqlClient.MySqlDataAdapter}

 Assembly Name: AdoAdapters.dll

I used the demo data with Sample1344.PmuCapture file, my system don't connect to PMU.

Please help me to fix the problem.

Thank in advance any idea !

May 31, 2011 at 1:54 PM

The following thread has details that may assist you with the AdoAdapters: http://openpdc.codeplex.com/discussions/255282

Jun 1, 2011 at 6:09 AM

Thank you so much for your suggestion Ritchie.

i fixed the problem and the system work well now.

but it existing the bit problem now.

The TagName field is still Null now.

I changed the table structure like bellow:

CREATE TABLE `adapt` (
  `ID` int(30) DEFAULT NULL,
  `SignalID` varchar(100) DEFAULT NULL,
  `TagName` varchar(200) DEFAULT NULL,
  `Source` varchar(100) DEFAULT NULL,
  `Timestamp` varchar(50) NOT NULL,
  `TimestampQualityIsGood` tinyint(1) DEFAULT NULL,
  `ValueQualityIsGood` tinyint(1) DEFAULT NULL,
  `Value` double DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

the connecstring:

tableName=adapt;
IDFieldName=ID;
TagNameFieldName=TagName;
SignalIDFieldName=SignalID;
SourceFieldName=Source;
TimestampQualityIsGoodFieldName=TimestampQualityIsGood;
ValueQualityIsGoodFieldName=ValueQualityIsGood;
TimestampFieldName=Timestamp;
ValueFieldName=VALUE;
dbconnectionString={server=localhost;database=openpdc;uid=root;pwd=''};
dataProviderString={AssemblyName={MySql.Data, Version=5.2.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d};
                    ConnectionType=MySql.Data.MySqlClient.MySqlConnection; AdapterType=MySql.Data.MySqlClient.MySqlDataAdapter}

Please give me some suggestion to fix this problem.

Thank in advance any idea.