ScadaClient.GetSlice

Forum Home Forums Development and Integration ScadaClient.GetSlice

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #11779
    Zeus
    Participant

    Hi,
    I use ScadaClient to get slice data from influxdb

    ScadaClient.GetSlice(ArchiveBit.Minute, DateTime.UtcNow.AddMinute(-1), new int[] { 101 })

    and it returns scadadata undefined stat 0 val 0

    #11787
    Mikhail
    Moderator

    Hi,

    Every execution of the above code a client requests different data points. Probably, they don’t exists. Try specifying particular timestamp.

    #12013
    Zeus
    Participant

    Hi,
    I save data into influxdb per secend.
    How can i get cnl data an hour ago.

    #12020
    Mikhail
    Moderator

    Hi,
    Could you clarify the question?

    #12021
    Zeus
    Participant

    Hi,
    I use influxdb storage history data.
    I can use api GetTrend and GetCurrentData get data from influx.
    When i use getslice

    ScadaClient.GetSlice(ArchiveBit.Minute, DateTime.UtcNow.AddMinute(-1), new int[] { 101 })

    it returns scadadata undefined stat 0 val 0

    the influxdb has cnl 101’s data every secend.

    If i want to get cnl 101’s data at “DateTime.UtcNow.AddMinute(-1)”. how can i make it?

    #12033
    Mikhail
    Moderator

    Hi,
    To get a slice, you need to specify the exact timestamp. There is a very low chance that data exists exactly at DateTime.UtcNow.AddMinute(-1).

    To be able to get slices, you should write data with a period. And specify the exact timestamps that fits the writing period.

    #12034
    Mikhail
    Moderator

    May be we should add a method to get values closest to the specified timestamp.

    #12039
    Zeus
    Participant

    OK I will try

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.