Overview

This topic describes how to create elementary, array, and bit type I/O items by using the I/O Mapping Editor . You can create items for read/write requests (Modbus TCP) and input/output connections (EtherNet/IP) of communication profiles that are configured for devices.

You can modify various attributes of existing items including their type and offset.

The I/O mapping is reflected in the structure of the device DDT that is created for the device in the control project of the scanner. For registers in which no I/O mapping is defined, an array of Byte is automatically created in the device DDT.

Prerequisites

  • You have added to the system project a device that uses the Modbus TCP or EtherNet/IP communication protocol.

  • In the I/O profile of the device, you have configured the read and/or write length of at least one request or the input and/or output size of at least one connection.

  • The mapping mode for the communication profile is set to Manual .

Changing Register Size and/or Address

The table describes the procedure to change register size and/or address if the corresponding attribute is read-only in the I/O profile of the device. The procedure does not apply to the first request or connection of a device.

Step

Action

1

In the I/O Mapping Editor, select the Input or Output node of a request or connection.

Result: The properties of the corresponding register appear in the Request or Connection section of the PROPERTIES pane.

2

Edit the value of Length and/or Address as needed.

Result: The graphical representation of the register size is updated and the new value is shown in the properties of the I/O profile of the device.

Item Name Syntax

By default, item names use the syntax BLOCKx_<Input/Output><Type abbreviation><Offset>_<Array elements>, where:

  • BLOCKx is the name of the register that is addressed by the request/connection.

  • <Input/Output> corresponds to I for a read and to Q for a write request/connection.

  • <Type abbreviation> is defined in the table.

  • <Offset> is expressed in bytes except for single bit items, for which it is expressed in bits.

  • <Array elements> is the number of elements (for arrays only).

For example, BLOCKA_IW24_2 is the name of an item of the first read request/input connection of type Array of Word containing two words.

You can edit the name during or after item creation.

NOTE:

When you create more than one item, <Offset> is replaced by an asterisk (*).

If you edit the item name, insert one or more asterisks at any position after the first letter. The asterisk is replaced by an incremented number when the items are created and appear in the I/O Mapping Editor .

NOTE: Only default names are automatically updated when you modify an item.

Data type

Type abbreviation

Designation

Bit

X

Bit

Byte(1)

B

Byte

String(1)

S

String

Word

W

Word

Int

I

Integer

UInt

UI

Unsigned integer

DWord(1)

DW

Double word

DInt

DI

Double integer

UDInt

UD

Unsigned double integer

Real

R

Real

Time(1)

T

Time

(1) The data type is not available for Modbus TCP communication.

NOTE: An array of a type uses the same abbreviation as the type.

Creating Items

To create elementary or array type items, proceed as follows.

Step

Action

1

In the I/O Mapping Editor, right-click Input, Output, or a selection of free consecutive bytes in the graphical representation and select Define Items.

Result: The Item Definition dialog box opens.

NOTE: For Modbus TCP communication, in the graphical representation, you must select an even number of bytes to be able to define items.

2

Edit Name if required.

3

Select the type of the item. To create an array, select ARRAY .

NOTE: If you have selected the command from the graphical representation, only types that are compatible with your selection are available.

4

Select the offset of the item and how many items to create.

NOTE: Offset and Count are read-only when you create items by using the graphical representation. The software creates as many items as your selection allows starting at the lowest selected byte.

5

Click OK .

Result: If sufficient space is available, the items are created and appear in the editor; otherwise, a notification is shown.

Creating Bit Items

To create one or more single bit items, create an item of a data type that supports bit mapping first.

The data types are Byte, Word, Int, and UInt.

To create bit items, proceed as follows.

Step

Action

1

In the I/O Mapping Editor, right-click an existing item that supports bit mapping in the tree view or free bits in its bit field and select Define Items .

Result: The Bit Item Definition dialog box opens.

NOTE: To create several non-consecutive bits, select each bit in the bit field of the item.

2

Edit Name if required.

3

Select the position of the first bit item in the bit field (Offset ) and how many items to create.

NOTE: Offset and Count are read-only when you create bit items by using the bit field. The software creates as many bit items as you have selected bits.

4

Click OK .

Result: If sufficient space is available, the items are created and appear in the editor; otherwise, a notification is shown.

Modifying Items

To modify an item, select it in the tree view or graphical representation and edit its attributes in the PROPERTIES pane.

The table indicates which attributes you can modify.

Attribute

Elementary types

Array types

Bit types

Name

Yes(1)

Comment

Yes

Type

Yes(2)

Yes(2)

No

Offset

Yes

Yes

No

Rank

N/A

N/A

Yes

Number of elements

N/A

Yes

N/A

(1) The software accepts only unique names within a communication profile.

(2) Selecting a type that does not support bit mapping removes existing bit mappings. You cannot change an elementary type to an array and vice versa.

Deleting Items

To delete one or more items, select them and press Del.

Deleting an item also deletes its bit mappings if applicable.