On this tab, you set up the connection to the database and create the table in which you want the values of the subscribed tags to be stored later. (See also: ODBC Destination System.) The following database types can be used:
MS SQL Server 2008
SAP HANA database
You have created and configured the data source
that you want to use for your database in the ODBC Data Source Administrator
. (See Setting Up the Connection to the SQL Server and Setting Up the Connection to the SAP HANA Database.)
Choose the Add Destination System
pushbutton and then choose the destination system type ODBC destination system
.
The Configuration
tab appears.
You establish the connection to the desired database in the ODBC data source
screen area.
Field | Description |
---|---|
| Choose the ODBC data source that you created previously in the |
| Enter the logon data for the ODBC data source that you created previously in the |
Choose the Test Connection
pushbutton to check if a connection has been established.
You can create a table in PCo with a predefined structure. This table is created automatically in the connected database after saving. On creation, this table already contains a data record that you need to configure. The data record consists of the following four table fields. In the database, these table fields form the columns of the history table that are then filled with values when the agent instance is running.
IID
: Tag ID
IQUALITY
: Quality of the Tag Value
ITIMESTAMP
: Time Stamp
IVALUE
: Tag Value
To create a new table, choose the Create Table
pushbutton in the Definition of Table Records
screen area.
The Create Table
dialog box appears.
Enter the name of the table.
The table name is structured as follows:
[<schema>.]<history_table>]
Example
PCO.HISTORY
Entering the database schema is optional. If you do not enter anything, PCo automatically uses the user name that you use to log on to the database as the schema.
Example
User name Mustermann and table name TAG_History lead to MUSTERMANN.TAG_HISTORY
.
The system then displays a table with a data record. The names of the four table fields are hard-coded and cannot be changed.
Define the settings for the data record (see Add Record
).
If you have already created a table, you can choose this table and add as many records to it as you want.
Choose the Add Record
pushbutton to select the table you want and to add a new data record.
The Choose History Table
dialog box then appears.
If necessary, enter PCO in the Filter
field, if a great many tables are displayed for selection. The system then only displays the PCo-relevant tables.
Select the table you want.
The system now displays a new data record in the form of a predefined assignment table. The following example shows the structure of a data record:
Column | Description |
---|---|
| Indicates that an entry is necessary for this table field. In this case, an asterisk (*) is displayed. Note An asterisk (*) is always displayed in the following cases:
End of the note. |
| In the first row of a data record, the name of the history table for which you want to create a data record is specified. In the following rows, the table fields of the table are displayed, for example, ITIMESTAMP. |
| Specifies the SQL type of the table field. The ID, for example, always has the type INTEGER. |
| Here you specify a value for the table field. If it is a variable, the following applies: The variable must start with a letter. The variable must only consist of letters, digits, and underscores, for example, VAL1. |
| By selecting this checkbox, you specify that the entry in this row is to be a variable. If you do not select the checkbox, the table field is treated as a constant. |
Enter a value for each table field. Specify for each table field if it is a variable or a constant by selecting the Is Variable
checkbox for a variable.
Example
Required | Name | Type | Value | Is Variable |
---|---|---|---|---|
PCO.HISTORY |
| Pushbutton for deleting the entire data record is displayed. | ||
* |
|
| Enter 1, for example. | No selection required because it is a constant. |
* |
|
| Enter 1, for example. | No selection required because it is a constant. |
|
| Enter TS1, for example. | Set selection for variable. | |
|
| Enter VAL1, for example. | Set selection for variable. |
The entries are a prerequisite for PCo being able to assign the subscribed tags to the variables, and for the tag values, which are sent using the notification messages, being written later to the history table on the database.