AnsweredAssumed Answered

How to avoid that a ACE project repeat data?

Question asked by esancha on Jul 14, 2015
Latest reply on Aug 6, 2015 by esancha

Hello!

 

Sorry my poor english an advance.

 

I have an ACE (VB Net) process that is triggered every time a tag receives a value, this process has worked perfectly for years until the input tag has changed its way of capturing data, now it receives by an RDBMS interface and thus receives the same value several times, that makes the ACE process is triggered so often and write to the output tag several times.

How I can prevent that occurs?, Maybe you are writing in the snapshot?

 

Any help will be welcome.

 

Thanks a lot.

 

The results are:

    

14-jul-15 03:15:181,67851806
14-jul-15 03:15:181,67851806
14-jul-15 03:15:181,67851806
14-jul-15 03:15:181,67851806
14-jul-15 03:15:181,67851806
14-jul-15 03:15:181,67851806
14-jul-15 03:15:181,67851806
14-jul-15 03:15:181,67851806
14-jul-15 03:15:181,67851806
14-jul-15 03:15:181,67851806

and my code is

 

 

Overrides Sub ACECalculations()

 

Dim datEvento As New PITimeServer.PITime, _

 

As Single, _

 

As String = vbNullString, _

 

As String = vbNullString, _

 

As Object



' recorro la pila de tags ejecutando el procedimiento


Try


For Each Tag In PilaTags

 

'Registra("Cu EHF   | " & (Tag.GetAttribute("Tag").ToString & ": " & Tag.Desc().ToString))


If Tag.IsGood And Tag.IsTrigger Then


"Tag").ToString

 

End If


Next



' guardo el valor en el tag refundido


Catch ex As Exception

 

"Cu EHF   | Se ha producido un Error " & ex.Message)

 

Finally



' formateo la descripcin con 26 caractres para mantener el encolumnado


' formateo el tag con 12 caractres para mantener el encolumnado


If Not datEvento.UTCSeconds = 0 Then


"Cu EHF   | " & strTag & " | " & strDescripcion & " | " & Format(datEvento.LocalDate, "dd/MMM/yy hh:mm:ss").ToString & " | " & Format(sngValor, "0.00").ToString)

 

Else


"Cu EHF   | " & strTag & " | " & strDescripcion & " | " & Format(datEvento.LocalDate, "dd/MMM/yy hh:mm:ss").ToString & " | " & Format(sngValor, "0.00").ToString)

 

End If


End Try


End Sub

 

Outcomes