How to Log Data Based on Another Tag's Value
The Trigger Item ID and the Trigger Expression allows engineers to log a group of tags based on a configurable tag expression. This feature provides the engineer the ability to decide when they are, or are not, writing PLC data to the historian. It automatically starts/stops data logging based on whether the Trigger Expression is TRUE or FALSE. This feature is especially helpful if a user is seeking to stop logging data in response to a process breakdown to retain the integrity of the data pool. Follow the steps to learn how the Trigger Item ID and Trigger Expression can be used.
Create a Logging Session
Learn how to start a logging session with the OPC DA Collector.
Select a Group of tags
The Trigger Item ID and the Trigger Expression are settings at the 'Group' level.
First, determine your Trigger Item ID. The Trigger Item ID references a single OPC tag whose value determines whether all tags in the current logging group should be logged and historized.
Enter the tag name in 'Trigger Item ID' field directly above the trends grid.
Next, create the Trigger Expression. The Trigger Expression is an expression where 'x' represents the Trigger Item ID. When the Trigger Expression does not equal 0 or evaluates as TRUE, the tag group begins to log data. A value of 0 or FALSE stops logging data for the entire group.
For example, imagine a tag named 'Tag001' as the Trigger Item ID. By entering in the 'Trigger Expression' field an expression such as x<100, all the tags in the logging group start logging data when the value of the designated Trigger Item ID tag is less than 100. Once the value of 'Tag001' equals or climbs above 100, no data is recorded. In the historian this time frame appears as a 'No Data' entry.
A variety of operators and functions may be used in the Trigger Expression. These include: