Also as part of setting up our interface, we want to give some thought to
ShutdownEvents. The default behaviour of a PINet
node is that each time PINet is
stopped or started, the PINet software will check for the
need to record ShutdownEvents for
all tags that are collected locally.
Just in case the PINet gets confused or loses
track of which tags are configured for local
collection, it's best to explicitly specify
exactly which points
[inaudible] ShutdownEvents when PINet is stopped or restarted.
Two command files are used to configure
ShutdownEvents on a PINet node. One command file
called ShutdownEvents.com executes when
PINet receives an order to shutdown.
Another command file CheckForCrashes is executed
when the PINet node starts back up,
the CheckForCrashes attempts to do recovery
and record ShutdownEvents in the event that
the PINet node did not receive a normal orderly shutdown.
So let's take a look at those files.
ShutdownEvents.com and CheckForCrash.com are
similar. There is a lot of commands
at the top of the file that attempt to calculate
the shutdown time. And the important thing for
us to know is that down at the end of the file is a
definition of a symbol to execute
the ShutdownEvents program.
And then we use the symbol to execute the ShutdownEvents program
passing parameters to it. In our
case, ShutdownEvents have be pre-configured to record
ShutdownEvents at the time that is
passed. And the only tags that are going to receive ShutdownEvents
are the IORates.dat tag. So only the system tags are going
to receive ShutdownEvents. Since I
happen to know that we have a fractal interface on this
node, and it's the only interface on this
node, I am going to pass the PointSource
character, the fractal program to record the ShutdownEvents.
So in this case, two groups of tags. Those listed
in the [inaudible].dat file and those with the PointSource question mark
are going to receive ShutdownEvents.
The items you can pass here
on the command line, you will find in the
documentation, but in summary
they can consist of a filename
that contains a list of tags. And the list of
tags is a very simple format-- one tag listed per
line and tag names starting in column one. Or
you can pass a PointSource character. Or
you can pass something like a tag name.
So if I had a tag called Sinusoid and
I wanted to record a ShutdownEvent each time the PINet node
stopped, I could do that. Or you could
specify a PointSource with a
number integer following
where the number is a value that might be found in
location one of the points with the specified PointSource.
So in this particular case, I am specifying all of the
Honeywell points that are for
node 1 and gateway 1 of a Honeywell
interface.
And since I do not have a Honeywell interface, I am going to run this
out and I do not want to record ShutdownEvents for Sinusoid because
Sinusoid is not collected on my machine.
And the result is this. Remember you want to record ShutdownEvents
only by the node that actually collects the data.
So you would not want another node
to be recording ShutdownEvents for the fractal tag.
Because the fractal is not running on that other node.
Also one more thing, if you are
collecting data in a redundant configuration, you do not
want to record ShutdownEvents at all, ever. You want to
rely on the redundancy
to keep your data collection going for you.
I will repeat this configuration
in the CheckForCrash command file.
Again, CheckForCrash has quite a number of commands at the top
of the file. And what we are interested in is down
here at the bottom. I am going to add my
PointSource fractal to this and save my file.
And this completes my configuration of ShutdownEvents.