|
|
Rank: Member Groups: Member
Joined: 5/24/2009 Posts: 11 Location: Wisconsin, USA
|
I am creating a display that basically contains a table of PI tags. I currently use the grid/alignment tools to keep everything lined up in rows and columns but this is tedious and does not lend itself to easily adding/deleting/moving rows around. It also seems like the grid resolution/align to grid changes between my laptop screen and much wider desktop monitor. Any thoughts or suggestions to better manage this? I tried to check out some grid controls from the control toolbox but got a message that I am not licensed to use them. This display is for many users in many locations so having to set up an ActiveX control for the individual users is not something I want to take on. I am using version 3.0.15.7 of ProcessBook. Thanks for any help you can provide.
|
|
|
|
|
OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System. We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ or contact OSIsoft vCampus for more details.
|
|
|
Rank: Advanced Member Groups: Member
Joined: 12/3/2009 Posts: 71 Location: Germany/Pennsylvania
|
Hi mauth
1) What about Excel and PIDatalink? 2) Did you tried the Microsoft grid components? 3) Are the PCs standardized and/or whats available on each machine (OS-version, other products like MS office, SAP-GUI etc)?
Michael
|
|
|
Rank: Member Groups: Member
Joined: 5/24/2009 Posts: 11 Location: Wisconsin, USA
|
Hi Michael, I have considered Excel/DataLink, but the desire is a ProcessBook display as it is 'Live' and has become the tool of choice for monitoring the process. I tried to look at the MS grid controls but am denied usage as I do not have a license for them. I am not in IT so I am limited in what 'extras' I can use. I also do not want to support ActiveX controls on others' computers. Computers here are mostly standard, though I have run into enough issues in the past when passing on Excel macros to know that everything is not standard. Office 2007 is standard on all computers, and all of my users will have ProcessBook and DataLink; we are running XP Pro. I have asked the same question to OSI but wanted to see if this group already knew of a solution. Thank you for the reply and any additional help you can provide. This is more of a side project as I am getting along with manually aligning rows and columns of tag values, but I am always interested in disovering/learning better ways to do something.
|
|
|
Rank: Advanced Member Groups: Member
Joined: 12/3/2009 Posts: 71 Location: Germany/Pennsylvania
|
It is always the same :-) or like Cambodians say "Same, same but different". You will never find identical systems.
I'm a little bit surprised that you get this license message even with the MS components. I did similar things w/o problems. But I think it is worth to investigate this issue deeper.
Another solution could be to arrange the symbols during runtime, but is definetely more time wasting.
I tried on my current system: I get strange messages, maybe one of the last update set some killbits. :-( .
Do you have a response from tech support?
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 612 Location: Cheshire, United Kingdom.
|
I am with Michael on this one, Datalink sounds as though it is better suited. In PI-Datalink v4.x you have the option to have the values updated on a timer cycle (built in to Datalink) so it appears to be more real time. What I have done many times is to have ProcessBook as the primary monitoring tool but then there are links that open Excel worksheets using Datalink. Alternatively, if you have Office Web Components you can embed a worksheet object on to the display but you would have to manage the refreshing of data in the worksheet via VBA. You could also just manipulate the Value symbols automatically by VBA to align them in tabular format (I did this in the past when replacing a legacy system with ProcessBook). I even went to the extreme of using line symbols to make the symbols look like a table (I had a small monitor, operators has great big widescreens so the ProcessBook display redrew the table during the Display_Open event). The licence problem in using MSFlexGrid means that you have some missing .ocx files that are needed to use the controls. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Advanced Member Groups: Member
Joined: 12/3/2009 Posts: 71 Location: Germany/Pennsylvania
|
Mauth, Check this article for the licensing problem http://support.microsoft.com/kb/957924/
|
|
|
Rank: Member Groups: Member
Joined: 5/24/2009 Posts: 11 Location: Wisconsin, USA
|
Michael/Reese,
Thank you for your help and suggestions. I agree that DataLink would be a better tool, but unfortunately the desire is to use PI-ProcessBook. I have considered the VBA route to align things...do you have any code you can share Reese?
I looked at the MS support link. I think the issue is that I do not have VB6 installed on my computer...oh well. Thanks again guys.
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 612 Location: Cheshire, United Kingdom.
|
Mauth...sure thing, let me see if I can find my old example (buried on an external hard drive somewhere). Otherwise I will knock you up some code (won't take long), once you set the rules the VBA takes care of everything. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 612 Location: Cheshire, United Kingdom.
|
Couldn't find my example that included the line symbols but I have just knocked up the following code. Providing you following the naming convention for the symbols, it will arrange them in a tabular format - doesn't matter the size/type of the symbols. Naming convention = "TableCell_[COLUMN]_[ROW]" e.g. "TableCell_1_1", "TableCell_3_2" etc Code: Private Const TableTop As Integer = 14750 Private Const TableLeft As Integer = -14750 Private Const SymbolPrefix As String = "TableCell_"
Sub ArrangeTableSymbols()
Dim Sym As Symbol Dim Col As Integer, Row As Integer Dim MaxCol As Integer, MaxRow As Integer
Dim RowHeight As Integer, RowLeft As Integer Dim RowTop As Integer: RowTop = TableTop
For Row = 1 To 100 RowHeight = 0 RowLeft = TableLeft Set Sym = Nothing On Error Resume Next If Symbols(SymbolPrefix & "1_" & Row) Is Nothing Then MaxRow = Row - 1 Exit For End If On Error GoTo 0 For Col = 1 To 100 On Error Resume Next Set Sym = Symbols(SymbolPrefix & Col & "_" & Row) On Error GoTo 0 If Not Sym Is Nothing Then Sym.Top = RowTop Sym.Left = RowLeft RowLeft = RowLeft + Sym.Width + 10 If Sym.Height > RowHeight Then RowHeight = Sym.Height Else If (Col - 1) > MaxCol Then MaxCol = (Col - 1) Exit For End If Set Sym = Nothing Next Col RowTop = RowTop - RowHeight - 5 Next Row
Dim MaxWidth As Integer: MaxWidth = 0 Dim ColLeft As Integer: ColLeft = TableLeft For Col = 1 To MaxCol MaxWidth = 0 For Row = 1 To MaxRow On Error Resume Next Set Sym = Symbols(SymbolPrefix & Col & "_" & Row) On Error GoTo 0 If Not Sym Is Nothing Then Sym.Left = ColLeft If Sym.Width > MaxWidth Then MaxWidth = Sym.Width End If Set Sym = Nothing Next Row ColLeft = ColLeft + MaxWidth + 10 Next Col
End Sub
Just call "ArrangeTableSymbols" when ever you want to arrange the symbols. Screenshot below to show it will arrange any symbol... Feel free to modify to suit your needs. If you want the "cell" lines adding in then give me a shout but from past experience that takes a bit longer to code. Cheers, Rhys. RJK Solutions attached the following image(s):  TabularSymbols.JPG (23kb) downloaded 7 time(s).Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Member Groups: Member
Joined: 5/24/2009 Posts: 11 Location: Wisconsin, USA
|
Rhys, First, thank you very much for taking the time to put that code together. I hope to play around with it this week. Second, sorry for mispelling your name in the earlier post.  Not sure how I was able to remember your name without the spelling somehow sticking in that thing I call a brain.
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 612 Location: Cheshire, United Kingdom.
|
Hey no problem, Rhys is the correct spelling (Welsh) and should be global (in my biased opinion) but you have those hollywood stars that spell it incorrectly as Reese Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Member Groups: Member
Joined: 5/24/2009 Posts: 11 Location: Wisconsin, USA
|
I heard back from OSI tech support and the response was...use an imbedded Excel object for this. Just wanted to close that loop since I mentioned contacting tech support earlier in the thread. Still haven't had a chance to try the code Rhys provided but I plan to soon.
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 612 Location: Cheshire, United Kingdom.
|
Thanks for closing the loop on this Rhys. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
|
Guest
|