M241 Logic Controller as a Target Device on EtherNet/IP

Introduction

This section describes the configuration of the M241 Logic Controller as an EtherNet/IP target device.

For further information about EtherNet/IP, refer to the www.odva.org website.

EtherNet/IP Target Configuration

To configure your M241 Logic Controller as an EtherNet/IP  target device, you must add an EtherNet/IP manager to your controller. Select EthernetIP in the hardware catalog, drag it to the Devices tree, and drop it on one of the highlighted nodes.

EtherNet/IP Parameter Configuration

To configure the EtherNet/IP parameters, double-click COM_Bus > TM4ES4 > EthernetIP in the Devices tree.

This dialog box is displayed:

G-SE-0047870.1.gif-high.gif

 

 

The EtherNet/IP configuration parameters are defined as:

oInstance:

Number referencing the input or output Assembly.

oSize:

Number of channels of an input or output Assembly.

The memory size of each channel is 2 bytes that stores the value of an %IWx or %QWx object, where x is the channel number.

For example, if the Size of the Output Assembly is 20, it represents that there are 20 input channels (IW0...IW19) addressing %IWy...%IW(y+20-1), where y is the first available channel for the Assembly.

Element

Admissible Controller Range

EcoStruxure Machine Expert Default Value

Output Assembly

Instance

150...189

150

Size

2...40

20

Input Assembly

Instance

100...149

100

Size

2...40

20

EDS File Generation

You can generate an EDS file to facilitate configuring EtherNet/IP cyclic data exchanges.

Step

Action

1

In the Devices tree, right-click the EthernetIP node and choose the Export as EDS command from the context menu.

2

Modify the default file name and location as required.

3

Click Save.

NOTE: The Major Revision and Minor Revision objects in the EDS file are used to ensure uniqueness of the EDS file. The values of these objects do not reflect the actual controller revision level.

Generic M241 Logic Controller and M251 Logic Controller EDS files are also available on the Schneider website. You must adapt the EDS file to your application. To do so, edit it and define the Assembly instances and sizes.

EthernetIP Slave I/O Mapping Tab

Variables can be defined and named in the EthernetIP Slave I/O Mapping tab. Additional information such as topological addressing is also provided in this tab.

G-SE-0005340.2.gif-high.gif

 

 

The table below describes the EthernetIP Slave I/O Mapping configuration:

Channel

Type

Default Value

Description

Input

IW0

WORD

-

Command word of controller outputs (%QW)

IWxxx

Output

QW0

WORD

-

State of controller inputs (%IW)

QWxxx

The number of words depends on the size parameter configured in EtherNet/IP Configuration.

Output means OUTPUT from Originator controller (= %IW for the controller).

Input means INPUT from Originator controller (= %QW for the controller).

Connections on EtherNet/IP

To access a target device, an Originator opens a connection which can include several sessions that send requests.

One explicit connection uses one session (a session is a TCP or UDP connection).

One I/O connection uses 2 sessions.

The following table shows the EtherNet/IP connections limitations:

Characteristic

Maximum

Explicit connections

8 (Class 3)

I/O connections

1 (Class 1)

Connections

8

Sessions

16

Simultaneous requests

32

NOTE: The M241 Logic Controller supports cyclic connections only. If an Originator opens a connection using a change of state trigger type, the connection is not rejected by the controller but packets are sent at the RPI rate.

Profile

The controller supports the following objects:

Object class

Class ID

Cat.

Number of Instances

Effect on Interface Behavior

Identity Object

01 hex

1

1

Supports the reset service

Message Router Object

02 hex

1

1

Explicit message connection

Assembly Object

04 hex

2

2

Defines I/O data format

Connection Manager Object

06 hex

 

1

TCP/IP Interface Object

F5 hex

1

1

TCP/IP configuration

Ethernet Link Object

F6 hex

1

1

Counter and status information

Interface Diagnostic Object

350 hex

1

1

Scanner Diagnostic Object

351 hex

1

1

Connection Diagnostic Object

352 hex

1

1

Explicit Connection Diagnostic Object

353 hex

1

1

Identity Object (Class ID = 01 hex)

The following table describes the class attributes of the Identity Object:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Revision

UINT

01h

Implementation revision of the Identity Object

2

Get

Max Instances

UINT

01h

The largest instance number

3

Get

Number of Instances

UINT

01h

The number of object instances

4

Get

Optional Instance Attribute List

UINT, UINT [ ]

00h

The first 2 bytes contain the number of optional instance attributes. Each following pair of bytes represents the number of other optional instance attributes.

6

Get

Max Class Attribute

UINT

07h

The largest class attributes value

7

Get

Max Instance Attribute

UINT

07h

The largest instance attributes value

The following table describes the Class Services:

Service Code (hex)

Name

Description

01

Get Attribute All

Returns the value of all class attributes

