News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Using Visio with OSI PI data link

Started by mattpell, November 24, 2014, 05:02:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mattpell

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


Visio Guy

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.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

aledlund

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


mattpell

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

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 197 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1101KB.
Tokens: post-login.
Cache hits: 13: 0.00142s for 26,733 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]