Now I am going to go ahead and modify this just to show
you how the round trip works. This Tag,
this Tag I just created and it's now called Naptha End Percent Control
in the Descriptor, I am just going to call this,
you know, something that would be very obvious that I have made
in Edit. And the way I am going to make --
go ahead and, and modify this -- first of all, I am going to
deselect these three Tags here
by simply taking those X's out. And we
also have a mechanism to do that automatically. If you go into
this Add-Ins, PI SMT,
you will notice one of the options here is to Select or Deselect
all of those Tags. Anyway, I will go ahead and
deselect all those, and
now I will go ahead and select this one that I want to edit. So it's
always a good idea to just select the ones that you are interested in
editing. So that's the one I am going to edit. And now, I
simply need to export this back to the PI Server. I will go ahead and choose
Export Tags. This give us
some choices here. We can specify what the Point
Class is if there are, you know, other Point
Classes you are working with. You do have to make sure you specify this properly,
both when you import and when you export.
Now, this gives us the option here to Create
or Edit. In this case I am going to be editing. You will notice
Delete did not show up there. That's that
option that I disabled by change, changing the settings
to disallow that. Anyway, so there's Create or Edit. If
I were to choose Create then this would give me an error
because that Tag already exists.
If I were to choose Edit, this would work just fine.
Let me demonstrate what happens if I try to create it.
As you can see, it says Failed to create, Tag already exists. Right?
Now, it's that error
message that, that you just saw.
It's that error message that we created this for:
Create or Edit. Sometimes you are in the middle of editing
dozens, hundreds of Tags and, darn it, you have
just forgotten which ones are brand new and which ones are Tags that you are
editing. So we have this option here called Create or Edit
that handles that situation. It's either going to create the Tag
if it does not exist, or simply edit the Tag if it does.
I, I would stay away from that if you are purely
doing editing. I mean if you, if you genuinely think that you are editing
existing Tags, but you accidently
misspelled the name of a Tag, if you are doing this then you wind up creating a
Tag by mistake. So, I, I would always stick, when you can, to
either one or the other. But, we do have this in case you are
in the middle of doing, you know, a little of both. I will go ahead and
choose Edit, Export. We get a
message that says this happened successfully. And, if we go back
and we take a look at this Tag, as you can see its
Descriptor has been changed for me. Now,
it's required when using SMT that this, this
reserved word, Tag, always appears in
Column B in Cell 1, so this always
Cell B1. That's a requirement.
Other than that, you simply have to put in Row 1
all of the attributes that you are interested in retrieving. Now,
we just did this initially by doing
kind of the sledgehammer approach. We brought in every single attribute.
Let me show you how we could have done this a little more
selectively. I could just type in Tag,
Span, some attributes like this, and then done a
retrieval based on,
based on some Tag names that I have specified right here.
So, if I say, well, we are looking at Sinusoid
and CDT158 and ACDM158,
the one I just created. Let me add a couple
more, Point Type,
etc. What I,
what I have done by doing this is simply prep this for
doing an import. So, if I choose Import now,
as we saw that option before -- do we want to
retrieve the Tag and attributes on the spreadsheet, or all the attributes
that meet a certain mask? Well, we just demonstrated that.
That showed you the sledgehammer approach. Here we are going to be more
selective, so if I do that --
opp, I forgot and I am -- you know, I, I, that
was embarrassing but I, it is actually
the single most-common mistake that we see in our class.
I forgot to select any Tags. But, thankfully, our developers
have seen this enough -- we have gotten enough feedback saying
this is a big mistake that happens a lot -- so, we are saying, hey,
dummy, you forgot to select any Tags. Do you want to import everything?
Yes, I do. And, as you can see, it went ahead and did that.
Yeah, I wish I could say I did that intentionally. But,
that, that went out, grabbed these Tags, these attributes.
Any other thing that I would like to see. I would like to look at the exception
deviation, the compression deviation. You know, all of these
things I can do just by typing in
those names. There we go.
Now, it's going to get really tiresome trying to
remember the names of all these attributes. So, thankfully, we do have a mechanism
for that. If you go into PI SMT, one of the options here
is Tag Attributes, so, you can simply choose
what you want to see. Let's see, let's take a look at
the Descriptor, and I will look at the Points
Source, and I will look at Location
Code 2, 4 and 5.
Now this is going to bring these in starting
with whatever column you currently selected. So, it's Column H.
This is going to 'em in and it's going to put them, not in the order you
selected them in, but it's going to put them in alphabetical order.
Just sometimes a disappointment to people. They would prefer to have
it in a certain order, but it's always going to drop that in there in alphabetical order.
So, now that we have brought those in, now we can do another
import. I will go ahead and import this.
And now I have got yet more attributes I have to
look at. Now, if
that really annoyed you -- the fact that this came in not
in the order that you picked them in -- that's no problem. Just go ahead and
copy this. Just store this somewhere. Move these where
you wanted them. I will go ahead and copy this over here. Paste it right
there. I will grab these. You know, you are working in Excel.
All the things that you typically do in Excel you can do here. Now
that I put them in their new location, just go ahead and import again
and we will just go ahead and find what those attributes are and we will bring
it in. We will even change the column width for you.
Yeah, so as you can see, the only real restriction is
Tag has to be in Column B. Everything else can be in whatever order
you prefer. Now, finally, we always
recommend that you do not keep any empty
Tag attributes sitting up here. And by empty, I mean
where you are not actively configuring them. Let me give you an example. Let's
say you have got a Tag attribute here called, well, Display Digits. Remember
that one? That's how we specify how many significant
digits or dets...decimal places we display in ProcessBook.
But, let's say that you have gone to the, all the
trouble of setting these up individually. I want
thr...one decimal place here, two decimal places here, zero
decimal places here, and, and I have done this very diligently.
I exported this, modified this. If we,
if we were to bring this back in, if I import this again -- let me
just delete all this to show you that it's actually doing something.
If I Import, leaving the Tag names --
as you can see, that Edit that I just did, that Edit
is working. Well, let's say you come in
the next day and you accidentally, even though you are not
busy editing these -- you accidentally put that Display Digits up at the
top there. Watch what happens the next time I
Export. "Cause this is empty, if I Export
it's going to take all that good configuration you did and
it's going to override it with zeros. So, I will go ahead and Export this.
If I were to Import this back in,
as you can see, these values now are coming back
as zero. And, and that's the problem. So, for
that reason we always suggest if you are not
actively editing things -- you know, once you have got this the way
you want -- I got it at one digits, two digits and zero
digits -- once you have got that that way -- let me go ahead and
Export that, -- then, if you are not --
you know, if it's the next day and you are working with
this, these Tags, do not keep that Display Digits up
there if you are not interested in making edits to that.
It's, you know, the, the possibility that you accidentally delete
those or accidentally change them and then propagate that into
the database is something that, you know, it's the
kind of problem that can end up taking a while to figure out
what happened. So, watch out for that. Now, lastly,
we have these fields called excdev and compdev.
That stands for the exception deviation and the compression deviation --
has to do with how we store data on the
Archive. And we also have something called
excdevpercent and compdevpercent. Let me show you what those look
like. I will go out and grab them from here. Now,
the excdevpercent and compdevpercent
are modifying the same attribute but
they are doing it using percent of range
instead of a straight engineering units. Now,
because these two attributes
here are essentially two different ways of
modifying the same, the same attribute, the
Deviation Span -- this in Engineering Units,
these two; and this in percent of range,
then, well, they are mutually exclusive.
If you have both of them up on the screen
at the same time and you edit one of them,
and then you export, well, one of them is going to have
to take precedence. Now, we have chosen excdevpercent.
So, if you have both of them on the screen, you know, this
in engineering units and percent, the percent will
supersede. So, let me just give you a scenario
or show you a scenario where you can lose a lot of work pretty
quickly. I will go ahead and Import this so that you can see what the
excdevpercent and compdevpercent are.
I will scroll over here. As you can see,
these are both at two percent and one
percent for excdevpercent and compdevpercent.
Right? Well, let's say you have sat down with your
engineering team, all you engineers. You have figured out what the very best
deviations are for
storing, you know, for deciding how much data you are going to store and what data
you are going to consider line-noise. And, you have determined,
one by one, you have said okay, this is Point 2 and I am going to
make this Point 4 -- you have gone through and you have made all these
adjustments -- this is Point 5, this is one,
etc., this is Point 66,
6. Anyway, so you have gone to all the trouble to do this
and then you export this, but
you have not removed these from the spreadsheet. Well,
as I said, this and this, the excdev
and excdevpercent -- sorry, they are not really
lined up there right -- excdev and excdevpercent are both
modifying the same attribute. compdev and
compdevpercent are both modifying the same attribute. If I
were to export this with everything on there,
the excdevpercent and compdevpercent
will take precedence and so, when we export this,
it made the edit. When I
import this back in, as you can
see, we have lost all that good work we were
doing over here. And that's because we had this
sitting here on there at the same time. So, the
better technique is, if you are going to be making modifications
to this -- you know, you have sat down, you have come up with some good numbers --
let's do this, again.
[typing]
If you need to edit these two fields, always make
sure you remove these from the spreadsheet. I will just go ahead and
click on Delete. Now I will Export.
Export
those Tags. Now, actually, I can put these back,
these excdev and excdevpercent,
and if we bring them back in, you will see that this, this
time it actually did take. So, if I go into Tag Attributes
I will bring these back in. This is compdevpercent and excdevpercent.
Yeah, if I Import this...
Okay, so as you can see, this time it worked. We did not have that
problem we saw before. So, be careful
when you are editing these. If you are editing either of these, just
keep the one that you are editing on the spreadsheet, and
delete the other one. Now, lastly, if you do
need to change the name of a Tag, you can actually do this from
here. Let me go ahead and get rid of all this. Let's say I do need to change
the name of this tag. If I wanted to change it, I
would simply use the new Tag attribute.
So, put the old Tag name; put the new Tag
name. I will call this mysinusoid.
I go ahead and export this.
That's essentially going to rename that Tag, so
here's before and after. This is what the Tag looks like now.
I will go ahead and export this.
And now, if we take a look at this --
let's see, can I refresh this? Yeah. As you can see
it's got a new name, mysinusoid. Now remember,
when you do rename a Tag, there are a number of things
that are going to break. You are going to break ACE calculations, you are going to break
Performance Equations and DataLink Spreadsheets because those all refer to
these by their Tag names, not by their Internal ID's.
ProcessBook should be okay because ProcessBook refers to this
by its Internal ID instead.