Help - HMI Server Functions
Overview:
A web based client cannot operate on its own. It requires a server to load
the client web page from, and to communicate with. This system has a special
server built into it which provides both functions.
Server Features:
The HMI server provides the following features to an application.
- A web server. The server will load web pages requested by a web browser.
This includes the web page itself, external Javascript files, CSS files,
graphics images such as PNG or JPEG files, and icons ("favicons").
- A common data table. All server data is stored in the common system
(communications) data table. This means that a client can interact with other
protocols and devices through the common data table. This includes monitoring
inputs, setting outputs, and viewing events and alarms.
(This is in MBLogic only. In in HMIServer data is read directly
from the external source.)
- Events and alarms. The server detects events and alarms, time stamps them,
constructs the messages, stores them in an event queue where they can be
requested by the client, and responds to alarm acknoweldge messages. More
details on events and alarms can be found below.
- Read only tags. Some tags can be defined as "read only" to protect their
contents from being inadvertantly changed.
- Range limits and scaling. Numeric tags can have range limits and scale
factors applied by the server. Range limits can be used to prevent invalid
data from being accepted by the server. Scale factors allow server data table
values to be converted to a different range (e.g. convert to engineering units)
for the client.
- A configuration system. Tags, data table addresses, and other features
are all configurable. More details on configuration can be found below.
Events and Alarms:
Events and alarms are represented as boolean conditions. An event
occurs when the boolean value changes from false to true, or from true to
false. An alarm occurs when the boolean value changes from false to true.
The event and alarm manager does not directly "create" events or alarms
by monitoring conditions such as analogue values. Events and alarms must
be created by other logic (e.g. via the soft logic or by other systems).
The addresses used for events and alarms can be anywhere in the coils
area of the data table. External protocol clients, internal clients and
integrated software modules can all write to the coils area
to trigger and event or alarm.
Event and Alarm Buffering:
Events and alarms are "buffered" in the server. This means that when an
event or alarm occurs, a copy of each message is retained in the server so that
a client can retrieve all or some of them later. This means the client does not
need persistent (disk based) local storage to maintain a (recent) history of
events and alarms. They can be retrieved from the server at any time.
At present, the system stores the event and alarm buffers in memory. This
means they do not (at present) retain a permanent event or alarm history.
If the server is restarted, the existing history is lost. Permanent event
and alarm storage will be addressed in a future version.
Data Scaling and Conversion:
The HMI server offers automatic scaling of numbers as part of the configuration
system. Values in the data table may be automatically scaled when read from
the server, with the reverse scaling being applied on writing data to the
server. Scaling is user selected parameters as part of the configuration.
The server also automatically converts data types as required. Conversion
is implemented as follows:
Scaling When Receiving Data
- On receiving a value which is intended to be written to a register, the
server first attempts to convert it to an integer. If this fails, it attempts
to convert it to a floating point number. If that in turn fails, it reports
it as a 'badtype' error.
- The server then checks to see if the number is within the user defined
range. If not, then it reports it as an 'outofrange' error.
- Next, the server attempts to apply the scale factors. The equation used
is scaledvalue = (datavalue - scaleoffset)/scalespan. If an error occurs,
it is reported as a 'servererror'.
- Next, the scaled value is checked to see if it will fit within a data
table register.
- If there are no failures at this point, the value is converted to an
integer and stored in the data table.
Scaling When Sending Data
- When sending data, the value is first read from the data table.
- Next, the server attempts to apply the scale factors. The equation used
is scaledvalue = (scalespan * datavalue) + scaleoffset. If an error occurs,
it is reported as a 'servererror'.
- The scaled value is next converted to the configured data type. If an
error occurs, it is reported as a 'badtype'.
- Finally, the the number is checked to see if it is within the user defined
range. If not, then it reports it as an 'outofrange' error.
Platform Data Limits:
Because all data values are mapped to data table addresses, the data
must exist within the limits of that data table. These are limitations
of the server platform and not HMI protocol limits.
- Native integers must be within the range -32768 to 32767 (after scaling
is applied).
- Extended data types offer integers in the range -2147483648 to 2147483647.
However, these require two registers per value.
- Native floating point numbers are automatically converted to integers when
stored in the data table.
- Extended data types offer single and double precision floating point.
However, these require 2 (single precision) or 4 (double precision) registers
per value.
- There are no limits on string length, but a single register may hold
only 1 or 2 characters.
- Discrete inputs and input registers are read-only addresses.