In this video, we'll enable simultaneous API
and SDK buffering.
This scenario is less common. Usually, a node like an interface
will send only API data or a node like a client node
will send only SDK data.
And we know how to buffer this. We know how to buffer
API only data and how to buffer SDK only data.
Now we're saying, what if we have an interface that sends
API data, for instance, but also has an application that sends
SDK data? We can configure the PI buffer subsystem
to buffer both of these streams of data at the same time.
In this video, we'll look at how to set this up and
how to test it once you've done so.
I'm working on a node that has an
OPC interface that's sending API data to the
PI server and also has a ProcessBook display that
we'll also be writing annotations to the PI server with. Because of this,
we're going to be configuring simultaneous API
and SDK buffering.
The first thing you need to know if you're going to be enabling
API and SDK buffering at the same time is you need the newest
interface configuration utility.
At least
ICU 149.
Now, I've already installed it. What we can see here is that
I have an OPC interface sending to my
PI server. It's already
running and sending data. If I open up a ProcessBook
display, I can see that the data is coming in.
Right now, I'm not buffering this data. So, we'll configure
API buffering just like we have in the past.
We'll enable buffering
with the PI buffer subsystem. Specifically, we're going to
be using the PI buffer subsystem. You can't use
buffer server if you're going to also be buffering SDK data.
I'll select which server I'm interested
in buffering to and hit apply.
Okay.
Now, when I come down to servers, I'll need to add
a PiBufSS dependency to this
OPC interface. And once I restart
it,
it will restart PI buffer subsystem and start using
the buffer.
So, while this starts, I'll open up a command prompt
and from here, I can see what data is going
into and out of the buffer.
So, using PiBufSS
-qs, this shows me
some q statistics. Everything that's gone into the buffer and out of it.
I can see that data is going in and
coming out just like I want it to.
The writes and the reads are the same, meaning that the data that goes into the buffer
is also being sent to the PI server. This means that
the data that's being sent by this OPC interface
is actually using the buffer. That's good, that's what we want.
Now, we're interested in configuring SDK
buffering because right now, if we were to use
ProcessBook and write an annotation to one of these
tags for instance, it will be lost if we don't have a
network connection to the Pi server. To do that, we
use the SDK utility.
We'll go to PI
SDK buffering and we'll enable PI
SDK buffering. The thing about
this is, because we've done some of the buffering configuration
using the ICU, this SDK utility
can't just choose any server. It must choose the server
that you've configured using the ICU.
So, buffered server configuration - if I want to change it,
I need to use the ICU. Okay.
Now that that's enabled,
I'm going to go ahead and restart these
ProcessBook and System Management Tools.
And I'll see, once it restarts,
if it registered with the buffer. So, I'll run
PiBufSS -creg
and I'll see that
indeed, ProcessBook and System Management Tools have registered
with PiBufSS. That's good, that's what we want.
Again, now we'll just look
at the q statistics.
And we'll simulate
an outage.
Now,
we're gonna see data going to the buffer and stay in the buffer and not get
sent to the PI server. And if I come over
to ProcessBook and I choose one of my tags to
write to,
I'll see that this annotation
will be buffered and will eventually make it to the PI server, once we have
a connection again.
So, right now, it's been sent off but we don't see
it yet.
If we simulate that we've reconnected
to the server by running PiBufSS -
bc start, we'll see the
buffer clear out
and if we fresh this view, we'll also see
that our annotation made it through.
Right there.
Okay. So, what we've done in this video
is we configured API buffering first, using
the ICU and then we configured SDK buffering on top
of that. It needs to go in that order. It needs to be configured
with the ICU first for API buffering, then using
the SDK utility to configure SDK buffering.
And like always, once you've done this configuring, you need
to test to make sure it's actually doing what you intend it to do.