0E

Get Attribute Single

Returns the value of the specified attribute

The following table describes the Instance Services:

Service Code (hex)

Name

Description

01

Get Attribute All

Returns the value of all class attributes

05

Reset (1)

Initializes EtherNet/IP component (controller reboot)

0E

Get Attribute Single

Returns the value of the specified attribute

(1) Reset Service description:

When the Identity Object receives a Reset request, it:

odetermines whether it can provide the type of reset requested

oresponds to the request

oattempts to perform the type of reset requested

The Reset common service has one specific parameter, Type of Reset (USINT), with the following values:

Value

Type of Reset

0

Reboots the controller.

NOTE: This value is the default value if this parameter is omitted.

1

Reset Warm.

2

Not supported.

3...99

Reserved

100...199

Vendor specific

200...255

Reserved

The following table describes the Instance attributes:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Vendor ID

UINT

243h

Schneider Automation ID

2

Get

Device type

UINT

0Eh

Controller

3

Get

Product code

UINT

1002h

Controller product code

4

Get

Revision

Struct of USINT, USINT

Product revision of the controller (1)

Equivalent to the 2 low bytes of controller version

5

Get

Status

WORD (2)

See definition in the table below

6

Get

Serial number

UDINT

Serial number of the controller

XX + 3 LSB of MAC address

7

Get

Product name

Struct of USINT, STRING

(1) Mapped in a WORD:

oMSB: minor revision (second USINT)

oLSB: major revision (first USINT)

Example: 0205h means revision V5.2.

(2) Status Description (Attribute 5):

Bit

Name

Description

0

Owned

Unused

1

Reserved

2

Configured

TRUE indicates the device application has been reconfigured.

3

Reserved

4...7

Extended Device Status

o0: self-testing or undetermined

o1: firmware update in progress

o2: at least one invalid I/O connection detected

o3: no I/O connections established

o4: non-volatile configuration invalid

o5: non recoverable error detected

o6: at least one I/O connection in RUNNING state

o7: at least one I/O connection established, all in idle mode

o8: reserved

o9...15: unused

8

Minor Recoverable Fault

TRUE indicates the device detected an error, which, under most circumstances, is recoverable.

This type of event does not lead to a change in the device state.

9

Minor Unrecoverable Fault

TRUE indicates the device detected an error, which, under most circumstances, is unrecoverable.

This type of event does not lead to a change in the device state.

10

Major Recoverable Fault

TRUE indicates the device detected an error, which requires the device to report an exception and enter into the HALT state.

This type of event leads to a change in the device state, but, under most circumstances, is recoverable.

11

Major Unrecoverable Fault

TRUE indicates the device detected an error, which requires the device to report an exception and enter into the HALT state.

This type of event leads to a change in the device state, but, under most circumstances, is not recoverable.

12...15

Reserved

Message Router Object (Class ID = 02 hex)

The following table describes the class attributes of the Message Router Object:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Revision

UINT

01h

Implementation revision of the Message Router Object

2

Get

Max Instances

UINT

01h

The largest instance number

3

Get

Number of Instance

UINT

01h

The number of object instances

4

Get

Optional Instance Attribute List

Struct of UINT, UINT [ ]

20

The first 2 bytes contain the number of optional instance attributes. Each following pair of bytes represents the number of other optional instance attributes (from 100 to 119).

5

Get

Optional Service List

UINT

00h

The number and list of any implemented optional services attribute (0: no optional services implemented)

6

Get

Max Class Attribute

UINT

07h

The largest class attributes value

7

Get

Max Instance Attribute

UINT

119

The largest instance attributes value

The following table describes the Class Services:

Service Code (hex)

Name

Description

01

Get Attribute All

Returns the value of all class attributes

0E

Get Attribute Single

Returns the value of the specified attribute

The following table describes the Instance Services:

Service Code (hex)

Name

Description

01

Get Attribute All

Returns the value of all class attributes

0E

Get Attribute Single

Returns the value of the specified attribute

The following table describes the Instance attributes:

Attribute ID

Access

Name

Data Type

Value

Description

1

Get

Implemented Object List

Struct of UINT, UINT [ ]

Implemented Object list. The first 2 bytes contain the number of implemented objects. Each two bytes that follow represent another implemented class number.

This list contains the following objects:

oIdentity

oMessage Router

oAssembly

oConnection Manager

oParameter

oFile Object

oModbus

oPort

oTCP/IP

oEthernet Link

2

Get

Number available

UINT

512

Maximum number of concurrent CIP (Class1 or Class 3) connections supported

Assembly Object (Class ID = 04 hex)

The following table describes the class attributes of the Assembly Object:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Revision

UINT

2

Implementation revision of the Assembly Object

2

Get

Max Instances

UINT

189

The largest instance number

3

Get

Number of Instances

UINT

2

