Support Forums
Log one time

I have an application to mointor run time on a pump and would like to know if i can create a tag to monitor run time in seconds and then log the cycle time when pump stops. pump on/off would be a tag from a PLC.
Sequence = Pump on - measure run time - Pump Stops - Log Time and reset Timer.
Example log should look like this.
Timestamp Cycle Time
2024-10-03 1:00PM 300
2024-10-03 1:20PM 310
2024-10-03 1:36PM 301

I have an application to mointor run time on a pump and would like to know if i can create a tag to monitor run time in seconds and then log the cycle time when pump stops. pump on/off would be a tag from a PLC. Sequence = Pump on - measure run time - Pump Stops - Log Time and reset Timer. Example log should look like this. Timestamp Cycle Time 2024-10-03 1:00PM 300 2024-10-03 1:20PM 310 2024-10-03 1:36PM 301
edited Oct 3 at 8:08 pm

There are a few ways to do this - and it probably depends on what output you want - are you running a report (CSV/Excel/PDF etc.), or do you want it to be on screen?
I'd use a counter tag that increments when the pump is running (expression using "\SecondFlasher" and the pump input will be useful), and have an expression that it logs once the pump goes off. This can then be displayed on a HDV widget setup in grid view.

There are a few ways to do this - and it probably depends on what output you want - are you running a report (CSV/Excel/PDF etc.), or do you want it to be on screen? I'd use a counter tag that increments when the pump is running (expression using "\SecondFlasher" and the pump input will be useful), and have an expression that it logs once the pump goes off. This can then be displayed on a HDV widget setup in grid view.
edited Oct 4 at 2:28 pm

Thanks for the reply, on screen and daily Excel report would be the end result.
How do we setup the write to log one time?

Thanks for the reply, on screen and daily Excel report would be the end result. How do we setup the write to log one time?
edited Oct 7 at 3:21 pm

The counter tag logs at reset, so if you select never to log, and put in an expression to reset it when the pump goes off, it will only log at that point. Have a look at the counter tag help files - they explain it better.
https://www.vtscada.com/help/Content/D_Tags/Dev_CounterTags.htm?Highlight=counter

Something like the below:

Assumes the pump is on when tag "PumpOnOff" is on.

6703f7494da24

The counter tag logs at reset, so if you select never to log, and put in an expression to reset it when the pump goes off, it will only log at that point. Have a look at the counter tag help files - they explain it better. https://www.vtscada.com/help/Content/D_Tags/Dev_CounterTags.htm?Highlight=counter Something like the below: Assumes the pump is on when tag "PumpOnOff" is on. ![6703f7494da24](serve/attachment&path=6703f7494da24)

Thank you, works great. I also have a calculation tag and a Analog IO tag and would like to log these one time when pump goes off. Can these also be setup to log one time?

Thank you, works great. I also have a calculation tag and a Analog IO tag and would like to log these one time when pump goes off. Can these also be setup to log one time?
edited Oct 7 at 6:10 pm

I'd say a multi-write tag that sends the info to a logged tag - the tag can be setup with a deadband such that it only logs when data changes - assuming it will...

https://www.vtscada.com/help/Content/D_Tags/Dev_MultiWrite.htm?Highlight=multi

I'd say a multi-write tag that sends the info to a logged tag - the tag can be setup with a deadband such that it only logs when data changes - assuming it will... https://www.vtscada.com/help/Content/D_Tags/Dev_MultiWrite.htm?Highlight=multi
67
5
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft