AnsweredAssumed Answered

How to check input tag value every minutes?

Question asked by Mayur_Thole on Feb 12, 2015
Latest reply on Feb 12, 2015 by pthivierge

Given input tag I want to find out for every minute whether the value of input tag is zero from yesterday night 12 AM  to 12 AM of today. If that value is zero then increment the counter. I produced this code but I don't know its correct or not.

 

Public Overrides Sub ACECalculations()
        Dim i As Integer
        Dim sCurrentDate As String, sTomorrow As String
        Dim CDM As Integer
        sCurrentDate = Concat(PIMonth(MyBase.ExeTime), "-", PIDay(MyBase.ExeTime), "-", PIYear(MyBase.ExeTime), " ")
        sTomorrow = Concat(PIMonth(MyBase.ExeTime - 86400), "-", PIDay(MyBase.ExeTime - 86400), "-", PIYear(MyBase.ExeTime - 86400), " ")
        i = 0
        For CDM = 0 To CDM <= 1440 Step 1
            If AvaiFac_InputTag.Value(CDM).Equals(0) Then
                i = i + 1
            End If
        Next CDM
        i = i
    End Sub

Outcomes