Flexible and Historian Mapping

Flexible Mapping

Flexible Mapping is a use-case-specific mapping type that provides its own message format. For a designer of a Master Batch Record on the MES level who has no knowledge of the internal structure of the system, Flex Mapping can be used to get current values from a given device.

Configuration - Flexible Mapping
Figure 1. Configuration - Flexible Mapping

The Flex Mapping does several things:

  1. A message format is predefined. In order to activate this predefined format, select the operation mode "Update Taglist". This will create the required Taglist and automatically switch back to the operation mode "Configuration" afterwards.

  2. The mapping configuration includes a table, which automatically maps the combination of an EquipmentId and a Tag(name) to a path within the system. EquipmentId and Tag should be configured according to the naming conventions within the MES. The path can be configured to any item within the I/O-Model, the ISA95 Equipment Model or the KPI Model.

Tag List - Flexible Mapping
Figure 2. Tag List - Flexible Mapping

The mapping configuration is implemented as a configuration table and can be changed within DataStudio or imported from Excel. The configuration can also be exported to Excel.

Mapping Table - Flexible Mapping
Figure 3. Mapping Table - Flexible Mapping

Central Mapping

If a Central Mapping is configured in the Message Processor object, it can be easily used by setting the Central Mapping flag in the Message Description Properties > Flex Mapping Options subsection of the Message Configuration object. Be aware that this will disable the Mapping Table of the Message Configuration object.

For performance reasons it is possible to request up to 50 different values within one message. In each message, the fields BatchId and EquipmentId must be filled. The fields Tag[1-50] are optional.

In the response message, the Return[1-50] fields are filled according to the corresponding Tag[1-50] fields. The data type of the return fields is always "string", and the values will be stringified prior to the transmission. In addition to the return values, a return code is provided, which indicates successful, partly successful or unsuccessful reads with the following return codes.

Code Meaning

200 OK

execution was successful

206 Partial Content

data could not be read for all tags

404 Not Found

EquipmentID missing

Historian Mapping

Historian Mapping is a second use-case-specific mapping type that provides its own message format.

The values can be read from the system’s internal historian or from an external historian. Currently only OSI-PI is available as an external option.

Configuration - Historian Mapping
Figure 4. Configuration - Historian Mapping

Historian Mapping does the following things:

  1. A message format is predefined. In order to activate this predefined format, configure the operation mode to "Update Taglist". This will create the required Taglist and automatically switch the operation mode back to "Configuration" afterwards.

  2. The mapping configuration includes a table which automatically maps the combination of an EquipmentId and a Tag(name) to a path and an historian type. The historian type defines whether the internal or an external historian is used. For successful mapping, each incoming message (request) must have a valid EquipmentId.

  3. In the case of an external OSI-PI historian, the IP address and port of the PI-Bridge must be configured, as well as the name of the OSI-PI server.

  4. A timeout for the historian request must also be configured.

Tag List - Historian Mapping
Figure 5. Tag List - Historian Mapping

The mapping configuration is implemented as a configuration table and can be changed within DataStudio or imported from Excel. The configuration can also be exported to Excel.

Central Mapping

If Central Mapping is configured within the 'Message Processor', it can be easily used by setting the Central Mapping flag in the Message Description Properties > Historian Mapping Options subsection of the Message Configuration object. Be aware that this will disable the Mapping Table within the message configuration.

Mapping Table - Historian Mapping
Figure 6. Mapping Table - Historian Mapping

The implemented message allows for a query of up to 50 different tags. It also allows the specification of the following Aggregation Methods for the data in the time range:

Method Function

After

returns the value at the given path "after" StartDate

Average

returns the time weighted average of the interval (with step interpolation at boundaries)

Before

returns the value before the interval

Interpolate

takes the nearest values (before and after) and linearly interpolates according to StartDate

Maximum

returns the maximum value in the interval

MaximumInside

returns the maximum value in the interval, without boundaries

Mean

returns the mean value of all measurements inside the interval

