Replacing the SDK in getting AFValue "Run"

I am trying to replace the following SDK call:

PIPoint piPoint = PIPoint.FindPIPoint(piServer, sPITag);
AFTime piTime = new AFTime(dtReadAt);
AFValue CurrentValue = piPoint.RecordedValue(piTime, AFRetrievalMode.Auto);
string status =  CurrentValue.Value.ToString()

Debugger data:
AFValue: Value ="Run" UOM=null Timestamp={6/17/2021 4:12:08 PM} IsGood=true

I've looked at

https://myserver.com/piwebapi/streams/F1RPllGmj5v01Uw3Pk-h_hTekQdQoBQEEDAxNjhcUEFMX8dJTjQeVU6gEC5XSU5ELxhNfw/recorded

which gives me

{
  "Links": {},
  "Items": [
    {
      "Timestamp": "2024-01-24T16:41:24Z",
      "Value": 87.68,
      "UnitsAbbreviation": "",
      "Good": true,
      "Questionable": false,
      "Substituted": false,
      "Annotated": false
    }
  ],
  "UnitsAbbreviation": ""
}

The value returned by the SDK is "Run".

 

-Markus

 

Parents
  • I think I found it. I'll have to see what I was doing wrong:

     

    https://myserver.com/piwebapi/streams/verylongurl/recordedattime?time=*

    {
      "Timestamp": "2023-01-07T01:06:39.3540039Z",
      "Value": {
        "Name": "Run",
        "Value": 3,
        "IsSystem": false
      },
      "UnitsAbbreviation": "",
      "Good": true,
      "Questionable": false,
      "Substituted": false,
      "Annotated": false
    }

     

Reply
  • I think I found it. I'll have to see what I was doing wrong:

     

    https://myserver.com/piwebapi/streams/verylongurl/recordedattime?time=*

    {
      "Timestamp": "2023-01-07T01:06:39.3540039Z",
      "Value": {
        "Name": "Run",
        "Value": 3,
        "IsSystem": false
      },
      "UnitsAbbreviation": "",
      "Good": true,
      "Questionable": false,
      "Substituted": false,
      "Annotated": false
    }

     

Children
No Data