Management &
Administration
It is a good idea to establish plant procedures for backup and restore, and
a policy to ensure that backup is done on a regular basis. Proper docu-
mentation of setup and applications for each machine is crucial.
Backup
There are several different ways in which backup can be done, but
essentially, it boils down to two main approaches: drive image
and file copy. A drive image is a clone of the entire drive while file
copy only duplicates certain files or records in a database.
Different backup media and devices are available and a suitable
solution should be selected, based on the volume of data, required
restore speed, and the number of times the media should be used.
It is important to keep the backup copy in a secure place, yet
readily available when required. Keep an additional backup copy
233
234 Software for Automation
Drive Image
A hard disk image is a complete clone of the drive written onto
another disk. Since the image includes the hardware setup details,
the image can only be restored on a machine with identical hard-
ware. Usually the hard disk is cloned to an identical hard disk,
permitting the complete drive to be swapped out quickly in case of
failure – in other words, a hard disk replacement. The image cannot
be made while other applications are running. As a result, cloning
is usually not done on a daily basis and, therefore, not suitable for
all data such as alarm, event, and trend log – historical data and
logs that continuously change. Drive image is mainly used as
backup for the operating system, registry, applications, and setup,
which rarely change. Cloning is done after validating changes,
upgrades, patches, and service packs, or installing applications.
File Copy
Some applications have a built-in backup utility that compresses
the data they store into a file that can be copied onto some kind of
removable media such as CD-ROM or tape. Full-fledged database
engines also include built-in backup utilities. Backup can be full,
incremental, or differential. Incremental backup means only the
files changed or created since the last backup are copied. The
restore procedure requires the full backup, and all the incremental
backups, to be restored. Differential backup means all files since
the last full backup are copied. Only the full and a single differen-
tial backup have to be restored. Backup can also be done by
manually copying files onto another drive or networked
computer, optionally using file compression. This method is suit-
able for weekly or daily backup of historical data and logs that
continuously change. Many backup utilities are available that can
schedule and automate backup tasks. Note that simple database
engines such as MS-Access do not permit backup and mainte-
nance while logging tasks are operating since all connections must
be closed. However, full-featured database engines permit auto-
matic backup and defragmentation without stopping the logging.
Restore
In case the hard disk fails and has to be replaced, getting a
replacement disk and installing operating system and applications
from scratch would be very time consuming. The fastest way to
Chapter 9 – Management & Administration 235
Networks
Managed LAN switches collect network statistics including infor-
mation on network loading. This information is made available
through network management tools to visualize network traffic
and problems. There are even OPC servers for the Simple
Network Management Protocol (SNMP) that permit display of
status and statistics from LAN switches directly in operator visu-
alization software, such as on a system status overview page.
236 Software for Automation
Figure 9-1. OPC Server for SNMP (Screenshot: Obermeier SNMP-OPC Server)
OPC
Advanced OPC clients such as operator visualization software
typically permit tuning of parameters that control how the client
interacts with the servers. This includes timers for checking if the
server is OK and reconnecting in case of failure. Tuning parame-
ters that can adapt system operation include, for example, time-out
before an unused server is disconnected, how parameters are
added and removed from the OPC groups, and parameter
writing.
Chapter 9 – Management & Administration 237
Figure 9-2. Tuning Parameters for OPC Client (Screenshot: SMAR SYSTEM302)
SQL
A database engine typically has several settings that can be tuned
in order to optimize system performance. For example, it is
possible to tune how much memory is allocated.
Change
Changing from one software version to another or adding a new
application, installing service packs, or performing online updates
carries a small risk that the change results in an incompatibility
that causes another function to no longer work. An example of
this is the DLL Hell problem explained in Chapter 6, when one
file shared by many applications is replaced. Therefore, it is
important to carefully manage software changes made to the
system. When calculating the risk of making a change, include not
only the impact of failure, but also the difficulty of backing out of
an upgrade and reverting to the original version.
Upgrade
Upgrading to a new version and completely changing individual
software applications is simplified using OPC because there are
no dependencies between clients and servers such as hardware
communication drivers. That is, it is possible to change, for
example, from one HMI to another without having to change the
OPC server, or to change the PLC and its OPC server without
changing the HMI software. However, when an OPC server is
changed the name will be different and, therefore, it will be neces-
sary to change the OPC server name in the access path in all client
applications. Most applications have search and replace tools to
simplify this task. Ideally, the parameter names and hierarchical
structure of the OPC namespace is maintained for the new version
of the same server. Otherwise, the entire access path in the OPC
clients must be replaced which would still be a fair amount of
work. Similarly, in a system based on OLE_DB, the consumer and
provider can be replaced independently. In graphics using
ActiveX, it is possible to upgrade ActiveX components and
containers independently.
Exercises
1. What is the difference between incremental and differential
backup?