minute real and second counting issues

Forum Home Forums Runtime Bugs Server Bugs minute real and second counting issues

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by Mikhail Mikhail 3 weeks, 3 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4501

    bencyau
    Participant

    This is what I observed while trying to create minute Total / Average of per second input.

    First I set the Communication / Period to 00:00:01, to get OPC read per second (Matrikon simulator).

    Next I use DateTime.Now.Second to get second number as time progress.

    Next I add up all input values within the 0-59 seconds, skipping logic loops belonging to the same second. Same for the number of input count logic because I saw on my laptop it looped 8-9 times per second.

    Test: set the “minute real” to Val(input channel), and watch as the input and second values change.

    My issue: the minute real result seems to be set to the next “0”th second input value, instead of the last “59”th second value I expected.

    This seems to throw off the Chart plotting on my “per second” input as well, and created difference between the default Chart and my own result.

    Proposed solution: access to the internal “Writing minute data” total and count value may solve this for me.

    I already read old forum posts dating back to 2015 on this subject, but saw no answer.

    #4505
    Mikhail
    Mikhail
    Moderator

    The description is detailed. Could you add some images explaining the issue?

    I already read old forum posts dating back to 2015 on this subject

    Please provide the link.

    I’m sure that it’s possible to solve this issue with help of formulas of the configuration database. However, I hope to find out the cause and fix if possible.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.