Visio Guy

Visio Guy Website & General Stuff => Data Visualization & General Graphics Topics => Topic started by: mattpell on November 24, 2014, 05:02:36 PM

Title: Using Visio with OSI PI data link
Post by: mattpell on November 24, 2014, 05:02:36 PM
Hello while I am fairly new to Visio I have been discovering some great uses for it around our plant site and was wondering if anyone had any experience using the data visualization feature to link up data from a OSI PI data server. 

I know I can set up an excel sheet to update every 5 seconds from this server.  Then in turn I can have Visio refresh the data on that spreadsheet every minute.  I was wondering if there is a way to have the data go directly into Visio skipping the excel all together.

For those of you who don't know what PI is (most wont as I had never heard of until coming to work here) here is a link to the company site.  We basically use it to create trends and have a visual look at what is happening on our plant site in terms of flows, temperature, and pressures.

http://www.osisoft.com/software-support/what-is-pi/What_Is_PI.aspx

My goal is to create Visio files that import data directly from this so I can create small job specific visual displays when we feel the need for them.  And while the excel way works I'd like to see if linking the data another way allows for a data refresh that is quicker then once a minute.

Cheers,
Matt

Title: Re: Using Visio with OSI PI data link
Post by: Visio Guy on November 25, 2014, 01:30:27 PM
Hi Matt,

Does it have to be that fast? My feeling is that five seconds would probably be a bit too fast for data > Excel > Visio. You don't have to connect to Excel, though. You can connect straight to a database as well.

The "external data" in Visio can also be rewritten by code. I haven't tried it yet, but I know there are methods for doing this. This opens the door for some sort of add-in that connects to your process data system directly, and refreshes the data in Visio.

If you're going to use code, though, maybe it makes more sense to have your own custom add-in that lets users/authors mark shapes or parts of shapes as linked to such-and-such data in some sort of "design mode". Then a run mode polls the data source every few seconds and updates just the shapes that need updating, directly in their ShapeSheets, without the indirection of the external data window.

Hope that makes sense.
Title: Re: Using Visio with OSI PI data link
Post by: aledlund on November 25, 2014, 03:04:46 PM
visio under the covers really likes XML as a datasource to feed datarecordsets. A visio add-in that can accept data (intermediate step to datatable/datarecordset) is easily accommodated to feed visio data from multiple sources. The challenge is to keep the number of objects on the page under control (less than two/three hundred) so you don't run into update timing issues. When working with larger diagrams a couple of hundred should be easily updateable in under fifteen seconds (has always been my design objective).

al

Title: Re: Using Visio with OSI PI data link
Post by: mattpell on November 25, 2014, 09:03:05 PM
hi guys thanks for the responses.  Judging by them I'm starting to think this may be way over my head for now.  In terms of speed it doesn't have to be a 5 second refresh but say every 30 just to keep the data almost realtime.

And as for shapes and objects I really cant even see it being in the tens most of the time.  I would likely just have diagrams with equipment and maybe have a max of say 25-50 shapes to link to data.  And that would be the most I could see myself using for sure.

I think for now my best option with my limited (almost zero) knowledge on data bases or XML is just to whip up a quick excel and simply have whoever is using the visio file know that both the excel and visio file must be opened with the refresh settings set to one minute for Visio and I believe our Excel add in defaults to 5 seconds.

Again thanks for taking some time to think about my scenario, when I get some downtime in the future I may look at some light reading in XML or possibly some courses locally to firm up my knowledge and make myself just a little more valuable to my company and others.

Cheers,

Matt