Support Forums
Report Tag - Duration Parameter Variable Problems

Hi folks, having problems with the reporting tag, and the time duration for this. I would like the duration to match a calculation tag. I am using the tag as a reference in the parameter for the Report Duration as shown in the screenshot below.

However, it does not act as I would expect… and I have had to create multiple report tags to get around it in the short term… however this is messy and not desirable.

Problem 1: The report tag “calculates” its own “Report End Time” even when I try to set this to 0 or 1. I have not created a parameter. I have tried to input 0 or 1 however it then deletes the parameter in the Report Duration…

Problem 2: A error sometimes pops up saying value must be between 1-32767, despite the reference tag being within this range. This seems to be sporadic and depends upon the order in which I input information in the “period” tab…

The referenced tag “ReportTime” is calculated to give a value rounded up to the nearest 100, always between the values of 1-32767:

ReportTime = Max( 1 , Min((Int([Tag1]/100)*100),32700) )

“Tag1“ is a counter that is linked to the \secondflasher so that it increments approx every second when active. Max expected time is likely 5 hours.
636c3a996998e

Hi folks, having problems with the reporting tag, and the time duration for this. I would like the duration to match a calculation tag. I am using the tag as a reference in the parameter for the Report Duration as shown in the screenshot below. However, it does not act as I would expect… and I have had to create multiple report tags to get around it in the short term… however this is messy and not desirable. Problem 1: The report tag “calculates” its own “Report End Time” even when I try to set this to 0 or 1. I have not created a parameter. I have tried to input 0 or 1 however it then deletes the parameter in the Report Duration… Problem 2: A error sometimes pops up saying value must be between 1-32767, despite the reference tag being within this range. This seems to be sporadic and depends upon the order in which I input information in the “period” tab… The referenced tag “ReportTime” is calculated to give a value rounded up to the nearest 100, always between the values of 1-32767: ```` ReportTime = Max( 1 , Min((Int([Tag1]/100)*100),32700) ) ```` “Tag1“ is a counter that is linked to the \secondflasher so that it increments approx every second when active. Max expected time is likely 5 hours. ![636c3a996998e](serve/attachment&path=636c3a996998e)

Fair point. I tried this and see some unexpected behaviour in how the tag calculates the report end time when an expression is used for the duration. I'm going to write this up to have the development folks have a look at it.

Your error may occur if your tag ever gets an invalid value. I'd suggest wrapping [Tag1] in a PickValid() with a default value if the tag is invalid.

As for your calculation, you may want to use Limit () rather than Max () and Min (). Also, you may wish to update your calculation to only update if the trigger condition is true, then delay your report trigger to give the calculation time to execute. That will prevent the refresh method on the tag from running each time the counter increments.

Fair point. I tried this and see some unexpected behaviour in how the tag calculates the report end time when an expression is used for the duration. I'm going to write this up to have the development folks have a look at it. Your error may occur if your tag ever gets an invalid value. I'd suggest wrapping [Tag1] in a PickValid() with a default value if the tag is invalid. As for your calculation, you may want to use Limit () rather than Max () and Min (). Also, you may wish to update your calculation to only update if the trigger condition is true, then delay your report trigger to give the calculation time to execute. That will prevent the refresh method on the tag from running each time the counter increments.

Trihedral Engineering Ltd.

Thanks for reaching out to us regarding this. The issue has been corrected and will work as expected in a soon to be released version of VTScada.

Thanks for reaching out to us regarding this. The issue has been corrected and will work as expected in a soon to be released version of VTScada.

Trihedral Engineering Ltd.

47
3
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