Skip to main content
6-Contributor
October 25, 2024
Solved

How to Increment a Counter Based on Tag Value Check Every Second in KepServerEX

  • October 25, 2024
  • 1 reply
  • 888 views

Hello everyone,

 

I’m working with KepServerEX and need some help with a tag-based counter setup. I have a single tag, and I want to monitor its value every second. Specifically, whenever the tag’s value exceeds a certain threshold, I want to increase a counter that starts at 0 by +1.

Here's a summary of what I'm trying to achieve:

  1. Monitor the tag value every second.
  2. If the tag value is above a certain threshold, increment a counter by 1.
  3. Counter should start at 0 and increase by 1 each time the condition is met.

Could someone guide me on how to set this up? Any tips on scripting or configuration within KepServerEX would be greatly appreciated.

Thanks in advance!

Best answer by MKhatri

Hello,

Thank you for your inquiry regarding the counter operation in KEPServerEX/ThingWorx Kepware Server. 

 

After careful consideration, we would like to inform you that it is not practical to perform counter operations within KEPServer due to the advanced tag processing and timing limitations that could result in inaccurate results. The core functionality of KEPServerEX is not designed to handle counter operations, and attempting to do so may lead to inconsistencies in the data.

 

For accurate counter operations, we recommend performing them either in the PLCs themselves or in the end client applications. This will ensure that the counting process is reliable and accurate.

 

If you have any further questions or require additional assistance, please do not hesitate to reach out.

Regards,
Mohit

1 reply

MKhatri15-MoonstoneAnswer
15-Moonstone
November 4, 2024

Hello,

Thank you for your inquiry regarding the counter operation in KEPServerEX/ThingWorx Kepware Server. 

 

After careful consideration, we would like to inform you that it is not practical to perform counter operations within KEPServer due to the advanced tag processing and timing limitations that could result in inaccurate results. The core functionality of KEPServerEX is not designed to handle counter operations, and attempting to do so may lead to inconsistencies in the data.

 

For accurate counter operations, we recommend performing them either in the PLCs themselves or in the end client applications. This will ensure that the counting process is reliable and accurate.

 

If you have any further questions or require additional assistance, please do not hesitate to reach out.

Regards,
Mohit