Well, I’m newer to use openPDC so I’ve get some questions and issues to setup it to my requirements.
Well, I could installed openPDC but now I need to get its data from its database.
When I installed openPDC, I’ve needed to setup a database but I’ve noticed that database is to load its configurations files
Is that rigth, or not?
My proposite is to get data from openPDC’s database with a API that I’ve write to my engineering tesis, so I don’t know if I can read from that database directly o should I made another configuration to do it ?
By default, the openPDC stores its configuration in a SQL database and the data in an openHistorian 1.0 archive. If your only requirement is to be able to query archived data, I recommend querying the openHistorian archive. If you must also use a SQL database, you will need to configure the openPDC to instead use the database as your archive by configuring an AdoOutputAdapter instance. There has been quite a bit of discussion over the years about how to configure the AdoOutputAdapter so I suggest you start by searching these boards for more information.
Inside that window I can choose adapter type. I’ve choosen MySQL: Archive mesurenmet to a MySQL.
Conection String just get me two parameters:
InputMeasurementKeys
RequeueOnException
My question about it is: Why this Conection String doesn’t ask me database name, database password, conector version, so on?
I’ve noticed ADO adapter ask me database name, database password, conector version, so on.
Must I configurate ADO adapter first and then MySQL adpater to store data in a MySQL database?
The MySQL adapter was a very simple proof-of-concept adapter written during the openPDC’s infancy. It was never really intended for production deployment. Rather it was just a simple-as-you-can-get code sample to use as a template for custom adapter development. Therefore, I really can’t recommend using it for what you are trying to do and would instead suggest using the ADO adapter, even for MySQL.
As for your question about why it doesn’t ask for certain configuration parameters, the answer is simply that this adapter was written well before we implemented the openPDC Manager. The property annotations we use to describe the connection string parameter attributes didn’t exist at the time of development, and we never went back to update the code since then.
And with a slight adjustment, you should be able to use this as a secondary archive instead by setting it up as a Custom Output Adapter. Note that I have not tested this particular configuration, but it should work in theory.
No, you can configure the MySQL database as your primary archive using the Outputs > Historian Instances page in the openPDC Manager, or you can set it up as a secondary archive using the Outputs > Manage Custom Outputs page. Either way, you need to create the TimeSeriesMeasurement table, but you only need to enter the configuration for one of either the primary archive or the secondary archive.
Also, you shouldn’t need to create any files in order to do this work. Just use your MySQL tools to create the database and then use the openPDC Manager for the rest.
According to your post, you called the table TimeSeriesMeasurement, singular and not plural.
That said, there could be other errors in your configuration that I can’t see from what you posted. For instance, why did you change the InputSourceIDs to PPA04? Is that really the name of your primary historian instance? Also, are you really using MySQL Connector/NET version 6.9.5? It’s a pretty old one, and I’m not sure you can even download it anymore.
For troubleshooting, I recommend using the openPDC Console to interact with the openPDC service to see errors and double-check the runtime configuration of your adapter. Hint: try using the list /o ADO command to see if it has any input measurements.
It’s saying that it couldn’t load the MySql.Data assembly (MySql.Data.dll) provided by the MySQL Connector/NET adapter. You may need to get the .NET & Mono build of MySQL Connector/NET which is labeled “Architecture Independent”, as the Windows version appears to be labeled x86/32-bit. It’s a no-install version so the assemblies won’t go into the global assembly cache. You’ll have to copy the assemblies into the openPDC folder.