WriteEIP

Writes data to remote client devices using EtherNet/IP protocol. EtherNet/IP is an application-level protocol implemented on top of Ethernet and TCP/IP protocols, allowing the transfer of data in industrial environments over the Ethernet. For more information on the EtherNet/IP protocol, go to odva.org.

The data will be sent to the client device within one Request Packet Interval (RPI). The RPI frequency is set by the client device.

Note:
  • For In-Sight vision systems running In-Sight 5.1.0 and later firmware, when a job containing this function is loaded, an error message will be displayed, because this function is not present in In-Sight 5.1.0 or later firmware. This function should be replaced by the WriteResultsBuffer function. For more information, see WriteResultsBuffer.
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
  • Although an In-Sight vision system can communicate with more than one device at the same time using EtherNet/IP protocol, there can only be one bi-directional implicit connection.
  • An In-Sight vision system can act as a server only; it will not initiate a connection to another device. The Assembly data configuration must be specified on the client device. For more information, see In-Sight Assembly Data Configuration (Implicit Messaging).
  • Only one WriteEIP function should be placed in the spreadsheet. Multiple WriteEIP functions may overwrite data waiting to be sent in the flash memory buffers.
  • RPI frequencies of less than 10ms may impact the performance of some vision tools.
  • In-Sight vision systems support both Explicit and Implicit EtherNet/IP messaging. ClosedSee Example.

    ReadEIP($A$0, "0d:4d:8s") in cell A4, reads 2 32 bit integers and a null terminated string from the PLC.

    GetBufferData($A$4, 0) displays the first 32 bit integer.

    GetBufferData($A$4, 1) displays the second 32 bit integer.

    GetBufferData($A$4, 2) displays the string.

  • Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.
  • For more information, see Communicate with a Rockwell SLC 5/05 PLC.

WriteEIP Inputs

Syntax: WriteEIP(Event,MapSpec,Value1,[Value2,...])

Parameter Description

Event

Specifies the event that forces an update.This parameter must be a reference to one of the following:
  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
Note: When the default Event reference is deleted, the value is replaced by a checkbox. If another cell is referenced as an event, the function will conditionally run based on the referenced cell. If the checkbox is enabled, the function will always run when any inputs to the function are updated.

MapSpec

Specifies a data mapping, which consists of a list of specifiers delimited by colon characters. Each specifier has two parts: the starting byte and a data type code. Supported character codes include:

Code Data Type

i

8-bit integer

il

16-bit integer

d

32-bit integer

f

32-bit floating-point number

s

Text string

For example, "0i:1f:5d:9s" specifies that the first data item (at offset 0) is an 8-bit integer; the second item (at offset 1) is a floating-point value; the third (at offset 5) is a 4-byte signed integer; and the rest of the packet (starting at offset 9) is a string.

Note: The maximum length for output data is 492 bytes.

Value

Specifies a variable-length list of values consistent with the MapSpec (Value1, Value2, ...)

WriteEIP Outputs

Returns

The number of elements written or #ERR if an input parameter is invalid, or if a connection to a client has not been established.