Skip to main content

EtherNet/IP (Logix)

The EtherNet/IP driver reads and writes tags of Allen-Bradley ControlLogix and CompactLogix PLCs by their names, with CIP explicit messaging. For what all drivers have in common, see How drivers work.

Protocol and role​

RoleClient. YTCC connects to the PLCs and reads tags by name.
TransportEtherNet/IP explicit messaging over TCP (unconnected)
Default port44818
Devices per driverAny number; each PLC has its own session.
PLCsControlLogix and CompactLogix (Logix tags).
Driver typeEtherNet/IP (ethernetip)

Device parameters​

Set these on the device in Drivers → devices (see Add drivers and devices). An empty box uses the default shown in it. The help mark next to each parameter shows a short description.

New device form of an EtherNet/IP device with Device key, Name, Description, Batch size, Cmd timeout (ms), Connect timeout (ms), Host, Max packet bytes, Poll interval (ms), Port and Request timeout (ms).

ParameterDefaultRangeMeaning
Host— (required)IP address or host nameAddress of the CompactLogix, or of the Ethernet module in a ControlLogix rack.
Port448181–65535EtherNet/IP port.
Slotempty0–17Slot of the CPU in a ControlLogix rack. Leave empty for a CompactLogix.
Connect timeout (ms)3000100–60000How long the driver waits when it connects.
Request timeout (ms)5000100–60000How long one request may take; a longer wait counts as a lost connection.
Poll interval (ms)100010–3600000Read period for signals without their own scan class.
Batch size201–200Most tags read in one request.
Max packet bytes504504–4000Largest request; 504 works on every Logix PLC.
Cmd timeout (ms)5000100–600000How long a command may wait before it is rejected as expired.
Set invalid on disconnectonon / offWhen the connection is lost, mark all signals of the PLC as Bad · Not connected.

Changing Host, Port, Slot, Batch size or Max packet bytes reconnects that PLC; the other parameters take effect without dropping the connection.

Signal address​

Set the address on the Value source tab of the signal, under Address — EtherNet/IP: the Tag path and the Data type. The tag path is the tag name as in the PLC program, without spaces:

Tag pathMeaning
Motor1_SpeedController tag
Program:MainProgram.CounterProgram tag
Recipe[3]Array element
Line.Motor[2].SpeedMember of a user-defined type
StatusWord.5Bit 5 of an integer tag; the data type must be BOOL

In import files, write the tag path in the address column.

Data types​

Data typeValue in YTCC
BOOLOn or off
SINT, INTInt16
DINTInt32
LINTInt64
USINT, UINTUInt16
UDINTUInt32
ULINTUInt64
REALFloat32
LREALFloat64
STRING (standard, 82 characters)Text

The data type must match the type of the tag in the PLC: if the PLC returns another type, the signal is Bad. For STRING, set "data_type": "string" in Advanced: raw params (JSON). To read a user-defined type, bind each member as its own signal.

Reading​

The driver groups the signals of a PLC by read period and reads them in batches of up to Batch size tags, as long as the answer fits Max packet bytes. Signals with the same tag path are read once. If a batch is refused, for example because one tag does not exist, the driver reads its tags one by one; a tag that still fails is retried on its own every 30 seconds, so it does not slow down the others.

Values are published when they change.

Writing​

A signal can be written when its Access is Read / Write or Write only. The value is converted to the Data type: integers are checked against their range, a fraction for an integer type is rejected, a BOOL takes 0 or 1. Scaled values are converted back before writing.

  • Write to a separate BOOL tag. A signal on a bit of an integer (StatusWord.5) or on an element of a BOOL array (Flags[3]) stays read-only.
  • A command waiting longer than Cmd timeout (ms), or sent while the PLC is not connected, is rejected.
  • Writes are never repeated. If the connection breaks during a write, the result is No response from device and the PLC may or may not have taken the value; set a read-back on the signal.

For how operators send and confirm commands, see Send commands.

Quality​

SituationQuality
The tag was read and has the right typeGood
The tag does not exist, access is refused or the type differsBad; the last value stays
The connection is lostBad · Not connected (with Set invalid on disconnect); the last value stays

The time of a value is the time it was read; the PLC sends no time stamp.

Reconnecting​

After the connection is lost, the driver tries again after 100 ms and doubles the wait up to 20 seconds. Commands during that time are rejected at once.

Diagnostics​

Read now on the Value source tab reads the tag once through the PLC's session:

TextMeaning
A value and the PLC typeThe PLC answered
Tag path is missingNo tag path
Bit address '…' needs data_type boolA bit address with another data type
No connection to …The PLC is not connected
Timeout — no response from … within … msThe PLC did not answer
CIP error — … (tag …, device …)The PLC refused the read, for example because the tag does not exist
Decode error — Type mismatch — the point is Dint, the PLC returned REALData type does not match the tag
SymptomLikely cause
The PLC does not connectWrong host; for ControlLogix, wrong Slot or the IP of the CPU instead of the Ethernet module
One signal BadTag name misspelled, tag not in the controller or program scope, wrong Data type
All values slowMax packet bytes larger than the PLC accepts: batches are refused and tags are read one by one
Signal on a custom string type or a whole user-defined type is BadThe tag is not of a type in Data types; use a standard STRING or bind the members as their own signals

Supported services​

ServiceSupported
Register session, unconnected send with routeYes
Read tagYes
Write tagYes
Multiple service packet (batched reads)Yes