Topic: P258

EtherNet/IP Scanner Configuration

Description

An EtherNet/IP Scanner (or I/O Scanner) is the client device responsible for establishing a connection path to an EtherNet/IP Adapter (or I/O Adapter). The I/O Scanner initiates implicit connections with I/O Adapters for the exchange of real-time data. Unlike explicit messages, once an I/O connection is established, implicit messages are exchanged without request / response. The T->O (Input) and O->T (Output) data is produced and consumed at intervals determined by the Production Trigger specified in the connection establishment.


To configure your CPU as an EtherNet/IP Scanner, use the setup tools found in the Hardware Configuration window. The EtherNet/IP options are found under the EtherNet/IP tab of the Hardware Configuration window as shown below. To configure a client device, click and drag (or double-click) a Generic Client or existing EDS File from EDS Library in right-hand column onto the EtherNet/IP palette. The EDS library comes pre-populated with AutomationDirect EtherNet/IP Adapter devices. To add new EDS files, see the EtherNet/IP EDS file import help topic.


You can create an EtherNet/IP device via three possible methods:

  1. Existing EDS File in the Library
  2. Generic Client (below)
  3. Importing an EDS File

Once a client has been placed on the palette, the following EtherNet/IP Client Properties window will appear.

Note: A maximum number of 32 EtherNet/IP clients is allowed per CPU.


EtherNet/IP Client Configuration

  1. Device Name: Each Generic Client added to the EtherNet/IP window must contain a unique Device Name that can be referenced (if needed) through the Explicit Message instruction.
  2. Target IP Address: This is where the IP address of the target EtherNet/IP Adapter device is entered if the IP radio button is selected. If the Tag radio button is selected, a String tag is required in this field.
  3. TCP Port Number: Enter either the listening TCP port number of the Target device, or an integer tag. Typically, this value will need to be 44818 as this is the registered TCP port number for the EtherNet/IP protocol.
  4. Encapsulation Inactivity Timeout: In order to send CIP unconnected messages, or to open a CIP connection, the originator must first open a TCP connection and establish an Encapsulation Session with the target. After a period of no Encapsulation activity (5-60sec) on a TCP connection, originators and targets shall close the TCP connection. Some examples of Encapsulation activity would include:
    • RegisterSession (Request/Response)
    • UnregisterSession (Request)
    • ListIdentity (Request/Response)
  5. Note: TCP keep-alive traffic does not qualify as Encapsulation activity.

    The Encapsulation Inactivity Timeout is used to enable TCP socket cleanup (closing) when the defined number of seconds have elapsed with no Encapsulation activity.

    Note: Closing of the Encapsulation Session and the reset of the TCP connection does not stop the previously established exchange of I/O messaging data (via the UDP transport protocol).

  1. Swap Byte Order: This option allows you to swap the byte order of the data coming from the target device (T->O) or going out to the target device (O->T). This option does not affect configuration data (CONFIG DATA) byte order if the configuration data is a Parameter Table. However, if configuration data is a 16-bit array or 32-bit array, the byte order is affected by this option.
  2. Add IO Message/Add Explicit Message: For each device created, multiple Class 1 IO messages can be created as well as one Class 3 connected explicit message. If creating an IO Message, an optional Enable bit can be specified to start the IO messaging. If creating an Explicit Message, the Explicit Message Instruction is used to send the explicit message. IO Message Setup and Explicit Message Setup details are found in the section below.
  3. Note: Device specific connections may also be available from within the menu after importing the EDS file for the target device.

  4. Use Structure: Enables use of Structures.
  5. TCP Connected: The TCP Connected bit indicates that the TCP connection has been successful. This does NOT indicate that a successful CIP connection has been established. Reference the Connection Online bit for indication of the CIP connection status. It is sometimes helpful in troubleshooting EtherNet/IP connections to know if the TCP connection has been successful in order to isolate a fundamental network connection (IP address issues, TCP port issues, etc…) from a CIP forward open issue.
  6. Adapter Name: This string tag contains the text of the adapter device returned in the CIP Forward Open Message. This can be helpful in identifying whether the CPU is connected to the correct device.
  7. Vendor ID: This numeric tag contains the Vendor ID number. This tag, along with the Adapter Name tag, can be helpful in identifying whether the CPU is connected to the correct device. A list of some Vendor ID values can be found on ODVA’s website.
  8. TCP/IP Error: This string tag will contain an error created when the TCP connection fails. This tag should be used to help troubleshoot connections to adapter devices. Below are the possible errors the string may be populated with.

    1. ERR: NO CONNECTION, which could indicate:
      • A problem with the physical connection to the device (cabling, switches, etc.).
      • Incorrect network settings to the device (IP address, subnet, etc.).
      • Targeted device is not an ENETIP device.
      • Targeted device is not listening on the specified TCP port number (default is 44818).
      • Targeted device is out of TCP connections.

    2. ERR: NO REG SESS, which could indicate: the target device is out of EtherNet/IP connections.

