Skip to main content
Skip table of contents

EtherNet/IP

EtherNet/IP is one of the leading industrial network protocols. It adapts the Common Industrial Protocol (CIP) to standard Ethernet.

In the CIP object model, data within a device is organized in an object-oriented manner:

  • Class/object: A class is a category of objects that represent the same type of system component (for example, an Identity Object that describes who the device is, or an Assembly Object that groups process data).

  • Instance: An instance is a specific copy of that class within a device (for example, Assembly Instance 101 might be defined as the input data block).

  • Attribute: An attribute is an individual property of an object instance (for example, a sensor reading, a configuration parameter, or a status flag).

The CIP object-oriented view of the application data can be illustrated as follow:

Ethernet_IP_overview.png

Example

In the CIP format, you can define the order in which data appears in the assembly. For example, you can select roll, pitch, and heave as shown in the table below. Then roll will be the first 4 bytes, pitch the next 4 bytes, and heave the last 4 bytes. The size of the assembly is 12 bytes. Note that the data is written as a raw bytestream, and access to the data is atomic, which means that all the data must be read at once. On the PLC, the assembly is created as an array of a single, fixed data type.

Parameter

Byte offset

Data type

Unit

Numerical value

Roll

1-4

Single precision float (IEEE 754)

[deg]

2.34

Pitch

5-8

Single precision float (IEEE 754)

[deg]

-1.47

Heave

9-12

Single precision float (IEEE 754)

[m]

-0.87

Let's examine how the roll value (2.34 degrees) is retrieved from the input assembly.

Parameter

Data type

Unit

Byte No.

Byte value (U8) binary

Numerical value

Roll

Single precision float (IEEE 754)

[deg]

1

01000000

2.34

2

00010101

3

11000010

4

10001111

These four bytes form a 32-bit binary word. The full 32-bit IEEE 754 floating-point representation is: 01000000 00010101 11000010 10001111.

IEEE 754 single-precision floating-point numbers are structured as follows:

Bit position

Component

Extracted bits

Bit 1

Sign (S)

0 (positive)

Bits 2-9

Exponent (E)

10000000 (decimal: 128)

Bits 10-32

Mantissa (M)

00101011100001010001111

The roll value is computed using the IEEE 754 formula:

Roll value = (-1)s x 1.M x 2(E-127) = (-1)0 x 1.001010111000010100011112 x 2(128−127) = 1.1702025 x 21 = 2.340405.

Due to rounding errors, the final roll angle is 2.34 degrees.

Little-endian

For the CIP format, multi-byte values are usually transmitted in little-endian order. This means that in a packet capture (e.g., using Wireshark) you will see the least significant byte first. The PLC reassembles these bytes internally into the correct 32-bit IEEE 754 word before interpreting the float value.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.