Use the search and browse feature to view Kepware's repository of more than 500 Knowledge Base articles. Narrow your results or type your query into the search field below.

Search Solutions Results By: View All Solutions

Kepware Knowledge Base: Solution


Why Is More Than One Record Inserted Into the Database When the Trigger Is Set to Log 'On Data Change'?


Last Update: 11/7/2018

Problem:
Multiple records are being logged for the log group, and each record contains partially changed data.

Possible Cause:
The Log Group is like an OPC group: all of the items selected to be logged are polled at the rate specified in the General Tab or Log Group. It is possible that the data may not be polled and updated at the same time because the items may not be on the same device or may be in different memory areas in the controller (which requires multiple read polls to acquire). Because the server updates DataLogger each time one of the device polls completes, multiple data changes are triggered for the device. As a result, multiple records are logged.

Solution:
1. Use a Static Poll Interval instead of data changes. Doing so will only log one record; however, the data may be partially stale because the update is taken from cache.
2. Use an Expression Trigger that will be enabled when a Boolean in the controller goes high. The data will only be logged when the device sets the trigger value high.

Related Products
DataLogger