Skip to main content
1-Visitor
June 18, 2024
Solved

Cycle Time Logging

  • June 18, 2024
  • 2 replies
  • 944 views

Hello,

 

Has any configured KEPServerEX to be able to run timers between a start and end trigger tags?

 

I want to be able to setup Operation Cycle Time Logging from plcs tags and be able to calculate the time that it takes for the operation.

 

Example: Timer between hit of a start button and final test saying that the test passed without having to create a timer in the plc itself to monitor this operation

 

Thank you

Best answer by cmorehead

@CA_9674649,

 

KEPServerEX does not have the functionality to perform time change calculation between the start and end trigger tags. I suppose you could push the start and end trigger tag data to a database and have the database perform desired calculations. I'm not sure about the feasibility, but you could put in an enhancement request to see if the feature could be added. Here is a link to the Kepware article on how to open an enhancement request:

 

 Article - CS295047 - How to open an Enhancement Request for PTC Kepware Products

 

Mykepware  login credentials will be needed to access the article

 

Thanks,

*Chris

2 replies

cmorehead13-AquamarineAnswer
13-Aquamarine
June 20, 2024

@CA_9674649,

 

KEPServerEX does not have the functionality to perform time change calculation between the start and end trigger tags. I suppose you could push the start and end trigger tag data to a database and have the database perform desired calculations. I'm not sure about the feasibility, but you could put in an enhancement request to see if the feature could be added. Here is a link to the Kepware article on how to open an enhancement request:

 

 Article - CS295047 - How to open an Enhancement Request for PTC Kepware Products

 

Mykepware  login credentials will be needed to access the article

 

Thanks,

*Chris

Ascherer17
16-Pearl
June 22, 2026

I know this is an old post, but I wanted to share a proof of concept idea in case it helps others in the future.  This concept deals with a boolean tag rather than date tags, but the algorithm could likely be applied in a similar way.

My Requirement: Collect aggregate time that a machine is turned on. 

Assumptions: I have a boolean tag from the machine controller telling me that the machine is on (=true/1).  I’ll call the channel Machine1, the device Device1, and the boolean tag MachineIsOn.

Steps:

  1. Create a “Memory-Based Driver” Channel, MachineMemory, and device, MachineMemoryDevice.  Create a tag, I’ll call it On_Seconds to store the number of seconds the machine is “on”.  I used LLong for the base type.
  2. Create a “Derived” Advanced tag that adds the boolean MachineIsOn (numerical value 0/1) + On_Seconds_Calculation at a rate of 1 second.  I used LLong for this tag to match On_Seconds.
  3. Create a “Linked” Advanced tag to copy the calculated On_Seconds_Calculation value to On_Seconds.  I’ll call this linked tag On_Seconds_Link.  This tag has an input of _AdvancedTags.On_Seconds_Calculation, an output of , Trigger type of “Always”, Link Mode of “On Data Change of Input Tag”, and Link Rate of 500ms (twice as often as expected input update).

The result is the MachineMemory.MachineMemoryDevice.On_Seconds memory-based tag increasing once per second while Machine1.Device1.MachineIsOn tag is =true/1! 
While Machine1.Device1.MachineIsOn = false/0, the value zero is added to MachineMemory.MachineMemoryDevice.On_Seconds, effectively doing nothing.