Logging Groups

TrendWorX64 Logger may store data for many different kinds of tags from a particular data source at the same time. Some tags might be from light sensors, others from security sensors, while still others might monitor or control the physical plant. In order to control the way in which each different category of tags are handled, you can use a set of logging groups. Each database group may have one or more logging groups, and it is the logging group that serves as the container object for the individual tags that you add to your trending plots.

 

With a logging group you can control:

To create a new logging group

  1. Right-click the database group to which you wish to add a logging group.

  2. Select the New Logging Group command from the context menu.

You can also edit existing logging groups using the Edit or Edit on New Tab buttons in the Edit group on the Home ribbon.

 

There are four logging group attributes tabs:

Data Collection Options

On the Data collection tab you are able to set the rate for gathering data along with how often calculations will be performed.

Note: Data collection rate and calculation period play a major role in consuming system resources within TrendWorX64 Logger and your data source(s) (SQL server). If you find that your server(s) are sluggish, consider taking fewer samples or lengthening your calculation period and supporting fewer updates.

 

Warning: The refresh interval should never be less than the data collection interval and never more than 86,400 seconds (24 hours).

For example, if you have a tag that serves to identify the manufacturing run for a paint of a certain color, that could serve as the batch number or string. Another tag might evaluate the specific manufacture of this color paint so that each manufacturing run would be unique; and that tag would serve as the lot number or string.

 

Click the Apply button to save your changes. If you do not want to save the changes you made, click the Refresh button.

 

Back to Create New Logging Group

Starting/Stopping Data Collection

On the Start/Stop tab you can set the time that data collection begins and ends. Data collection reads OPC UA tags into memory but does not write them to disk. If you want to set the time or condition for logging the data to your database, then you set those properties on the Logging Tab, which is described below.

 

The options for configuring the data collection process include:

To have data collection begin immediately upon TrendWorX64 Logger start up:

  1. Enable the On Start check box in the Start Settings section. Data collection starts whenever the logger is in runtime mode (the default).

 

To start or stop data collection at a specific time of your choosing:

  1. Enable the On Time check box in either the Start Settings and Stop Settings sections.

Note: Use hours 0 - 11 for AM (midnight to up to noon) and 12 - 23 for PM (noon to up to midnight).

 

  1. Enter the hours, minutes, and seconds into the respective boxes in the Start Settings and Stop Settings sections.

 

To have data collection synchronized to the beginning of the next start time:

Enable the Synchronize check box in the Start Settings section.

 

Data collection starts at the beginning of the next time period. For example, if the desired start time is 10:00:00 AM, the data-collection rate is 1 hour, and the data logger enters runtime mode at 10:15:00 AM, the data-collection and data-logging activity for the selected logging group will start at 11:00:00 AM.

 

To set a time period for data collection to start or stop:

  1. Enable the On Interval check box.

  2. Enter the days, hours, minutes, and seconds into the Days, Hours, Minutes, and Seconds boxes in the Start Settings and Stop Settings sections.

For example, assume you set the On Interval in the Start Settings section to 2 hours, and the On Interval in the Stop Settings section to 30 minutes and the logger starts up at 1:00 PM. Data collection begins at 3:00 PM and then ends at 3:30 PM. If you had left the On Interval to stop disabled, then logging would continue until you stopped it, or until a logical condition for On Condition evaluated to False.  

 

To define a condition that starts or stops data collection:

  1. Enable the On Condition check box in either the Start Settings or Stop Settings section.

  2. Click the ellipsis button next to the On Condition text box. The Expression Editor opens.

  3. Build your expression, which must be a Boolean that evaluates to True or False.

 

Warning: The Expression Editor will evaluate your expression for syntactical (logical) correctness, but cannot determine if the expression will function correctly. You should test the expression to see if it functions correctly.

  1. Click OK to close the Expression Editor.

  2. Click the Apply button to save your changes. If you do not want to save the changes you made, click the Refresh button.

 

Typically you build an expression in the Expression Editor that looks at an OPC tag and evaluates it as part of the expression. When you click the Variables button in the Expression Editor it opens the Data Access dialog box where you can select available OPC UA data sources.

 

Back to Create New Logging Group

Logging Data

The Logging tab in the Logging Group dialog box determines the settings and conditions for storing historical information into the database for the selected logging group. It provides the means necessary to control the logging operation only. If you wish to set the conditions for data collection you should set those properties on the Start/Stop tab, which is described above.

 

The options for configuring the logging process include:

Note: Use hours 0 - 11 for AM (midnight to up to noon) and 12 - 23 for PM (noon to up to midnight).

Click the Apply button to save your changes. If you do not want to save the changes you made, click the Refresh button.

 

Back to Create New Logging Group

Managing Table(s) for Logging Data

When you log data to your historical trend database you are storing data in tables. This allows a better overview of the data than a continuous stream of data would. The Table Management tab in the Logging Group dialog box allows you to configure how the data will be stored in terms of the number of tables and when a new table will be started

 

You can set up the data-logging configuration for a logging group so that the data is stored to multiple tables in a sequential order. Doing so has the following benefits:

The number entered in the Number of Tables field determines the maximum number of tables that will be created. When that number of tables is reached and filled, the SQL server deletes the table with the oldest stored data to create the next new table.

 

To name your table(s):

Enter a name in the Table Name text box. The SQL server appends the number of the table in the sequence to the end of the table name automatically. For example, if you entered the name "MyTable" into this text box, the first table created would be called "MyTable1," the second table would be called "MyTable2," and so on.

 

 

To create tables at startup:

Enter the number of tables desired into the Number of Tables box. The maximum number of tables that you can create is 3,000. You can also specify the number that TrendWorX64 Logger should assign to the first table using the Startup Table box.

 

To set the conditions under which a new table is created, complete at least one of the following steps:

 

Back to Create New Logging Group

 

See also:

TrendWorX64 Logger