Enhance OpcManager logging for data change notifications
- Added logging statements to OpcManager to track data change notifications and cycle count resets for monitored tags. - Improved traceability of events related to OPC cycles, aiding in debugging and monitoring.
This commit is contained in:
@@ -222,6 +222,12 @@ class OpcManager():
|
|||||||
source_timestamp = monitored_item.Value.SourceTimestamp
|
source_timestamp = monitored_item.Value.SourceTimestamp
|
||||||
tag = str(node)
|
tag = str(node)
|
||||||
|
|
||||||
|
self.logger.info(
|
||||||
|
f"Data change notification received for tag: {tag} after {self.nodes[tag]['cycle_rule']['cycle_count']} cycles")
|
||||||
|
|
||||||
|
self.logger.info(
|
||||||
|
f"Resetting cycle count for tag: {tag} after {self.non_receive_count} OPC cycles")
|
||||||
|
|
||||||
self.nodes[tag]['cycle_rule']['cycle_count'] = 0
|
self.nodes[tag]['cycle_rule']['cycle_count'] = 0
|
||||||
self.non_receive_count = 0
|
self.non_receive_count = 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user