GE ODBC Wind Turbines
This plugin will read from the GE Data Historian, which is a Microsoft SQL Server, and send the data to the Ardexa cloud. It can be used to discover data, and also log data to the local device, and send it to the Ardexa cloud. This plugin works by using configuration files to control the names of variables, tables and sources.
Data Discovery
The plugin can be used to discover data, in particular:
All the tables in the GE database
All the fields within those tables, and/or
A sample of the data within those fields
The following sections detail how to undertake data discovery.
Discovering Tables
In order to list all the table names, the following command can be executed either on the REMOTE SHELL, or the via the plugin RUN DISCOVERY function. To run a discovery via the plugin's RUN DISCOVERY function, do the following:
Ensure the
Database config YAML
has the correct credentials to connect to the database.Ensure the
Output config file
is set toshow_tables
.Select
RUN DISCOVERY
.
This will then show a list of tables, which should look like this:
The equivalent REMOTE SHELL command to view all the database tables is: ge_wind_odbc_ardexa discover data {CONFIG_FILE} {SHOW_TABLES_FILE}
. The CONFIG_FILE is the location of the file containing the credentials. The SHOW_TABLES_FILE file is an empty file that ends with show_tables
(with this exact name - path does not matter)
Discovering Fields
In order to list all the field names within a table, the following command can be executed either on the REMOTE SHELL, or the via the plugin RUN DISCOVERY function. To run a discovery via the plugin's RUN DISCOVERY function, do the following:
Ensure the
Database config YAML
has the correct credentials to connect to the database.Ensure the
Output config file
is set toshow_fields
.Include the table, for which the fields must be known. For example; using the above tables output, this could
CV_English_ChannelData
. This should only be a single table entry.Select
RUN DISCOVERY
The output of this command will show all the fields in the specified database table, along with a sample of the rows in the table. For some of the tables, the fields will also details the name and units of the fields. This will be something like:
The equivalent REMOTE SHELL command to view all the database tables is: ge_wind_odbc_ardexa discover fields {CONFIG_FILE} {TABLE_NAME}
. The CONFIG_FILE is the location of the file containing the credentials. The TABLE_NAME is an entry from the output of Discovering Tables
discussed above. For example: ge_wind_odbc_ardexa discover fields /opt/ardexa/config/ge-wind-odbc-ardexa/task/testonly.config_file CV_English_ChannelData
Discovering Data Using Custom Mapping File
The primary purpose of a configuration file driven plugin is to provide as much flexibility as possible when defining what to capture and what to call each field. This plugin is able to read a mapping file to undertaken one or more of the following tasks:
Only collecting required variables and ignoring anything else.
Renaming all or selected variables to something else.
Scaling variables.
Changing units.
Sending data to customised tables and sources in the Ardexa cloud.
The mapping file is a comma separated file containing 11 items as follows:
Ardexa Table. This is the name of the Ardexa table, where the data will be copied.
Ardexa Source. This is the Ardexa source name given to the data.
Ardexa Variable Name. This is the name given to the variable as it will appear in the Ardexa cloud.
GE Table. This is the GE table that needs to be queried to get the variable. This name IS case sensitive.
GE Source Name. This is the source name (usually the "turbine name") to get the data. This name is not case sensitive.
GE Source Column Name. GE uses a "tall and skinny" database structure. This item tells the plugin in which column name it can find the "source name". Use the
discover fields
item discussed previously to find the name. This name is not case sensitive.GE Variable Column Name. The name of the column to find the variable. Use the
discover fields
item discussed previously to find the name. This name is not case sensitive.GE Field Name. The name of the required variable in the GE table. Use the
discover fields
item discussed previously to find the name. This name is not case sensitive.Type. The Ardexa variable type. Can be one of
decimal
,int
,keyword
ordate
Units. The units if the variable. May be empty.
Scale. The scale of the variable. May be empty
Here is an example of a mapping file:
Note:
Anything starting with
#
is a comment and can be ignored.If timestamp need to be included, then use either
TimeStampUTCSystem
orTimeStampLocalSystem
. See the first 1 lines above as an example.
The above mapping file will produce the following output:
The equivalent REMOTE SHELL command to view all the database tables is: ge_wind_odbc_ardexa discover data {CONFIG_FILE} {MAPPING_FILE}
. The CONFIG_FILE is the location of the file containing the credentials. The MAPPING_FILE is the mapping file name and must exist For example: ge_wind_odbc_ardexa discover data /opt/ardexa/config/ge-wind-odbc-ardexa/task/testonly.config_file /opt/ardexa/config/ge-wind-odbc-ardexa/full_mapping.csv
Discovering Data Using Custom "Per Source" Files
Instead of using a single mapping file (as discussed above), a separate file for each "source" can be used in conjunction with the file system to produce the desired table/source names. If the "mapping file" argument ends with the (exact) name per_source
(an empty file with this exact name, path does not matter), then the plugin will recursively look for files in the directory /opt/ardexa/config/ge-wind-odbc-ardexa/per-source
. The file structure is very similar to that used in /opt/ardexa/logs
, where the first directory is the Ardexa Table
, and any subsequent directories, plus the file name (minus the extension) will form the Ardexa Source Name
. For example, take the following file structure:
This file structure will produce two sources (WTG01
, WTG01/Data2
) that will both log data to the Ardexa table called wind_iec_600s
. The contents of the file is the same as the single mapping file, minus the "Table" and "Source Name" fields.
Ardexa Table. This is the name of the Ardexa table, where the data will be copied.
Ardexa Source. This is the Ardexa source name given to the data.
Ardexa Variable Name. This is the name given to the variable as it will appear in the Ardexa cloud.
GE Table. This is the GE table that needs to be queried to get the variable. This name IS case sensitive.
GE Source Name. This is the source name (usually the "turbine name") to get the data. This name is not case sensitive.
GE Source Column Name. GE uses a "tall and skinny" database structure. This item tells the plugin in which column name it can find the "source name". Use the
discover fields
item discussed previously to find the name. This name is not case sensitive.GE Variable Column Name. The name of the column to find the variable. Use the
discover fields
item discussed previously to find the name. This name is not case sensitive.GE Field Name. The name of the required variable in the GE table. Use the
discover fields
item discussed previously to find the name. This name is not case sensitive.Type. The Ardexa variable type. Can be one of
decimal
,int
,keyword
ordate
Units. The units if the variable. May be empty.
Scale. The scale of the variable. May be empty
Here is an example of two mapping files:
turbine1.csv
turbine2.csv
Note:
Anything starting with
#
is a comment and can be ignored.If timestamp need to be included, then use either
TimeStampUTCSystem
orTimeStampLocalSystem
. See the first 1 lines above as an example.
The above "per source" mapping files will produce the following output. Notice the table and source names.
The equivalent REMOTE SHELL command to view all the database tables is: ge_wind_odbc_ardexa discover data {CONFIG_FILE} {PER_SOURCE_FILE}
. The CONFIG_FILE is the location of the file containing the credentials. The MAPPING_FILE argument must ends with the name per_source
(an empty file with this exact name, path does not matter), then the plugin will recursively look for files in the directory /opt/ardexa/config/ge-wind-odbc-ardexa/per-source
For example: ge_wind_odbc_ardexa discover data /opt/ardexa/config/ge-wind-odbc-ardexa/task/testonly.config_file /opt/ardexa/config/ge-wind-odbc-ardexa/per_source
Remember that the per-source directory must be created, as follows: mkdir -p /opt/ardexa/config/ge-wind-odbc-ardexa/per-source
. Then create directories and files as required, and in accordance with the discussion above.
"Per Source" Mapping Generator
As discussed above, mapping files allow as much flexibility as possible. There is a very high probability that most of the time, the same OEM input field will need to be to mapped to the same output field name (such as an IEC name), for all the turbines at a site. To assist with this repetitive process, the plugin includes a generate
sub-command that will accept a template
CSV file, which describes the general mapping and applies it to any turbines that can be automatically discovered. The template file for a "per source" generate command will look a "mapping" file discussed above, except that the first 2 columns (table and source) have been removed. This is an example "per source" mapping file:
The equivalent REMOTE SHELL command to generate the "per source" mappings files is: ge_wind_odbc_ardexa generate {CONFIG_FILE} {PER_SOURCE MAPPING FILE} {TABLE NAME}
. The CONFIG_FILE is the location of the file containing the credentials. The MAPPING_FILE is the per source mapping file. The "TABLE NAME" is the name of the Ardexa table, where the events will be sent. For example: ge_wind_odbc_ardexa generate /opt/ardexa/config/ge-wind-odbc-ardexa/task/testonly.config_file /opt/ardexa/config/ge-wind-odbc-ardexa/oem-to-iec-test_v1.csv wind_iec_600s
Running this command will create the following directories and files.
The data can then be discovered using the section titled Discovering Data Using Custom "Per Source" Files
above, to display the data
Log
Logging data to the cloud can be enacted via the Ardexa Front End. The equivalent REMOTE SHELL command is: ge_wind_odbc_ardexa log {CONFIG_FILE} {PER_SOURCE_FILE or MAPPING FILE}
. The CONFIG_FILE is the location of the file containing the credentials. The MAPPING_FILE argument must ends with the name per_source
(an empty file with this exact name, path does not matter), then the plugin will recursively look for files in the directory /opt/ardexa/config/ge-wind-odbc-ardexa/per-source
. Otherwise, if a MAPPING FILE is used, it will use that log data For example: `ge_wind_odbc_ardexa log /opt/ardexa/config/ge-wind-odbc-ardexa/task/testonly.config_file
Was this helpful?