ArchiveValue

ArchiveValue: "ArchiveValue" nesnesi, "ArchiveFilterVariable" nesnesi için değer parametrelerini içerir.

"ArchiveValue" nesnesi, "ArchiveFilterVariable" nesnesi için değer parametrelerini içerir.

OrtamKullanılabilirlik
Engineering StudioKullanılmaz
Service EngineKullanılabilir
VBAKullanılabilir
VSTAKullanılabilir
C#

                  //This method will output information of the passed ArchiveFilterVariable object
public void ArchiveValue(IArchiveFilterVariable zenonArvFilterVariable)
{
    IArchiveValue zenonArvValue = zenonArvFilterVariable.
        ArchiveValues().Item(0);
    if (zenonArvValue == null)
    {
        //No value available
    }
    else
    {
        //Output some information of the value
        this.Parent.Parent.DebugPrint("Date / Time: " +
            TimeConversion.ZenOnToSystem((uint)zenonArvValue.Time).ToString(), 
             tpDebugPrintStyle.tpMsg);
        this.Parent.Parent.DebugPrint("Recorded Value: " + zenonArvValue.Value,
            tpDebugPrintStyle.tpMsg);
        this.Parent.Parent.DebugPrint("State: &H" + zenonArvValue.Status.ToString("X"),
            tpDebugPrintStyle.tpMsg);
    }
}
VB.NET

                  'This method will output information of the passed ArchiveFilterVariable object
Public Sub ArchiveValue(zenonArvFilterVariable As IArchiveFilterVariable)
    Dim zenonArvValue As IArchiveValue = zenonArvFilterVariable.ArchiveValues().Item(0)
            'No value available
    If zenonArvValue Is Nothing Then
    Else
        'Output some information of the value
        Me.Parent.Parent.DebugPrint("Date / Time: " & TimeConversion.ZenOnToSystem(CUInt(zenonArvValue.Time)).ToString(), tpDebugPrintStyle.tpMsg)
        Me.Parent.Parent.DebugPrint("Recorded Value: " + zenonArvValue.Value, tpDebugPrintStyle.tpMsg)
        Me.Parent.Parent.DebugPrint("State: &H" & zenonArvValue.Status.ToString("X"), tpDebugPrintStyle.tpMsg)
    End If
End Sub
VBA

                  Sub zenOn_ArchiveValue(ByRef zArvFilterVar As ArchiveFilterVariable)
'Declarations
Dim zArvValue As ArchiveValue
Dim zTimeConvert As clsTimeConvert
'Initialize zArvValue with the first available value within the current archive variable
Set zArvValue = zArvFilterVar.ArchiveValues.Item(0)
'Initialize zTimeConvert by creating a new instance of the zenOn 

"clsTimeConvert" macro
Set zTimeConvert = New clsTimeConvert
'If no value is available ...
If zArvValue Is Nothing Then

'... then inform the user

MsgBox ("No value available!")

'Otherwise:
Else

'Output the date and time when the value was recorded

Debug.Print "Date / Time: " & 
Format(zTimeConvert.zenOn2System(CDbl(zArvValue.Time)), "yyyy-mm-dd hh:mm:ss") & "." & zArvValue.TimeMilliSec

'Output the recorded value

Debug.Print "Recorded value: " & zArvValue.Value

'Output the state of the value

Debug.Print "State: &H" & Hex(zArvValue.Status)
End If

End Sub

Bu bölümdeki konular

Bu sayfa, COPA-DATA zenon 16 çevrimiçi yardımının Türkçe çevirisidir. Menü ve ayar adları, programdaki gibi bulmanız için İngilizce bırakılmıştır.