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
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.
- Source Type: Select the source type of the location of the data point values.
- X Axis field: If the X axis of the trend graph is set to be numeric instead of date/time (in the Axes settings), then enter the name of the field (column) of the data source that holds the data for the X axis.
Note: If you have enabled decimation (either in the Advanced settings for all trends or in the Options settings for a single trend), then the field that you have specified here must be sorted in ascending order. The procedure to do this varies by source type (e.g., text editor, spreadsheet application, external database, etc.), so for more information, see the documentation for your specific type.
- 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.
|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.
If you change the value to 0, then there will be no timeout at all; data source queries will always continue until they are completed.