Menu Tools --> References
Function LeTimeStamp(NomeDoTag As String) As String
Dim tag As PIPoint
Dim srv As Server
Dim timestamp As Variant
Set srv = Servers("TADCIPI01")
Set tag = srv.PIPoints(NomeDoTag)
timestamp = tag.Data.Snapshot.timestamp.LocalDate
LeTimeStamp = timestamp
End Function
Dim tag As PIPoint
Dim srv As Server
Dim timestamp As Variant
Set srv = Servers("TADCIPI01")
Set tag = srv.PIPoints(NomeDoTag)
timestamp = tag.Data.Snapshot.timestamp.LocalDate
LeTimeStamp = timestamp
End Function
Nenhum comentário:
Postar um comentário