IO Message Setup

(Shown using Structures)

  1. Enable: Enter a Boolean tag into this field in order to programmatically control the configured IO Message connection.
  2. Application Type:

    • Exclusive Owner - The Exclusive Owner Connection is a Class 0 or 1 connection to an Output connection point that allows the Scanner to send Output Data to the Target (O->T). The Target can also send Input Data to the Scanner (T->O). If the Input Data length is zero, then a 'heartbeat' connection point is used. The Target can only accept ONE connection to the specified Output connection point.
    • Input Only - The Input-Only Connection is a Class 0 or 1 connection to an Input connection point that allows the Target to send Input Data to the Scanner (T->O). The Scanner sends no Output Data to the Target, but rather maintains the connection using a 'heartbeat' connection.
    • Listen Only - The Listen-Only Connection is a Class 0 or 1 connection to an Input connection point that allows the Target to send Input Data to the Scanner (T->O). The Scanner sends no Output Data to the Target, but rather maintains the connection using a 'heartbeat' connection. The Listen-Only connection is dependent upon a non-Listen-Only connection (Exclusive Owner or Input-Only) for its existence. If the Exclusive Owner/Input-Only connection closes, the Listen-Only connection will also close or timeout. If a Target receives a request to open a Listen-Only connection while there is no existing Exclusive Owner/Input-Only connection, the Target will send an error to the Scanner and the connection will not open.
  3. Enable Routing: This field allows a routing parameter value to be entered. This field only allows a CPU slot number to be configured.
  4. Connection Online: Enter a Boolean tag into this field to indicate whether the IO messaging is active and communicating. If the IO Message has been enabled and the Connection Online tag is not true, look at the General Status, Extended Status and Status Description tags in order to try and ascertain why the connection was not successful. Also look at the TCP Connected tag to verify that the basic TCP/IP parameters have been configured correctly.
  5. General Status: This numeric tag will indicate an error value if the CIP Forward Open attempt was unsuccessful. This value is returned from the Adapter device so the documentation from the manufacturer of that device will need to be referenced.
  6. Extended Status: This numeric tag will indicate the extended error code (if applicable) that is being returned from the Adapter device. Reference the documentation from the manufacturer of that device for further information.

Note: Consult the server's documentation for the maximum message size in bytes to determine how many array elements are required. If the array size in bytes is smaller than the actual message size the remaining bytes will be discarded. Each extended status will be stored in their own array element.

  1. Status Description: This string tag contains a more descriptive explanation of the error being returned IF the error code is one of the standard EtherNet/IP error codes as defined by the specification from the ODVA. If the error code is not a standard error code, the string tag will contain the error code number in text format.
  2. Target to Originator (Input) Data:

  1. Delivery Option: Some adapter devices can be configured to Multicast their input data on the network or Unicast their input data back to the Originator (scanner) device. Some devices only support multicasting of input data. In some situations where the Adapter device supports both, it may be desired to have multiple devices consuming this data and it is more efficient to Multicast. Unicast tends to be more ‘quiet’ on most networks.
  2. RPI Time (msec): RPI stands for Requested Packet Interval. This establishes how often the input data (in milliseconds) will be sent back to the Scanner from the Adapter device. The smaller the value configured in this field, the more resource intensive it will be for both devices. See the EtherNet/IP Performance Calculation section for information on RPI restrictions.

  3. Connection Point: This field is where the Connection Point parameter for the desired input data block of the Adapter device is entered. This value is specific for the Adapter and must be ascertained from the manufacturer’s documentation of that device when not using its EDS file. The value is entered in decimal format or as an integer tag. There is a hexadecimal representation to the right of the entry field for convenience as many devices specify this parameter in that format.

  4. Run/Idle Header & Status: Some Adapter devices support run/idle status for the T->O direction. The Include Run/Idle Header check box enables the Run/Idle Status field and increases the message size by 4 bytes. Run/Idle Status is a Boolean tag (On = Run; Off = Idle) indicating the status of the Adapter device.

  1. Datatype: This is a read-only field that displays the data type of the selected Data Array. This helps to determine the size of the input data that needs to be configured in order to match the Adapter configuration.