The number of object instances

4

Get

Optional Instance Attribute List

Struct of:

UINT

UINT [ ]

 

1

4

The first 2 bytes contain the number of optional instance attributes. Each following pair of bytes represents the number of other optional instance attributes.

5

Get

Optional Service List

UINT

00h

The number and list of any implemented optional services attribute (0: no optional services implemented)

6

Get

Max Class Attribute

UINT

07h

The largest class attributes value

7

Get

Max Instance Attribute

UINT

04h

The largest instance attributes value

The following table describes the Class Services:

Service Code (hex)

Name

Description

0E

Get Attribute Single

Returns the value of the specified attribute

The following table describes the Instance Services:

Service Code (hex)

Name

Description

0E

Get Attribute Single

Returns the value of the specified attribute

10

Set Attribute Single

Modifies the value of the specified attribute

Instances Supported

Output means OUTPUT from Originator controller (= %IW for the controller).

Input means INPUT from Originator controller (= %QW for the controller).

The controller supports 2 Assemblies:

Name

Instance

Data Size

Controller Output (%IW)

Configurable: must be between 100 and 149

2...40 words

Controller Input (%QW)

Configurable: must be between 150 and 189

2...40 words

NOTE: The Assembly object binds together the attributes of multiple objects so that information to or from each object can be communicated over a single connection. Assembly objects are static.

The Assemblies in use can be modified through the parameter access of the network configuration tool (RSNetWorx). The controller needs to recycle power to register a new Assembly assignment.

The following table describes the Instance attributes:

Attribute ID

Access

Name

Data Type

Value

Description

3

Get/Set

Instance Data

ARRAY of Byte

Data Set service only available for Controller output

4

Get

Instance Data Size

UINT

4...80

Size of data in byte

Access from a EtherNet/IP Scanner

When an EtherNet/IP Scanner needs to exchange assemblies with an M241 Logic Controller, it uses the following access parameters (Connection path):

oClass 4

oInstance xx where xx is the instance value (example: 2464 hex = instance 100).

oAttribute 3

In addition, a configuration assembly must be defined in the Originator.

For example: Class 4, Instance 3, Attribute 3, the resulting Connection Path will be::

o2004 hex

o2403 hex

o2c<xx> hex

Connection Manager Object (Class ID = 06 hex)

The following table describes the class attributes of the Assembly Object:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Revision

UINT

2

Implementation revision of the Connection Manager Object

2

Get

Max Instances

UINT

189

The largest instance number

3

Get

Number of Instances

UINT

2

The number of object instances

4

Get

Optional Instance Attribute List

Struct of:

UINT

UINT [ ]

The number and list of the optional attributes. The first word contains the number of attributes to follow and each following word contains another attribute code.

Following optional attributes include:

ototal number of incoming connection open requests

othe number of requests rejected because of the non-conforming format of the Forward Open

othe number of requests rejected because of insufficient resources

othe number of requests rejected because of the parameter value sent with the Forward Open

othe number of Forward Close requests received

othe number of Forward Close requests that had an invalid format

othe number of Forward Close requests that could not be matched to an active connection

othe number of connections that have timed out because the other side stopped producing, or a network disconnection occurred

6

Get

Max Class Attribute

UINT

07h

The largest class attributes value

7

Get

Max Instance Attribute

UINT

08h

The largest instance attributes value

The following table describes the Class Services:

Service Code (hex)

Name

Description

01

Get Attribute All

Returns the value of all class attributes

0E

Get Attribute Single

Returns the value of the specified attribute

The following table describes the Instance Services:

Service Code (hex)

Name

Description

01

Get Attribute All

Returns the value of all instance attributes

0E

Get Attribute Single

Returns the value of the specified attribute

4E

Forward Close

Closes an existing connection

52

Unconnected Send

Sends a multi-hop unconnected request

54

Forward Open

Opens a new connection

The following table describes the Instance attributes:

Attribute ID

Access

Name

Data Type

Value

Description

1

Get

Open Requests

UINT

Number of Forward Open service requests received

2

Get

Open Format Rejects

UINT

Number of Forward Open service requests which were rejected due to invalid format

3

Get

Open Resource Rejects

ARRAY of Byte

Number of Forward Open service requests which were rejected due to lack of resources

4

Get

Open Other Rejects

UINT

Number of Forward Open service requests which were rejected for reasons other than invalid format or lack of resources

5

Get

Close Requests

UINT

Number of Forward Close service requests received

6

Get

Close Format Requests

UINT

Number of Forward Close service requests which were rejected due to invalid format

7

Get

Close Other Requests

UINT

Number of Forward Close service requests which were rejected for reasons other than invalid format

8

Get

Connection Timeouts

UINT

Total number of connection timeouts that have occurred in connections controlled by this Connection Manager

TCP/IP Interface Object (Class ID = F5 hex)

