Data Sources dialog

Accessing the dialog

To access the Data Sources dialog for a specific Trend Control screen object, first access the Object Properties dialog for that screen object and then click Data Sources.

The dialog in detail

Figure 1. Data Sources dialog
Object Properties: Trend Control dialog

The data source defines the location of the values from the data point(s) associated with it. Many points can share the same data source — you do not need to create one data source for each data point.

The data source tag is available by default to the Trend Control object. You can add additional data sources with the New button. The name you enter will be used as an alias to link the data points to this new data source.

The other fields in this dialog allow you to edit the data source settings:
  • Source Type: Select the source type of the location of the data point values.
  • X-Axis: Enter the name of the field (column) from the data source that holds the X axis data.
  • Max. Buffer: The maximum amount of data (in bytes) that will be held in runtime memory.
  • Load Progress: The tag in this field will receive a real value (0-100) that represents the percentage of the Data Source load progress.
  • Sort: This option is useful for plotting data from a Text file. When enabled (checked), it sorts the data and shows the Cursor column value until the Max. Buffer is filled. When disabled (unchecked), the data are not sorted and the Cursor column value is not shown.
  • Keep Open: This option keeps the data source open as long as the screen that contains the Trend Control object is open. This improves the performance of the runtime project, but keeping the data source open may cause other problems like database connection errors (when Source Type is Database) and file write conflicts (when Source Type is Batch or Text File). To close the data source after the data has been loaded, clear (uncheck) this option.
  • Data Source Settings: Click to define the settings for the selected Source Type.
The following table summarizes the settings for each Source Type:
Data Source Type Description X-Axis field Data Source Settings
Batch Batch generated by the Trend task of IWS Disabled. The X-Axis data will be retrieved automatically on the correct position from the proprietary Batch file generated by IWS.

Enter the data point values in Batch Name for their retrieval. You can configure a tag between curly brackets in this field to change this setting dynamically during runtime.

Database SQL Relational Database Field name that contains the X axis data

Configure the settings to link this Data Source to the SQL Relational Database that holds the data point values. See Database Configuration Dialog Window for further information about this dialog interface. Please refer to Appendix B for an example of configuring databases.

Text File Text file (e.g., CSV file) with data point values separated by a specific delimiter Number of the column that holds the X-Axis data. The number 0 refers to the first column, 1 refers to the second column, and so on.

Enter the name of the text file that holds the data points. The default path is the current project folder. You can configure a tag between curly brackets in this field to change this setting dynamically during runtime.

You can also choose one or more delimiters for the data stored in the text file. The value of each row is written in the text file between two delimiters. When using a comma as a delimiter, the grid object is able to read data from CSV files. You can even choose a custom delimiter by checking the Other option. Please refer to Appendix A for an example of configuring text files.