Note: The number of bytes being requested will need to match the Adapter configuration or an error will be returned.

  1. Data Array: The array specified in this field will hold the input data received from the Adapter device. The size of the array must be sufficient to support the specified Number of Elements being requested. If the Number of Elements requested exceeds the array size, a warning will be given to correct this. Only single dimension arrays can be specified for this field.

  2. This is a read-only field that displays the number of elements in the specified Data Array.

  3. Number of Elements: This is an entry field to specify the number of array elements that will hold the input data returned from the Adapter device. The value is entered in decimal format or it can be an integer tag.

  4. Message Size (bytes): This is a read-only field that displays the size of the data configured by the specified array data type and the Number of Elements field in bytes.


  5. Data Type Number of Elements Message Size (Bytes)
    Integer 8-Bit 100 100
    Integer 16-Bit 100 200
    Integer 32-Bit 100 400
  1. Originator to Target (Output) Data:

  1. Include Status Header: Adds 4 bytes to the message
  2. RPI Time (msec): RPI stands for Requested Packet Interval. This establishes how often the output data (in milliseconds) will be sent to the Adapter from the CPU. The smaller the value configured in this field, the more resource intensive it will be for both devices. See the EtherNet/IP Performance Calculation section for information on RPI restrictions.

Note: The P-Series cannot produce output data any faster than the current scan time.

  1. Assembly Instance / Connection Point: This field is where the Connection Point parameter for the desired output data block of the Adapter device is entered. This value is specific for the Adapter and must be ascertained from the manufacturer’s documentation of that device when not using its EDS file. The value is entered in decimal format or as an integer tag. There is a hexadecimal representation to the right of the entry field for convenience, as many devices specify this parameter in hexadecimal format.

  2. Datatype: This is a read-only field that displays the data type of the selected Data Array. This helps to determine the size of the output data that needs to be configured in order to match the Adapter configuration.

Note: The number of bytes being requested will need to match the Adapter configuration or an error will be returned.

  1. Data Array: The array specified in this field will hold the output data being sent to the Adapter device. The size of the array must be sufficient to support the specified Number of Elements being requested. If the Number of Elements requested exceeds the array size, a warning will be given to correct this. Only single dimension arrays can be specified for this field.

  2. This is a read-only field that displays the number of elements in the specified Data Array.

  3. Number of Elements:This is an entry field to specify the number of array elements that will hold the output data sent to the Adapter device. The value is entered in decimal format or can be an integer tag.


  4. Data Type Number of Elements Message Size (Bytes)
    Integer 8-Bit 100 100
    Integer 16-Bit 100 200
    Integer 32-Bit 100 400

  1. Message Size from Array (bytes): This is a read-only field that displays the size of the data configured by the specified array data type and the Number of Elements field in bytes. If a tag is used in the Number of Elements field, the value in this field will be automatically updated to reflect the Message Size in bytes..


  2. Data Type Number of Elements Message Size (Bytes)
    Integer 8-Bit 100 100
    Integer 16-Bit 100 200
    Integer 32-Bit 100 400

  1. Config Data:

  1. Enable Configuration Data: The configuration data can be selectively chosen for each IO Message setup (CIP Forward Open). Enable this checkbox if configuration data is desired for the Adapter device.

  2. Assemble Instance/Connection Point: This field is where the Connection Point parameter for the desired configuration data block of the Adapter device is entered. This value is specific for the Adapter and must be ascertained from the manufacturer’s documentation of that device when not using its EDS file. The value is entered in decimal format or as an integer tag. There is a hexadecimal representation to the right of the entry field for convenience as many devices specify this parameter in that format.
  3. Array Tag: See Data Array below for additional details.
    Parameter Table: Allows user to enter a data type per parameter in table format. Right click to Add or Delete parameter(s). If Add Parameters is chosen, then enter the number of parameters needed for the configuration.

