Get Closest Raw Point
Introduction
Section titled “Introduction”Returns the closest raw point for a tag at specified timestamp(s) using a selection method.
Signature
Section titled “Signature”EIGEN.GETCLOSESTRAW(datasource, tags, timestamps, method = "POINT_BEFORE_OR_AT", showReferenceTimestamp = false, headers = false, showTag = true, tabular = false, valueOnly = false)
Parameters
Section titled “Parameters”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 includePOINT_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.
Returns
Section titled “Returns”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.
- Default format: Each row is
methodalters how the historical point is selected relative to the requested timestamp.
Examples
Section titled “Examples”=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 forDEMO_02TI301.PV, show reference timestamp.
Sample output (with headers and showReferenceTimestamp):
| Tag | Timestamp | Value | Reference Timestamp |
|---|---|---|---|
| DEMO_02TI301.PV | 2024-01-01 00:00:15 | 72.1 | 2024-01-01 00:00:00 |
Support
Section titled “Support”Have questions or issues? Reach out on our support system: https://eigen.freshdesk.com