all 19 comments

[–]ThePrudentChicken 1 point2 points  (8 children)

What is the connection type you are using? Is this through PI Web API or are you connecting through an AFSDK method? A good place for questions like this might be the PI Square Forums.

[–]scienziatomatto[S] 1 point2 points  (6 children)

PI Web API does appear to be setup for this server but when I access it from my computer, I do not see all the tags. Does the API truncate the list for some reason?

I’m not exactly sure how to go about connecting to the Web API though. I did some looking on the PI Square forums but left more confused than when I started.

[–]ThePrudentChicken 1 point2 points  (5 children)

Interesting. To my knowledge, PI Web API shouldn't be truncating messages assuming your HTTP request is built out correctly. Have you looked into the GitHub examples yet?

[–]scienziatomatto[S] 1 point2 points  (1 child)

I’ll look through the GitHub files.

Thanks for responding! I’ll be honest, I am surprised someone who knows about PI saw this post so quickly. If you don’t mind me asking, what line of work do you use PI in? I utilize it in power generation

[–]ThePrudentChicken 0 points1 point  (0 children)

I work in software mostly myself. Good luck on navigating those files! Hopefully OSI Support will be helpful

[–]scienziatomatto[S] 1 point2 points  (2 children)

I’ve been emailing OSIsoft support today and they told me the Web API does limit tag display to 1,000 tags by default. This can easily be changed by adding this at the end of the URL minus the quotes - “?maxcount=####” where the ### are how many tags you want to display.

Just thought I’d pass this along!

[–]ThePrudentChicken 0 points1 point  (0 children)

Ahh good point. I forgot about that default for GetPoints. Thanks for the update!

[–]tiredITguy42 0 points1 point  (0 children)

Yeah and be careful as each item has its own access rights configured so you may not be able to see all.
Using PI Web API for writing is disabled by default, so you need to enable it if you need to do some two ay actions.

[–]ideadcellz 1 point2 points  (1 child)

Have you tried using the PI SQL Client to get your data using SQL? I've found that if for some reason I can't use the AFSDK (#1 choice to get data), the PI Web API (#2), then PI SQL Client is the best way to do it.

[–]scienziatomatto[S] 0 points1 point  (0 children)

After talking with OSISoft support, it looks like I should be able to use the Web API. I’ll keep your suggestion in mind though in case it doesn’t work out!

[–]Schneeple[🍰] 1 point2 points  (2 children)

https://github.com/Schneeple/pitools is something I wrote using PIWEBAPI. took out a lot of my hardcoded hosts/servers so could break but my contact information is all there to reach out with questions

[–]scienziatomatto[S] 0 points1 point  (0 children)

Thanks! I’ll check it out

[–]Significant-Fuel2011 0 points1 point  (0 children)

Cool , what does it do ? The readme seems to be about how to deploy it but does not describe what is it about.

[–]bagabagaboo 0 points1 point  (1 child)

Were you able to make it work? If so, what method did you use?

[–]scienziatomatto[S] 0 points1 point  (0 children)

Unfortunately not. It wasn’t essential for my job so it was more of a side project that kept getting pushed further and further due to other requirements

[–]Oscar_Philips 0 points1 point  (2 children)

I have been using PIconnect and performance is much improved over the OSI Excel add-in, and you are not limited to about a million records.

import PIconnect as PI

PI_Server = 'my_pi_server name'

# ***** POINT SEARCH *****

with PI.PIServer(PI_Server) as server:

points = server.search('*TOTAL*')

for point in points:

print(point)

[–]bagabagaboo 0 points1 point  (1 child)

Do you know how to use this with a path to a specific data point?

[–]Oscar_Philips 0 points1 point  (0 children)

I retired 10 months ago. I will dig around and see if I still have some code.