Once the number of parameters is configured, choose a data type and value for each entry.


  1. Datatype: This is a read-only field that displays the data type of the selected Data Array. This helps to determine the size of the output data that needs to be configured in order to match the Adapter configuration.
  1. Data Array: The array specified in this field will hold the configuration data being sent to the Adapter device. The size of the array must be sufficient to support the specified Number of Elements being requested. If the Number of Elements requested exceeds the array size, a warning will be given to correct this. Only single dimension arrays can be specified for this field.
  2. This is a read-only field that displays the number of elements in the specified Data Array
  3. Number of Elements: This is an entry field to specify the number of array elements that will hold the configuration data being sent to the Adapter device. The value is entered in decimal format or it can be an integer tag.
  4. Message Size (bytes): This is a read-only field that displays the size of the data configured by the specified array data type and the Number of Elements field in bytes. The Message Size is limited to 400 bytes.

  5. Data Type Number of Elements Message Size (Bytes)
    Integer 8-Bit 100 100
    Integer 16-Bit 100 200
    Integer 32-Bit 100 400

Note: The number of bytes being requested will need to match the Adapter configuration or an error will be returned.


Note: Device specific connections created from an EDS import may have preset parameter values, range limitations, and / or inhibited fields.


Explicit Message Setup

The Explicit Message setup is intended to establish a Connected Explicit Message connection (Class 3). The Explicit Message setup in the EtherNet/IP Client Properties is used in conjunction with an EtherNet/IP Explicit Message Instruction in the ladder code.

Note: If an unconnected Explicit Message is desired, no Explicit Message setup is required in the EtherNet/IP Client Properties dialog, only the general properties are required (at the top).

(Shown using Structures)

  1. Enable: Enter a Boolean tag into this field in order to programmatically control the configured Connected Explicit Message connection.

  2. RPI Time (msec): RPI stands for Requested Packet Interval. This establishes how often the Explicit Message (in milliseconds) will be sent to the Adapter from the CPU. The smaller the value configured in this field, the more resource intensive it will be for both devices. See the EtherNet/IP Performance Calculation section for information on RPI restrictions.
  3. Enable Routing: This field allows a routing parameter value to be entered. This field only allows a CPU slot number to be configured.
  4. Connection Online: Enter a Boolean tag into this field to indicate whether the Explicit Message connection is active and communicating. If the configured bit for the Enable field is true, the Explicit Message instruction is enabled and the Connection Online tag is not true, look at the General Status, Extended Status and Status Description tags in order to try and ascertain why the connection was not successful. Also look at the TCP Connected tag to verify that the basic TCP/IP parameters have been configured correctly.
  5. General Status: This numeric tag will indicate an error value if the CIP Forward Open attempt was unsuccessful. This value is returned from the Adapter device so the documentation from the manufacturer of that device will need to be referenced.
    • Exclusive Owner - The Exclusive Owner Connection is a Class 0 or 1 connection to an Output connection point that allows the Scanner to send Output Data to the Target (O->T). The Target can also send Input Data to the Scanner (T->O). If the Input Data length is zero, then a 'heartbeat' connection point is used. The Target can only accept ONE connection to the specified Output connection point.
    • Input Only - The Input-Only Connection is a Class 0 or 1 connection to an Input connection point that allows the Target to send Input Data to the Scanner (T->O). The Scanner sends no Output Data to the Target, but rather maintains the connection using a 'heartbeat' connection.
    • Listen Only - The Listen-Only Connection is a Class 0 or 1 connection to an Input connection point that allows the Target to send Input Data to the Scanner (T->O). The Scanner sends no Output Data to the Target, but rather maintains the connection using a 'heartbeat' connection. The Listen-Only connection is dependent upon a non-Listen-Only connection (Exclusive Owner or Input-Only) for its existence. If the Exclusive Owner/Input-Only connection closes, the Listen-Only connection will also close or timeout. If a Target receives a request to open a Listen-Only connection while there is no existing Exclusive Owner/Input-Only connection, the Target will send an error to the Scanner and the connection will not open.
  6. Extended Status: This numeric tag will indicate the extended error code (if applicable) that is being returned from the Adapter device. Reference the documentation from the manufacturer of that device for further information.

