FTStudio 8.0. Adding/Removing Historian Tags from Trend. VBA

Suseh

Member
Join Date
Apr 2015
Location
Rome
Posts
62
I am trying to simplify procedure of adding/removing FTHistorian Tags by the operator.

Oryginally, FTStudio allow operator to click on the trend chart, select pens,
choose proper pen source -> Historian Server, Add Pen(s). Then "Add Pen Configuration" window appear.
On that window we must looking for a tag in another new window from PI software "Tag Search".
The path to do this is very complicated and way too long for operator.

On another hand i am sure that i want to disable option to enter trend options. There are lot of stuff there, which operator don't want to mess up.
If i unerstood correctly the another way to add/remove Historian tag form the trend is only using VBA.

According to KB 49211 i write simple code and i am allow to connect to FTHistorian database and retrieve list of Historian Tags (Points).

The requirement for my project is to simply add/remove tags from the trend.

I'm stuck because VBA offers add option with no information to which pen number.
For instance [according to KB49311] i am able to create 10 combobox and put 10 Tags to Trends (so, 10 pens).
But how could i remove for instance only pen 5 and 8?

If my combobox will be one below another, operator can use not the one on the top, but in the middle.
The result of that will be that trend add pen with number 1.

How can i manage adding/removing pens?
 
I think about the solution and i've found one, but i don't like it.

There are 3 objects to manage (saying manage i mean adding or removing) pen.
1st object: combobox
2st object: button "add pen"
3st object: button "remove pen"

Steps:
1. Operator chooses from combobox tag name.
2. Then press on "add pen".
The pen i adding to a trend chart.
The combobox is disabling for modification.
3. If operator wants to change the pen he must press on "remove pen".
My VBA code count how many pens are on the trend,
then compare name euch of them to the name, that is selected from combobox.
When there is a match, the code know which pen was selected, so i can use
Dim Ps As Pens
Set Ps = Trend.Pens
Ps.Remove(counter_match_passed)
There is one big disadvantage of this solution.
For instance i will have 2000 tag in Historian. So, when i add all 2000 tag to my
combobox, the operator probably get lost scrolling the whole list to find what he is looking for.
How can i filter my combobox with many tags from FTHistorian in it?

If my code is needed to better understand tell me, i will upload of course.
 
Last edited:
After whole day fighting i am still at the same point.
I have no idea how to enable filtering on combobox.

The other thing is to keep combobox'es option when i change displays on my screen.
My display are with "replace" option. So, when i back to my trend option, the trend object doesn't remeber which pen was add and combobox'es doesn't remember which value (seltext) they hold. Confusing....

Anyone?
 
I am not sure you will be able to do it the way you've envisioned it @Suseh...
I remember you project's "given" and the minimum allowed budget, however, just realize that you are trying to seamlessly connect two fundamentally different systems.
FTVSE is a true Rockwell product which supports VBA development; FTHSE is, in its essence, an OSI-PI system, developed by a third party; RA put its brand on it and "enveloped" it within the FactoryTalk communication/security services.
I am aware that there are no budget increase choices, however, there actually is a dedicated and fully configurable "Front End" for the FTHSE system; yes, of course, it was also developed by a third party (Incuity); it is called FactoryTalk VantagePoint; it runs "on top" of a "locked-out" MS SQL Server database.
One FTVP Server and one "Named Client" licenses are free and included with any purchased FTHSE install package.
I'd look it up and give it a try just to realize what kind of functionality you will be able to add to the existing system (pretty much anything one could think of- please take my word for it!....:D)
It gets pretty expensive when adding clients licenses, however, you will have to decide between intended functionality and budget limits at some point in time....o_O
 
dmargineau thank you for your tip.

I find some solution to my questions.

I'm stuck with TrendObject.
When we press a pen from the legened the yaxis is change to the preset min and max value. How can i change selected pen from VBA?
 

Similar Topics

HI. This shouldn't be a complicated task. I'm not sure if i am doing something wrong or am dealing with some more of rockwell's flaws. I have 3...
Replies
0
Views
3,321
Hello all! So I have one project with a S7-1214 and a MTP1500 "Project1" and one project with another S7-1214 "Project2". Both of these PLC:s need...
Replies
6
Views
92
Hi Everyone, Currently we have three plants running with Controllogix PLCs (L72, L73, L74). In each of these plants we have 2 FTView SE...
Replies
0
Views
80
Hello, Im building project with 1756-L82ES controller and 1756-IB16S card but i cant find it when trying to add the card to IO configuration...
Replies
3
Views
151
Hello, I have a pair of redundant 1756-L71 controllers rev 24. These controllers currently have produced and consumed tag interfaces to 3 other...
Replies
2
Views
178
Back
Top Bottom