Skip to content

Get Closest Raw Point

Returns the closest raw point for a tag at specified timestamp(s) using a selection method.

  • EIGEN.GETCLOSESTRAW(datasource, tags, timestamps, method = "POINT_BEFORE_OR_AT", showReferenceTimestamp = false, headers = false, showTag = true, tabular = false, valueOnly = false)
  • datasource (string): Historian name. If omitted, reads default from settings.
  • tags (string[][]): One or more tag names.
  • timestamps (string[][]): List of reference timestamps.
  • method (string): Selection method. Options include POINT_BEFORE_OR_AT (default), BEFORE, AFTER, AFTER_OR_AT, ADJACENT_POINTS.
  • showReferenceTimestamp (boolean): Show the requested reference timestamp in results. Default: false.
  • headers, showTag, tabular, valueOnly: see Advanced Options.
  • string[][] — Array of rows containing the closest raw point(s) matching the selection method.
    • Default format: Each row is [Tag, Timestamp, Value] (the matched point’s actual timestamp, not the requested one).
    • With headers=true: Header row precedes data.
    • With showReferenceTimestamp=true: Includes an additional column for the requested reference timestamp.
    • With showTag=false: Omits the tag column.
  • method alters how the historical point is selected relative to the requested timestamp.
  • =EIGEN.GETCLOSESTRAW("Demo-influxdb", "DEMO_02TI301.PV", "01/01/2024 00:00:00", "POINT_BEFORE_OR_AT", true) — closest raw point before or at the timestamp for DEMO_02TI301.PV, show reference timestamp.

Sample output (with headers and showReferenceTimestamp):

TagTimestampValueReference Timestamp
DEMO_02TI301.PV2024-01-01 00:00:1572.12024-01-01 00:00:00

Have questions or issues? Reach out on our support system: https://eigen.freshdesk.com