Troubleshooting
Fixing a TwinCAT EtherNet/IP slave connection from an Omron PLC
Short answer
The CIP1 fault is a Forward Open mismatch: each Omron direction must carry the full serialized TwinCAT assembly, not the process variables alone. With 2 bytes in and 2 bytes out, the 4-byte ConnCtrl on outputs and ConnState on inputs make each direction 6 bytes, and the instances must follow producer and consumer roles. If a capture shows the request and a rejection, read the sizes and instances the originator actually serialized.
On this page
The Omron fault clears when each direction of the tag data link carries the full serialized size of its TwinCAT assembly — process variables plus the overhead member TwinCAT adds — and when the assembly instances are assigned by producer and consumer role rather than by the words input and output. In this setup TwinCAT maps a 32-bit ConnCtrl member into the outputs and a 32-bit ConnState member into the inputs; each adds 4 bytes, so 2 bytes of process data in each direction makes each connection 6 bytes. Sizes of 2, 5 or 7 bytes keep the Forward Open request refused with the same CIP1 fault.
What error CIP1 is telling you #
Sysmac Studio reports the fault as "Tag data link connection establishment failed. (1) Tag data link connection information is not the same for the originator and the target.", Error CIP1. The fault fires during connection establishment: the Omron CPU, the originator (scanner), sends a CIP Forward Open request to the Beckhoff IPC, and the device configured as "TC EtherNet/IP Slave" answers as the target (adapter) by refusing the requested parameters. Cyclic I/O has not started, so nothing about your application mapping has been tested yet — this is purely a connection-definition disagreement.
Beckhoff documents the EtherNet/IP Adapter (slave) function as TF6280 and the EtherNet/IP Scanner function as TF6281. With the Omron originating, the IPC must be running the adapter function, so confirm that first; a scanner function on the IPC side has nothing for an originator to open.
Every scanner-to-adapter pair fails this way when the originator's connection definition disagrees with the target's assemblies. It is the same mismatch you close when starting a PowerFlex 700 over EtherNet/IP from a CompactLogix, except there the vendor fixes the assemblies; here you generated the target's definition yourself, so the EDS and the live mapping can drift apart.
What TwinCAT adds to each assembly #
When the slave builds its I/O assemblies, TwinCAT automatically maps two connection-management members into them:
- ConnCtrl, a 32-bit member mapped into the outputs — the data the adapter consumes.
- ConnState, a 32-bit member mapped into the inputs — the data the adapter produces.
Each member serializes to 4 bytes. They are working connection data, not padding, so they count toward the assembly size the originator must request. The serialized size of an assembly is the sum of every member mapped into it, user variables and automatic members together.
Match directions by producer and consumer #
Input and output are viewpoint words. An output at the Omron scanner is data the Omron produces and the TwinCAT adapter consumes; an input at the Omron is data the adapter produces and the Omron consumes. Compare producer and consumer roles, never the labels alone.
| Omron direction | Who produces | TwinCAT assembly to use | Size to request |
|---|---|---|---|
| Output | Omron produces, adapter consumes | The assembly holding ConnCtrl | Its serialized byte total |
| Input | Adapter produces, Omron consumes | The assembly holding ConnState | Its serialized byte total |
The EDS from the TwinCAT EDS Builder contains the instance numbers — 101 and 102 in this configuration — but an instance number alone does not say which direction it serves. The mapping does: whichever assembly carries ConnCtrl is the consumed one, and whichever carries ConnState is the produced one. Working instance numbers and byte sizes out of a device's assembly definition is the same task as finding assembly instances and sizes on another EtherNet/IP adapter, and the method transfers.
Because both directions serialize to the same byte count here, a swapped instance pair can pass the size check and open a connection with the members crossed — ConnCtrl landing where you expect status, your process bytes displaced inside the area. Assign the instances by role from the mapping; do not find them by trying both combinations.
Sizing the Omron tag data link for 2 bytes in and 2 bytes out #
Inputs, all from the TwinCAT slave configuration that produced the fault:
- Output process data: 2 bytes, the variables created in the mapping.
- Input process data: 2 bytes, from the same mapping.
- ConnCtrl: a 32-bit member in the output assembly, 32 bits / 8 = 4 bytes.
- ConnState: a 32-bit member in the input assembly, 4 bytes.
Rule, in words: the connection size for a direction is the sum of the serialized sizes of every member the mapping places in that direction's assembly.
Arithmetic:
- Output direction: 2 bytes of process data + 4 bytes of ConnCtrl = 6 bytes.
- Input direction: 2 bytes of process data + 4 bytes of ConnState = 6 bytes.
Result: 6 bytes in each direction.
Decision: set the Omron output size to 6 bytes and the input size to 6 bytes, with the ConnCtrl assembly on outputs and the ConnState assembly on inputs. The values already tried — 2 bytes, which counts process data only, and 5 or 7 bytes, which are totals an earlier EDS carried from an earlier mapping — all fail, because the adapter refuses any direction whose requested size differs from the assembly it presents. A direction is accepted only at its assembly's exact serialized byte count; with both directions at 6 bytes and the instances assigned by role, the Forward Open matches the target and the link establishes.
Rebuild the connection from one frozen layout #
Do the whole rebuild from one frozen TwinCAT layout so no stale definition survives:
- Finish the TwinCAT mapping first — your process variables plus the automatically mapped ConnCtrl and ConnState members — and change nothing after this step.
- Record each assembly's instance number, which member it holds, and its serialized byte count.
- Generate the EDS with the TwinCAT EDS Builder from exactly that configuration.
- Install that EDS in Sysmac Studio.
- Recreate the tag data link: ConnCtrl assembly on the output direction, ConnState assembly on the input direction, each direction sized to the recorded count, with Omron variables covering the full assembly area.
- Delete any link entry still based on an older EDS.
- Apply the configuration and watch the link establish.
Apply the change with the machine in a safe state: rebuilding the link drops cyclic I/O to the TwinCAT device until it re-establishes.
Confirming the fix in a packet capture #
Run Wireshark on a network tap or a mirrored switch port so the capture sees both directions of the conversation; a capture point that only ever sees one side is the usual reason a capture looks inconclusive.
- No Forward Open request from the Omron on the wire: the originator never sent it. Check the destination address against the IPC interface the slave is bound to, and that the link is set to run.
- A request but no reply: the path or the adapter. Check cabling and the adapter state on the IPC.
- A request and an error reply: a parameter mismatch. Open the request itself and read the connection sizes and instance numbers the originator actually serialized, then compare them with the frozen layout. The request is the honest copy — a stale value shows up there even when the editing screen shows the number you intended.
Explicit CIP exchanges run outside this cyclic connection — reading and writing Logix tags from CODESYS with CIP GenericService is that kind of traffic — so explicit messages that succeed beside a refused tag data link put the fault on the connection definition, not on reachability.
The fix is proven when the capture shows the Forward Open accepted and cyclic packets repeating both ways. Only then does the order of your application bytes inside each 6-byte area become worth tuning.
Questions asked
Why does my EDS show 5 or 7 bytes when the assemblies should be 6 bytes each way?
An EDS file describes the mapping that existed when it was generated. If process variables, member order, or the automatically mapped ConnCtrl and ConnState members changed after generation, the old byte totals survive in the file and no longer describe the running configuration. Regenerate the EDS from the final TwinCAT mapping, reinstall it in Sysmac Studio, and read each assembly instance's size from that file rather than from the variable widths you entered.
Do I add both 4-byte members to both directions?
No. TwinCAT maps ConnCtrl into the output assembly and ConnState into the input assembly, one 4-byte member per direction. Adding both members to both directions inflates each connection size by 4 bytes and the adapter refuses the Forward Open again. Size each direction as the sum of only the members the current mapping places in that assembly.
How do I know whether instance 101 is the input or the output?
Read it from the EDS you generated and from the TwinCAT mapping, not from the number. The EDS export contains the instance numbers, but the number alone does not fix the direction; the mapping tells you which assembly carries ConnCtrl and which carries ConnState. Assign the ConnCtrl assembly to the Omron output direction and the ConnState assembly to the Omron input direction.
The sizes now match and the fault is still CIP1. What next?
Capture the exchange. The Forward Open request shows the instance numbers, both connection sizes, and the other timing parameters the originator actually serialized, which can differ from what the editing screen suggests. Delete the tag data link and recreate it from the reinstalled EDS so no stale definition survives, then compare the request fields against the TwinCAT assemblies line by line. A request that never appears on the wire is an originator or path problem, not a size problem.
Do the 4-byte members change the variable layout on the Omron side?
Yes. The tag data link area must cover the full 6 bytes per direction, even though your process data is only 2 of them. Declare the Omron-side variables to the full assembly size and pick your 2 process bytes out of that area; which offset they occupy follows the member order of the TwinCAT mapping, so confirm it there before wiring program logic to a byte position.