Manage Translation Tables

 

In this Topic Hide

What are Translation Tables Used For?

Creating a Translation Table

Import and Export Translation Tables

Specifying a Translation Table in a Data Source

What are Translation Tables Used For?

Data translation tables provide on-the-fly data conversion. You can assign a translation table to a tag that converts a given shopfloor message field value into a channel message tag value and vice versa. The translation table acts as a lookup table.

Translation tables can be used for many things. For example:

       Translate recipe numbers into readable text.

       Translate error numbers into readable text.

       Translate string constants into values.

The rules for a translation tables depend on whether it is for upload use, download use or bidirectional use:

       Download: Has unique Shopfloor Message Field Values.

       Upload: Has unique Channel Message Tag Values.

       Bidirectional: Has unique Channel Message Tag Values and Shopfloor Message Field Values.

Creating a Translation Table

1.     Select the OT Bus Stop tab.

2.     Click Translation Tables.

A list of the existing translation tables is shown.

3.     Click Add.

The Edit Translation Table dialog opens.

4.     In the General tab, enter a unique name for the table.

5.     Select the direction in which the data is being translated. This can be Upload, Download or Bidirectional.

6.     Select the Data Translations tab.

7.     Click Add.

8.     Enter values for the Shopfloor Message Field Value and the Channel Message Tag Value. For example, in an Upload message, Channel Message Tag Value is 1 and the Shopfloor Message Field Value is 00001 this means that when the tag value received is 1 then the field value will be 00001.

9.     Click OK. The tag/field translation is added to the table.

10.  Click Save.

The data translation table is saved.

Import and Export Translation Tables

Translation tables can be imported and exported as XML files by clicking Import or Export.

The following example shows how the translations appear in the XML file. If the translation table contains the following translations...

...the exported XML will look like this:

<Bus>

  <OTDataTranslation Code="TranslateUp" ExternalId="c3a4aaa1-25ba-4d0a-9f82-e574a333aef6" Direction="Upload">

    <TranslationPairs>

      <OTDataTranslationPair Code="One -&gt; 1" ShopfloorMessageFieldValue="One" ChannelMessageTagValue="1" />

      <OTDataTranslationPair Code="Two -&gt; 2" ShopfloorMessageFieldValue="Two" ChannelMessageTagValue="2" />

      <OTDataTranslationPair Code="Three -&gt; 3" ShopfloorMessageFieldValue="Three" ChannelMessageTagValue="3" />

    </TranslationPairs>

  </OTDataTranslation>

</Bus>

Specifying a Translation Table in a Data Source

The data translation table can now be specified as a data source when adding tags to channel messages. This can be done in all channel messages.