This object maintains link specific counters and status information for an Ethernet 802.3 communications interface.

The following table describes the class attributes of the TCP/IP Interface Object:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Revision

UINT

4

Implementation revision of the TCP/IP Interface Object

2

Get

Max Instances

UINT

2

The largest instance number

3

Get

Number of Instance

UINT

2

The number of object instances

The following table describes the Class Services:

Service Code (hex)

Name

Description

01

Get Attribute All

Returns the value of all class attributes

0E

Get Attribute Single

Returns the value of the specified attribute

Instance Codes

Only instance 1 is supported.

The following table describes the Instance Services:

Service Code (hex)

Name

Description

01

Get Attribute All

Returns the value of all instance attributes

0E

Get Attribute Single

Returns the value of the specified instance attribute

The following table describes the Instance Attributes:

Attribute ID

Access

Name

Data Type

Value

Description

1

Get

Status

DWORD

Bit level

o0: The interface configuration attribute has not been configured.

o1: The interface configuration contains a valid configuration.

o2...15: Reserved.

2

Get

Configuration Capability

DWORD

Bit level

o0: BOOTP Client

o1: DNS Client

o2: DHCP Client

o5: Configured in EcoStruxure Machine Expert

All other bits are reserved and set to 0.

3

Get

Configuration

DWORD

Bit level

o0: The interface configuration is valid.

o1: The interface configuration is obtained with BOOTP.

o2: The interface configuration is obtained with DHCP.

o3: reserved

o4: DNS Enable

All other bits are reserved and set to 0.

4

Get

Physical Link

UINT

Path size

Number of 16 bits word in the element Path

Padded EPATH

Path

Logical segments identifying the physical link object. The path is restricted to one logical class segment and one logical instance segment. The maximum size is 12 bytes.

5

Get

Interface configuration

UDINT

IP Address

UDINT

Network Mask

UDINT

Gateway Address

UDINT

Primary Name

UDINT

Secondary Name

0: no secondary name server address has been configured.

STRING

Default Domain Name

0: no Domain Name is configured

6

Get

Host Name

STRING

ASCII characters.

0: no Host Name is configured

Ethernet Link Object (Class ID = F6 hex)

This object provides the mechanism to configure a TCP/IP network interface device.

The following table describes the class attributes of the Ethernet Link Object:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Revision

UINT

4

Implementation revision of the Ethernet Link Object

2

Get

Max Instances

UINT

3

The largest instance number

3

Get

Number of Instances

UINT

3

The number of object instances

The following table describes the Class Services:

Service Code (hex)

Name

Description

01

Get Attribute All

Returns the value of all class attributes

0E

Get Attribute Single

Returns the value of the specified attribute

Instance Codes

Only instance 1 is supported.

The following table describes the Instance Services:

Service Code (hex)

Name

Description

01

Get Attribute All

Returns the value of all instance attributes

0E

Get Attribute Single

Returns the value of the specified instance attribute

The following table describes the Instance Attributes:

Attribute ID

Access

Name

Data Type

Value

Description

1

Get

Interface Speed

UDINT

Speed in Mbps (10 or 100)

2

Get

Interface Flags

DWORD

Bit level

o0: link status

o1: half/full duplex

o2...4: negotiation status

o5: manual setting / requires reset

o6: local hardware error detected

All other bits are reserved and set to 0.

3

Get

Physical Address

ARRAY of 6 USINT

This array contains the MAC address of the product.

Format: XX-XX-XX-XX-XX-XX

Interface Diagnostic Object (Class ID = 350 hex)

The following table describes the class attributes of the Interface Diagnostic Object:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Revision

UINT

01h

Increased by 1 at each new update of the object.

2

Get

Max Instance

UINT

01h

Maximum instance number of the object.

Scanner Diagnostic Object (Class ID = 351 hex)

The following table describes the class attributes of the Scanner Diagnostic Object:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Revision

UINT

01h

Increased by 1 at each new update of the object.

2

Get

Max Instance

UINT

01h

Maximum instance number of the object.

Connection Diagnostic Object (Class ID = 352 hex)

The following table describes the class attributes of the Connection Diagnostic Object:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Revision

UINT

01h

Increased by 1 at each new update of the object.

2

Get

Max Instance

UINT

0...n (maximum number of CIP IO connections)

Maximum instance number of the object.

NOTE: There is one IO Connection Diagnostic object instance for both O->T and T->O paths.

Explicit Connection Diagnostic Object (Class ID = 353 hex)

The following table describes the class attributes of the Explicit Connection Diagnostic Object:

Attribute ID

Access

Name

Data Type

Value

Details

1

Get

Revision

UINT

01h

Increased by 1 at each new update of the object.

2

Get

Max Instance

UINT

0...n (maximum number of CIP IO connections)

Maximum instance number of the object.