Creating map variables
(Input or Output tab)
Once you establish the transport type (and the SQL
action for database transports), you can create map
variables using an Input or
Output tab on the Transport Map window.
During runtime, these variables are mapped to physical PLC
device variables (when a plant floor event occurs).
The following shows an example transport map and the
Input tab where the map variables are
defined.
The Input tab represents the definition of runtime data that is sent by a trigger execution to the transport map. This is the source data that is used to build a payload for an outbound message (such database or message system payloads).
The Output tab becomes available when a database transport is specified with either a Select, Select with Update, Select with Delete, or Stored Procedure.
When a transport map is bidirectional, the trigger will
expect data that is queried from an enterprise system to be
sent to it from the map variables on the
Output tab.
Transport maps that use database transports with Insert,
Batch Insert, and Update operations, or transport maps that
use WebSphere MQ or TCP transports, will not have
Output tabs since these transport maps do
not support the ability to write data back to the PLC as
Select operations, Stored Procedures do.
Both the Input and Output tab will contain these columns:
Column name | Description |
---|---|
Name | The logical name for the map variable. You can create a unique name and add each map variable separately. For more information, see Creating each map variable separately. For database transports, you can automatically create map variables based on the column name in the database table. For more information, see Creating map variables automatically. |
Logical | The data type that you associate
with the name. The data types are
available from a list. For database transports, when the Map Table button is used, the data type is automatically added based on the vendor data type assigned when the database table was created. For more information, click vendor database data types. |
Count | A value that specifies the dimension
of the map variable such as a scalar or
an array. For an array, the value would
be the number of elements in the array.
You can double-click inside the
Count column to change
the value. Output tab. When you add a value for Max Rows, that value is also automatically added to the Count column on the Output tab. This features applies only to Select, Select with Delete, and Select with Update operations. |
Length | An integer value. If the data type in the Logical column is a string, then the value for the Length column is the length of the string. A string can be any length. |