SQL Logger Tags

Not counted towards your tag license limit.

The SQL Logger tag type is used to select where the data to be logged is to come from. Before using an SQL Logger tag you should create a SQL Logger Group tag as described in the preceding section. SQL Logger tags contribute values to SQL Logger Group tags.

Each record added to the database will include:

  • An index value indicating which tag's value is being recorded
  • A time stamp
  • The value of the tag being logged at that moment
  • A flag to show whether the value is 'manual data'
  • A flag to show whether the value is 'questionable data'
  • An alarm flag
  • (Characteristics available in the Table of Type Characteristics.)

SQL Logger properties Log Settings tab

The Log Settings tab is where you select and control which tag's values you wish to log.

Tag to log,  Variable to log

In the "Tag to log" selection area, simply choose any existing tag from your project. If that tag has multiple values which could be logged, you will have a choice in the "Variable to log" selection. In most cases, the variable will simply be "value".

Enable

Enable or disable logging of the selected value by entering a 1 for Enable and a 0 for disable. You can also toggle whether logging is enabled based on a script expression, or by selecting a tag: either the same tag you are logging the data values for, or any other. This provides you with the option of either logging continuously or logging only when a condition is met such as when an Alarm tag is activated.

SQL Logger Group

An SQL Logger Group must be selected. SQL Logger tags contribute their values to SQL Logger Group tags which then manage the actual output of the data to a database.

Deadband (Engineering Units)

If (and only if) the associated SQL Logger Group was set to trigger on data changes, it has essentially passed control to this tag to cause data writes to occur. If this is the case, then the Deadband field will be enabled and you will have the option of indicating how much the value must change by before another value will be written to the database.