Flexible and Historian Mapping

Flexible Mapping

The flexible mapping is the first mapping type, which is use-case-specific and provides its own message format. The idea behind flex mapping is, that a MBR designer on MES level does not know anything about the internal structure of the system, but she or he wants to get the current values from a given device.

Configuration - Flexible Mapping
Figure 1. Configuration - Flexible Mapping

The flex mapping now 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 sysystem. EquipmentId and Tag should be configured according to the naming conventions within the MES system. 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 data studio or imported from Excel. Exporting the configuration to Excel is also possible.

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

Central Mapping

If a central mapping is configured within the 'Message Processor', this an be easily used by selecting the flag "Use Central Mapping". Be aware, that this will disable the Mapping table within the message configuration.

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 given Tag[1-50] fields. The data type of the Return fields is always string, and the values will be stringified prior to the transmission. Additional to the return values, a ReturnCode is provided, which indicates sucessfull, partly sucessfull or unsucessfull reads with the following return codes.

Code Meaning

200 OK

execution was sucessfull.

206 Partial Content

data could not be read for all tags.

404 Not Found

EquipmentID missing.

Historian Mapping

The historian mapping is the second mapping type, that is use case specific and provides it’s own message format. It’s main difference from the flexible mapping is, that not the current value is requested, but values or aggregates from a timerange in the past. The values can be read from the inmation internal historian or from an external historian. Currently only OSI-PI is available as external option.

Configuration - Historian Mapping
Figure 4. Configuration - Historian Mapping

The historian mapping now does the following things:

  1. A message format is predefined. In order to activate this predefined format, configure 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 and an historian type. The historian type defines whether the internal or an external historian is used. In oder to allow a 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 be configured.

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

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

Central Mapping

If a central mapping is configured within the 'Message Processor', this an be easily used by selecting the flag "Use Central Mapping". 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 to query up to 50 different tags and it allows to specify 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).

Mean

returns the mean value of all measurements inside the interval

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

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 the a concatenated value composed of the single values in the interval

Currently the Historian Mapping allows to use two different taglists.

The version 1 of the taglist can be created by setting the ProcessingMode to Update Taglist.

In this version of the taglist, the fields BatchId, EquipmentId, StartDate and EndDate must be set. The BatchId as well as the EquipmentId are configured as "MES Qualifiers" and therefore identify the matching BO/BF and 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 matching 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 version 2 of the taglist can be created by setting the ProcessingMode to Update Taglist 2.

In this second version of the taglist, the fields BatchId, EquipmentId, DateTimeStart and DateTimeEnd must be set. The BatchId as well as 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 are managed by the PAS-X system, the encoding is done outomatically according to the MSI specfication. 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 matching 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 taglist have a ReturnCode entry, which indicates sucessfull, partly sucessfull or unsucessfull reads with the following return codes.

Code Meaning

200 OK

execution was sucessfull.

204 Not All Aggregates Defined

one or more agregate tags have invalid data.

206 Partial Content

data could not be read for all tags.

400 Bad Request

wrong timerange 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 not only possible to read data from the system’s own historian, but also from an OSI-PI historian. But the connection to the OSI-PI system has to be configured for this. First of all, a PIBridge must be installed on a connector of the system as described in the inmationPIBridge installation instructions. After the OSI-PI Bridge is installed, the required configurations have to be done within the Message Configuration, where the following fields must be configured:

Name Description

Host Name or IP

the hostname or IP adresse, 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 inmationPIBridge runs.

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

In order to access tags on the OSI-PI server, the tags have to be configured in the mapping table with the path, which is 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, so please consider this for the choice of the 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 type, setting the flag 'Use Central Mapping' disables the mapping table within the mapping configuration, and uses the cental mapping table within the 'Message Processor'. The central mapping includes fields which are not required for the 'Flexible Mapping' and which are ignored by the flexible mapping.