From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

how is tag history stored/displayed?

Solved!
Go to solution

Hi Joshua,

 

Is there a way we can access an API to get a decimated result over a period of time?

 

It only gives me a 1000 samples from start timestamp, anyhow it doesn't behave as I expect. It is probably not described yet for a reason ;( , unfortunately I do need this functionality.

 

With the API call you posted I can't retrieve the 24-hour window I would like (too much data, 1Hz).

Regards,
André (CLA, CLED)
0 Kudos
Message 11 of 22
(2,053 Views)

Hey Andre,

 

You can use the same API call that I mentioned earlier but you'll want to add one additional optional argument. 

 

"decimation": "<# of values>"

I've also attached a modified version of the VI that I provided earlier modified to get decimated values. Again, you'll need to make sure that you replace all the appropriate strings like the server URL, username, password, and request body.

-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

Message 12 of 22
(2,027 Views)

This works like a charm, thanks.

 

When will this be described as part of the public APIs?

Regards,
André (CLA, CLED)
0 Kudos
Message 13 of 22
(2,024 Views)

Hi NI folks, thanks for all your work on this.  I'm starting to use tags & messages on a "real" customer project and it looks like the SystemLink Cloud server has been upgraded to v2 API?  When trying to retrieve tag history I get the following error:  

 

NI Skyline Utilities.lvlib:Parse HTTP Error.vi:5080001<ERR>
The web server responded with error 410 Gone.

<b>Response body:</b>
The v1-routes are not available anymore. Please upgrade your client to use the /nitaghistorian/v2/ routes.

<b>Complete call chain:</b>
NI Skyline Utilities.lvlib:Parse HTTP Error.vi:5080001
NI Skyline Utilities.lvlib:Execute HTTP Verb.vi:7500001
NI Skyline Tag HTTP Library.lvlib:Multi Read History Core.vi:6880001
NI Skyline Tag HTTP Library.lvlib:Multi Read History.vi:780001
NI Skyline Tag HTTP Library.lvlib:Read Tag History Core.vi:4960001
NI Skyline Tag HTTP.lvclass:Read Tag History Core.vi:4960001
NI Skyline Tag.lvclass:Read Tag History (DBL).vi:3140001
read tag history.vi
 
Thanks,
Marvin - CLD
0 Kudos
Message 14 of 22
(1,776 Views)

SystemLink Cloud documentation can be viewed at https://api.systemlinkcloud.com. Both v2 and v1 can be seen there by selecting the appropriate service from the dropdown. The v2 version is the one labeled "Tag Historian Service (SystemLink Cloud)"

-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

0 Kudos
Message 15 of 22
(1,768 Views)

Thanks Brandon.  Any idea when the LabVIEW client will be updated to v2? I tried updating it myself but there is still an error. 

0 Kudos
Message 16 of 22
(1,765 Views)

I believe it's updated in the newest version of the SystemLink API which released with SystemLink 19.0. What version do you have installed? If you're looking in NI Package Manager for it, it should be the package named "NI SystemLink Tag Support for LabVIEW 201X". To find that package, look in the 'Installed' tab with the 'Products only' checkbox unchecked. 

-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

0 Kudos
Message 17 of 22
(1,749 Views)

Thanks for your followup, Brandon. 

I have SystemLink Tag Support for LabVIEW 2019 (32-bit).  Version number is 19.0.0.49152-0+f0. 

There is still (at least) one VI in this package that references the v1 API.  

 

C:\Program Files (x86)\National Instruments\LabVIEW 2019\vi.lib\Skyline\Tag\HTTP\Form URL Query History.vi 

See also attached screenshot.  Interestingly, the NXG version is the same in this regard. 

0 Kudos
Message 18 of 22
(1,744 Views)

I don't think that VI is used anywhere by the Skyline Tag API. I opened up all of the Tag API VIs in a project and then opened that VI up and there weren't any callers of that VI. 

 

Are you running into errors that seem to indicate that it's still using v1 of the API?

-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

0 Kudos
Message 19 of 22
(1,730 Views)

Hi Brandon, did you check the History sub-palette?  I'm seeing this error with Read Tag History.vi.  Please see my first message in this thread for the complete call chain. 

0 Kudos
Message 20 of 22
(1,721 Views)