Minimum

returns the minimum value in the interval

MinimumInside

returns the minimum value in the interval, without boundaries

Nearest

returns the value nearest to the StartDate of the interval

SingleValue

returns a concatenated value composed of the single values in the interval

Currently, the Historian Mapping allows the use of two different Tag Lists.

Creating Tag List Version 1

Version 1 of the Tag List can be created by setting the ProcessingMode to Update Taglist. In this version of the Tag List, the fields BatchId, EquipmentId, StartDate and EndDate must be set. The BatchId and the EquipmentId are configured as "MES Qualifiers" and therefore identify the matching BO/BF and Electronic Batch Record (EBR) within PAS-X. The StartDate and EndDate are of type "string" and must be given according to the format "%d/%m/%Y %H:%M:%S". The fields Tag[1-50] and FuncParam[1-50] are optional, but for each given Tag, the FuncParam must also be given. In the response message, the Return[1-50] fields are filled according to the corresponding Tag and FuncParam field. The data type of the Return fields is always "string", and the values will be stringified prior to the transmission.

Creating Tag List Version 2

Version 2 of the Tag List can be created by setting the ProcessingMode to Update Taglist 2. In this second version of the Tag List, the fields BatchId, EquipmentId, DateTimeStart and DateTimeEnd must be set. The BatchId and the EquipmentId are configured as "MES Qualifiers" and therefore identify the matching BO/BF and EBR within PAS-X. The DateTimeStart and DateTimeEnd are of type "DateTime", so that timezone conversion and representation is managed by the PAS-X system. The encoding is done automatically according to the MSI specification. The fields Tag[01-50] and FuncParam[01-50] are optional, but for each given Tag, the FuncParam must also be given. In the response message, the Return[01-50] fields are filled according to the corresponding Tag and FuncParam field. The data type of the Return fields is always "string", and the values will be stringified prior to the transmission.

The changes between Version 1 and 2 were introduced in order to allow an automatic timezone conversion, as well as to provide a better representation of the parameters when they are sorted alphanumerically.

Both versions of the Tag List have a Return Code entry, which indicates successful, partly successful or unsuccessful reads with the following return codes.

Code Meaning

200 OK

execution was successful

204 Not All Aggregates Defined

one or more aggregate tags have invalid data

206 Partial Content

data could not be read for all tags

400 Bad Request

wrong time range given

404 Not Found

EquipmentID missing

Different aggregates can be combined within a single message. It is possible, but not recommended to combine access to the internal historian and an external historian in a single message.

OSI-PI Connectivity

With the Historian Mapping, it is possible to read data from the system’s own historian as well as from an OSI-PI historian. To achieve this, the connection to the OSI-PI system must be configured. Firstly, a PIBridge must be installed on a system connector as described in the inmationPIBridge installation instructions.

After the OSI-PI Bridge is installed, the following fields need to be configured in the Message Configuration object:

Name Description

Host Name or IP

the hostname or IP address, where the PIBridge service runs

Port

the TCP port for the PIBridge service

Timeout

the timeout for the PIBridge service

PI-Server

the name of the PI (DA) server

The PI-Server must be configured on the machine where the PIBridge runs.

OSI-PI Bridge - Historian Mapping
Figure 7. OSI-PI Bridge - Historian Mapping

In order to access tags on the OSI-PI server, they have to be configured in the Mapping Table with the path used by the OSI-PI server and the historian configured to OSI-PI. Be aware that a request to the OSI-PI system may take longer than an request to the system’s own historian. This should be considered for timeout as well as for the size of the messages. It is not recommended to request system tags and OSI-PI tags in the same message.

Using Central Mapping

For both mapping types, setting the Central Mapping flag in the Message Description Properties > …​ Mapping Options subsection of the Message Configuration object disables the Mapping Table within the Mapping Configuration. Instead, the Central Mapping table in the Message Processor object is used. Central Mapping includes fields which are not required for the 'Flexible Mapping'.