In this video, we're gonna show how to connect the
PI UFL interface to the PI server.
I've loaded my PI UFL interface. I've even
built a whole configuration file using UFL
Designer that tells the interface how to read this
text file right here. And in this
text file, there's a PI tag
name. There's a time stamp. And there's a value.
And the idea is that the PI UFL interface will
read all this data and send it to PI and write it to the PI
archive. And, if this tag here
doesn't exist on the PI server, I want it to create that tag.
In this video, we're gonna show how to set up the security
so that the PI UFL interface is able to do that with the PI
server.
To begin with, I'm going to go to my PI server.
I have a remote connection here to my PI
server. And I'm gonna open up System
Management Tools. PI System Management Tools.
I'll go to
security. And to start with,
in database security, you can see all the different types of security
access we can give users or interfaces or
entities. And there's a lot of this that isn't
necessary. For example, for an interface, we don't
necessarily want to give an interface permission to create and delete
archives. Or permission to the
audit database. Or this one, permission to
some of the security settings. We don't necessarily want the
interfaces to have all that much access. We want them to have just
enough access 'cause that's what's responsible.
Next, go to identities, users and groups.
Let's create a new
identity for our interface. This is kind of the
badge that will be given to the interface upon loggin in
and it will grant the interface all the rights it needs.
So, right click new identity. We'll say,
PI Interfaces
and the description will be
an identity for
to write data and
create tags. So, I want
this, any interfaces with this identity to be able
to actually create new PI tags.
There we go.
Now, the next step is we want to
actually assign this PI interface's identity
some permissions. 'Cause right now, it doesn't have any. If you go back to data
base security, notice PI Interface is not on this list at all.
It has no permissions.
So, what's appropriate is we need to add it to a few of these
databases. Start by double clicking on PI
DS. This is the digital states table.
If we have a tag that has a digital
state like on-off or red-yellow-green,
this allows PI Interfaces to use that
table. Next, we want to
do the
message log.
And the PI point
database. This allows the interface
to write to PI points.
And then lastly,
we want to add access to modules. So, the module
database.
We get this error. What it's saying
is to add this identity to the database
security for PI modules, it requires that
that identity have at least one mapped Windows
user. What we can do is we need to go
back to our identities, users and
groups and map a Windows user to this PI
interface's identity. This allows it to
sync with the AF server. So, we want
to have whichever user we add here to have access
to sync with the AF server.
I'm just going to add
the local administrator. So, from
pipes,
administrator -
need to search for it here.
There it is. Pipes the administrator.
Say okay, okay.
And now, when I go into database security,
I can add
PI interfaces and I'll be allowed to.
Now you can see, PI interfaces
is given 4 different database
securities. There, there and there. ...
The next step is - okay,
now that we've created this new identity, this has all the
permissions we need for UFl to be able to do what it needs to
do. But when UFL connects, we need to know some way
of knowing that UFL is connecting and to give it
this PI identity. To give it this set of
credentials as badged with those permissions. To do that,
we need to click on mappings and trusts. Now, we'll
[inaudible] a trust to
take any incoming connection from PI UFL
and give it PI interfaces, the identity.
So, once we're in trust, we're gonna create a number of different trusts because
PI UFL could connect in a number of different ways.
The first new trust we're gonna create - and you
can get into this by either right clicking new trust or go into
advanced - we're gonna say this is for PI
UFL and it's for
PI UE and then
IP address.
Is the name. Now, PI UFL can come
have 2 different names when it's incoming. One is
PI UE and one is PI UFL.exe and we'll talk
more about that in a minute. But this is for
PI UFL
interface
- this is specifically for the API
connection with an IP address.
And the IP address
that of my machine is
10-32-128-
84. And
you can fill out the rest of these with 255 - 255.
Application name, that's where we
put PI _UE and
PI identity, you guessed it. We're just going to put PI
Interfaces, just like that.
Now, we have our trust.
Now, we need to create a few other trusts because PI UFL
might connect in different ways. To do that the easy
way, just copy it and you'll get a whole
other configuration pane, already filled out.
And we're gonna start by, let's see, we want to keep the IP
address and this time, we're gonna change it to
PI UFL.exe.
And this one is actually
the SDK trust.
You're gonna change this down here to
PI UFL
and again, we're gonna copy this trust
again and this time,
we're gonna do, instead of IP address, we're gonna say
network name.
Because PI UFL might get identified based on the
name of the machine that's incoming. So - network
name. We come down here and
this time, we're gonna clear out the IP
address 'cause we're not actually filtering based
on that. We're gonna type in the network name.
And my network name is SCollins
6430.OSI
soft.int. And this application
name can stay the same in the PI then it can stay the same.
There we go. We've got a network name.
And again, we can copy that. And this time, it's going to be
PI UFL.exe.
STK.
And we're gonna
change the application name here to
PI UFL.exe.
And we have our 4 trusts. Look at that! Okay.
So, we have 4 trusts. These are each just filtering
different types of connections. We find that
different PI systems
and different domains and different network settings will have connections come
in in different ways. So you want to build all these trusts so that
you're sure that it's going to connect while still staying secure.
So, you have the application
name right here. And then we either have an IP
address or we have a
network path name. So each of these trusts
has 2 specifications.
One -two. That's called a 2 plus trust.
In Pi system-speak.
Now, we have all of our trusts enabled.
And we can get ready to go.
So now, I'm gonna actually switch
to my
interface and I'll
press play.
Actually, no. First, I'm gonna show 2
logs. You can click those 2 buttons right up top and you'll be able
to see what's happening with the PI UFL interface as it
connects.
...For educational purposes,
I'm gonna start with, what if I didn't actually connect
any of these? So, if I were to disable
all of these trusts,
and try to connect, what would happen? Just because this might be happening to
you and in which case, I'll show you the difference between the 2. So, all the trusts
are actually disabled. And now, when I come
into my PI UFL
interface, if I press play,
what's gonna happen? First off, I'm gonna run some message logs.
[inaudible]
I've started my interface.
And we can see different messages
coming in. This is from the interface
side, what it's reading out or saying.
It reads the [inaudible] file, for instance. And if I go to my
PI interface or to my PI
server, and if I go to data
, no, not data - operations and then
message logs and then search for message
logs that recently happened;
I can see - ok, here, very
recently - a connection that came
in for PI UE but
no trust is established for this connection.
So, there is no permissions given.
So that interface would not be able to write data at all. So, it's a good thing
we do have those trusts 'cause we can just enable
them and we'll be able to get in. I'm gonna go to my trusts and this time,
enable my
trusts.
Great. All my trusts are enabled.
And now, I'm gonna restart my
interface. So, it's gonna disconnect and reconnect
again.
There we go.
And this time, when I go to my message
logs, and refresh it,
I'll see that
-yeah, right here-
so that the connection came in and it was given the user
I wanted to, which was PI Interface's identity.
So we now have security access.
And we can see on our
interface side, all we need to do now is just
wait a little bit for the interface to read these
text files. And once it reads these texts files,
it will change the ending of the text file to
show that it's been processed. And we'll be able to see the data
on the PI server.
And now, we're
seeing UFL process these data
files.
We'll actually see, as it reads them,
the data is gonna be in this window, if you wish to watch it.
All right. Now, once
we've processed the file, we know that it's been
successfully processed because it's been given this
.ok ending. And we can go to our PI server
and see the data over there.
So, to begin with, let's see here.
I want to see what's in this data
file. And we see that the tag name here is
PI UFL Example 1A. So, we want to see if this data made it into the
PI server.
Current Values..
PI
UFL -search
oops Put a wild
card there. Then we can see, we have all of
these tags.
All oops
okay. And they each have values.
Now, I gave them all the same values so they have similar ones.
But we can see here, from my PI server,
if I look at my data files, I have this
tag. I also
have other tags with other names. And they got
created on my PI server.
And we can see, the
final value here matches.
Between 64 and 64 right there.
So we know the data is being written
to the PI server. And if we were to actually go look at the
history of one of these tags too,
we could see it there as well.
PI UFL
star.
Yeah. We can see a whole history of data that was written to this
tag.