Note: Consult the server's documentation for the maximum message size in bytes to determine how many array elements are required. If the array size in bytes is smaller than the actual message size the remaining bytes will be discarded. Each extended status will be stored in their own array element.

  1. Status Description: This string tag contains a more descriptive explanation of the error being returned IF the error code is one of the standard EtherNet/IP error codes as defined by the specification from the ODVA. If the error code is not a standard error code, the string tag will contain the error code number in text format.

Explicit IP Performance Calculation

If the RPI is modified from the default of 250, the following warning will be displayed. Since the CPU supports a maximum of 5120 EtherNet/IP packets per second, you will need to ensure this maximum is not exceeded by using the formula below:

Formula: Number of Connections *(2 *(1/RPI)) <= 5120

Note: RPI is in units of milliseconds (msec).

Example: If you are using 128 Connections (Max. # of Connections = 32 * 4 connections) and all connections are set to 50 msec RPI.

Example Formula: 128*(2*(1/.050) = 5120

The example below shows how a Class 3 Explicit Message might be accomplished from a 3rd party device (Allen Bradley PLC). As you can see the Input Data must be retrieved in 1 connection or message and the output data in another. Remember that Class 3 messaging is not as efficient in protocol messaging as Class 1 but it does allow for granular control.

Note: In this example, size configuration is not shown on the Scanner side. The tag created for the Destination must be large enough to contain the data requested (shown with dashed boxes).

This example shows how to connect the Productivity Suite Scanner function to an EtherNet/IP adapter device using Class1 IO Messaging. First, create an EtherNet/IP device in the Hardware Configuration as seen below:

Configure the parameters to match the settings of the Adapter device. The image below shows the setup of the Input data. The size, in this case, is dynamic to the configuration of the device. For this particular example, we configured the device in a manner that allows it to publish 394 bytes of data for Input. Many devices will have a fixed configuration, this can found in the manufacturer’s documentation.


The Output data must also be configured. Its data is also dynamic based upon the configuration. In our example, we configured the device in a manner that caused it to require 260 bytes of Output data.


The image below shows the setup for the Configuration data. The Configuration data, for most devices, is a fixed size. Some devices will require that the Configuration data Connection Point be included in the Forward Open message (as shown below) even if the size is 0. Some devices will require that the Configuration data Connection Point not be in the Forward Open and the checkbox option in the image below would need to be deselected.



The following example shows how to connect the Productivity Suite Scanner function to an EtherNet/IP adapter device using Class 3 Explicit Messaging. As with IO Messaging, an EtherNet/IP device must be created in the Hardware Configuration as seen below:

Explicit Messages can be performed in 2 ways: Unconnected or Connected (Class 3). The advantage of using Unconnected messaging is it allows more discrete control of each request. The disadvantage of Unconnected messaging is that Unconnected messages have a lower priority and will take longer to get serviced on some devices. Connected messages get serviced faster since there is a connection established to the device. If Connected messaging is desired, create an Explicit Message tab as shown in the image above. If Unconnected messaging is desired, do not create an Explicit Message tab. Only fill out the information in the upper portion of the EtherNet/IP Client Properties window.


Once the desired parameters have been entered, the device may now be referenced in the Explicit Message Instruction. If Unconnected messaging has been selected, choose the Unconnected MSG option in the Connection drop down box. If Connected messaging has been selected, choose the Explicit Message that was configured in the EtherNet/IP Client Properties window in the Connection drop down box. The rest of the settings should be matched to the specifications documented by the manufacturer. An example for requesting the Identity of a device is shown below. The data array configured for this function must be sufficient in size to hold the returned data from the device for this object. Data can also be written to the device if it supports an object for this purpose. If data is being written, enable the Output selection and specify the data array and size required by that device’s object.


Related Topics Link IconRelated Topics