Resolving Omron FINS Ethernet AdvancedHMI Read/Write Errors

James Nishida12 min read
HMI ProgrammingOmronTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Resolving Omron FINS Ethernet AdvancedHMI Read/Write Errors

This field-proven guide addresses the most common communication failures between AdvancedHMI (AHMI) and Omron CP1/CJ1/CJ2 series PLCs over FINS Ethernet. Symptoms covered include the BasicLabel not displaying live values, the driver sending values 0–3 correctly but failing from 4–9, BCD interpretation of binary data, and bit addresses such as W1.01 raising the runtime error Input string was not in a correct format. Each problem is mapped to its root cause in the OmronFINSEthernetCom driver and the underlying FINS/UDP protocol stack.

Affected software: AdvancedHMI driver OmronFINSEthernetCom versions prior to 3.97d. The fix for the keypad write bug is included in 3.97d and later. Always confirm the assembly version referenced in the Visual Studio Solution Explorer before troubleshooting.

1. FINS Protocol Architecture on CP1/CJ1 Controllers

FINS (Factory Intelligent Network Service) is Omron's application-layer protocol used across the CP1, CJ1, CJ2, CS1, and NJ/NX series. Over Ethernet, FINS rides on UDP port 9600 by default and uses a four-byte service ID (0x80 0x00 0x02 0x00 for the CP1H CPU unit). A typical FINS request to read the Work area looks like the frame in the table below.

Offset Bytes Field Typical Value
0 4 FINS Service ID 80 00 02 00
4 4 Destination Network 00 00 00 00 (local)
8 1 Destination Node 00FE
9 1 Destination Unit 00 (CPU)
10 2 Source Network 00 00
12 2 Source Node / Unit / CPU 00 00 00
15 1 PC link / SID 00
16 2 Command (MRC/SRC) 01 01 (memory area read)
18 2 Memory Area Code B1 = W, 82 = D
20 2 Starting Address little-endian, e.g. 64 00 = W100
22 2 Number of Items 00 01 for one word

The corresponding FINS memory-area codes that the AdvancedHMI driver must translate user-friendly addresses into are listed below.

Prefix Area FINS Code Word/Bit Read Cmd Write Cmd
W Work B1 Word / Bit 0101 0102
D Data Memory (DM) 82 Word / Bit 0101 0102
CIO / 0 Core I/O B0 Word / Bit 0101 0102
H Holding Relay B2 Word / Bit 0101 0102
A Auxiliary Relay B3 Word / Bit 0101 0102
T Timer PV 89 Word 0101 0102
C Counter PV 89 (bank-switched) Word 0101 0102
EM Extended Memory (CJ2/NJ) A0BC Word 0101 0102

Reference: Omron Industrial Automation product portal and the CP1H CPU Unit Operation Manual (W450), available through MyOmron at https://www.myomron.com/.

2. Symptom Matrix

# Symptom Likely Root Cause Section
S1 BasicLabel shows nothing at all No FINS response, possible multi-client lockout §3, §7
S2 Keypad writes 1, 2, 3 correctly; 4–9 appear as 0–3 BCD conversion bug, fixed in 3.97d §6
S3 Read of W100 works, W101 returns 0 Word count not incremented after the first word §6
S4 Bit address W1.01 raises "Input string was not in a correct format" Bit parsing expects two-digit, no leading dot §5
S5 CX-Programmer and AHMI cannot coexist CJ1 serial-over-Ethernet bridge conflict §8
S6 FINS frame sent, no reply captured in Wireshark TargetNetworkAddress / TargetNodeAddress mismatch §9
S7 Read returns 0x9696… pattern on every register Number of items = 0x9696 (decimal 38502) passed through §6

3. Driver Configuration Prerequisites

  1. Open Visual Studio and create a Windows Forms Application.
  2. From the Toolbox, drag OmronFINSEthernetCom onto the form.
  3. In the Properties window, set the following fields to match the CP1H/CJ1 CPU's IP configuration:
Property Required Value Notes
IPAddress CPU IP, e.g. 192.168.250.1 Must match the ETN21 / CP1W-CIF41 module
Port 9600 Default FINS/UDP port
TargetNetworkAddress 0 Local network; CP1H/CP1L default is 0
TargetNodeAddress Last octet of CPU IP, decimal Set to 0 for local CPU and confirm
TargetUnitAddress 0 CPU unit
SourceNetworkAddress 0 PC side
SourceNodeAddress PC last octet Must be unique on the FINS network
TreatAsHex False Set True only when reading ASCII / hex-coded data
PLCAddressValue (BasicLabel) e.g. D0, W100, 200.00 Uppercase prefix, no leading zero

For CP1H Ethernet (model CP1W-CIF41) the module must be enabled in the PLC's Built-in Ethernet Port Settings tab of CX-Programmer, with FINS/UDP ticked and the IP address visible on the front of the unit. For CJ1W-ETN21 modules, confirm the Node Address Setting Switches on the front panel match TargetNodeAddress.

4. Why "Nothing Displays" in the BasicLabel

If a Wireshark trace shows the FINS read request leaving the PC (frame size 28 bytes for a single-word read) but no UDP 9600 response comes back from the PLC within ~3 s, the most common causes are listed in order of frequency.

  1. CX-Programmer holds the FINS port. Older CJ1 firmware (v3.0 and earlier) refuses a second UDP socket. Close CX-Programmer entirely, or use a separate Ethernet card to attach to CX-Programmer while AHMI talks to a second ETN21.
  2. Windows Firewall blocks inbound UDP 9600. Create a new inbound rule for OmronFINSEthernetCom.exe on UDP 9600, or disable the firewall for the local subnet during commissioning.
  3. CPU is in PROGRAM mode with a fatal FINS error. Read the CPU's A401.07 (FINS Protection Flag). If set, the ETN21 responds with the FINS end code 0x0202 — operation prohibited at this time.
  4. Sub-net mismatch. The PC's IP must be on the same subnet mask as the CPU (e.g. 255.255.255.0). Multicast routing is not supported on CP1W-CIF41.
End-code decoder: If Wireshark shows a FINS response, the trailing two bytes are the main/sub end codes. The most common ones to expect are 0x0000 (normal), 0x0201 (destination node unreachable), 0x0202 (prohibited at this time), and 0x1101 (area code or address error).

5. Bit Address Format Issues ("Input string was not in a correct format")

AdvancedHMI's BasicLabel parses bit addresses as {AREA}{WORD}.{BIT} using the exact two-digit bit position. The driver uses a Convert.ToInt16 call on the bit portion, so W1.01 raises FormatException because the period is not a valid integer character.

Use the following rules when filling PLCAddressValue:

  • Work area bit: W100.00 through W511.15 (dot plus two digits).
  • CIO area bit (most common, often written without prefix in CX-Programmer): 200.00, 100.00.
  • DM bit: D200.00D32767.15 on CJ1; CP1L limits DM to D0–D9999.

The driver wraps the parser in a try/catch that re-throws the FormatException. The patch below makes the driver tolerant of single-digit bit indices and of the alternative W100/00 notation used in some CX-Programmer exports.

// FINSBaseCom.vb — tolerant address parser
Private Function ParseAddress(raw As String) As FinsAddress
    Dim s = raw.Trim().ToUpper()
    Dim bitIdx = s.IndexOf("."c)
    If bitIdx = -1 Then
        bitIdx = s.IndexOf("/"c)   ' accept "W100/00" too
    End If
    If bitIdx > 0 Then
        Dim area = Left(s, bitIdx)
        Dim bitTxt = s.Substring(bitIdx + 1).PadLeft(2, "0"c)
        Dim bit As Integer
        If Not Integer.TryParse(bitTxt, Globalization.NumberStyles.Integer, _
                                Globalization.CultureInfo.InvariantCulture, bit) Then
            Throw New FormatException("Invalid bit index in '" & raw & "'")
        End If
        Return New FinsAddress(area, 0, bit)
    End If
    Return New FinsAddress(s, 0, -1)
End Function

6. The Keypad Bug: 0–3 OK, 4–9 Become 0–3 (Driver < 3.97d)

Field reports show a keypad address such as W100 storing 1, 2, and 3 correctly but mapping 4, 5, 6, 7, 8, and 9 to 0, 1, 2, 3, 4, and 5 respectively. The pattern repeats: 8, 9, 10, 11 all return correctly, and 100, 101, 102, 103, 104 also read back correctly — except W101, which the application never re-polls after the first read of W100.

The root cause is in the keypad write path of BasicLabel where the integer entered is converted using Convert.ToString(value, 16) and then re-read with Convert.ToInt16(text, 16). Values ≥ 16 cause wraparound if the receiving register is interpreted as BCD. The driver does not use BCD; the PLC does, because the affected data area was declared as BCD(4) in the CX-Programmer symbol table.

Fix 1 (driver): Upgrade to AdvancedHMI driver 3.97d or later. The keypad write path was changed to send the raw binary word with the Memory Area Write command 0x0102 and to mark the value as DEC in the FINS body.
Fix 2 (PLC, no upgrade): In CX-Programmer, open the data type for the destination word and change it from BCD to DEC (DECIMAL), or move the value into a non-BCD area such as D100. Verify by writing 65535 (0xFFFF) with the keypad and confirming a decimal read back of 65535.

Verification of the keypad fix

  1. Drop a BasicButton on the form. Set PLCAddressClick to 200.00.
  2. Run the application in Debug mode and click the button. Execution should pause in FINSBaseCom.vb at the SendRequest call.
  3. Inspect commandBuffer; the last two bytes should be 01 02 (Memory Area Write) followed by 00 02 (two bytes of payload) and the binary word.
  4. Confirm with Wireshark that the FINS request body uses the BCD bit clear in the area code byte (lowest two bits = 00 = binary).

7. Stale FINS Responses and the TargetNetworkAddress Pitfall

If the response carries end code 0x1101 (destination address error), the driver is sending a valid FINS request to the wrong node. CP1H/CJ1 controllers default to network 0 and node 0 when the ETN21 has not had its rotary switches moved, regardless of the IP address's last octet. To confirm the node:

  1. Connect with CX-Programmer over USB or the same Ethernet link.
  2. Read CIO 225 and CIO 226 (network and node number set in the ETN21's CPU Bus Unit Settings).
  3. Set the driver's TargetNodeAddress to that value and run the read test again.

If the response carries end code 0x0000 but no payload, the PLC processed a write from another FINS client (often CX-Programmer's auto-refresh). This is normal and does not indicate a driver defect.

8. Coexistence with CX-Programmer

The CP1L / CP1H Ethernet Communication Manual (W466) confirms that on the CP1W-CIF41 module only one FINS client at a time may use the UDP/9600 socket when FINS Protection is enabled. Symptoms include AHMI receiving an empty FINS frame and the BasicLabel freezing on the previous value. The recommended practice is to leave FINS Protection disabled during AHMI development and to either:

  • Connect CX-Programmer over USB (CP1W-CIF41-C USB port) while AHMI uses Ethernet, or
  • Add the PC's IP to the FINS routing table (ETN21 Setup > FINS/UDP Table) with a high priority so AHMI always wins the socket.

For CJ1W-ETN21 modules, the same rule applies but the protection bit is CIO 226.15. Always stop CX-Programmer's background transfer (ladder monitor, I/O comment upload) before starting AHMI in run mode.

9. Wireshark Capture Recipe for FINS Debugging

  1. Start Wireshark on the PC's Ethernet interface. Apply the display filter udp.port == 9600.
  2. Trigger a read in AHMI by toggling the BasicLabel's Refresh property or forcing a write from the keypad.
  3. Inspect the first packet — it should be a UDP datagram of 26 bytes from the PC to the CPU IP, sport 9600, dport 9600. If it is missing, the driver is failing before UdpClient.Send.
  4. Inspect the second packet. If it is a FINS ACK (FINS Service ID = 80 00 02 00, end code 0x0000), the read succeeded but the AHMI parser dropped the data. Patch the parser to honour the FINS header version (the 0x80 0x00 pair at offset 2) and the read quantity.
  5. If there is no response within 3 s, run plcmon (Omron CX-Programmer's monitoring tool) and watch the FINS traffic. CX-Programmer will show a No Response from Node dialog with the same symptom.

Save the trace and share the first eight bytes of the request and the full response payload when escalating. The advancedHMI project's GitHub issues page collects these traces for the maintainers.

10. Memory Area Address Cheat Sheet for AHMI

AHMI string PLC area Word range Bit range Use
0 or CIO0 CIO 0–6143 0.00–6143.15 I/O & general
W0 Work 0–511 W0.00–W511.15 Internal scratch
H0 Holding 0–511 H0.00–H511.15 Battery-backed
A0 Auxiliary 0–959 A0.00–A959.15 System flags
D0 Data Memory 0–32767 (CJ1) / 0–9999 (CP1L) D0.00–D... General data
T0 Timer PV 0–4095 Elapsed value
C0 Counter PV 0–4095 Current count
EM0_0 EM bank 0 0–32767 EM0_0.00–... CJ2 / NJ

11. Recommended Verification Procedure

  1. With AHMI closed, use CX-Programmer to put a known value (e.g. 1234 in DEC) into D100. Confirm with a CX-Programmer watch window.
  2. Start AHMI. Set the BasicLabel's PLCAddressValue to D100. Run.
  3. Confirm the BasicLabel shows 1234. If yes, the FINS read pipeline is functional.
  4. Change PLCAddressValue to W100.00. Toggle the bit from CX-Programmer (force-on, then force-release). Confirm the label changes between 0 and 1.
  5. Use the keypad to write values 1, 5, 9, 100, 1023, and 65535. Confirm each writes correctly. This is the definitive test for the 3.97d BCD bug.
  6. Run for one hour and confirm no FormatException or ObjectDisposedException is raised. If a disposed UdpClient is observed, enable KeepAlive in the driver properties or upgrade to the current 3.97x branch.

12. Frequently Asked Questions

Why does the BasicLabel show nothing when I type D0 into PLCAddressValue?

Most often CX-Programmer is already holding the FINS/UDP socket on the CP1W-CIF41 module, or the PC's Windows Firewall is blocking inbound UDP 9600. Close CX-Programmer, add a firewall rule, and confirm with Wireshark that a 26-byte FINS request leaves the PC and that a response arrives within 3 s. If only an ACK comes back, verify the TargetNodeAddress matches the ETN21's rotary switches or CIO 225/226.

The keypad writes 0–3 correctly but 4–9 return 0–3 — what is wrong?

This is the BCD interpretation bug in AdvancedHMI driver versions before 3.97d. The driver encodes the value as a BCD word and the CP1/CJ1 CPU is configured for BCD in that data area. Upgrade the driver to 3.97d or later, or change the destination area to DEC in CX-Programmer. Writing 65535 (0xFFFF) to a known location is the fastest verification.

Can I read and write a bit such as W100.05 from AdvancedHMI?

Yes. Use the exact format W100.05 (uppercase W, dot, two-digit bit index). Single-digit bit indices such as W100.5 raise Input string was not in a correct format because the parser calls Convert.ToInt16 on the bit string. The patched parser in section 5 of this article accepts both notations.

Does AdvancedHMI work with CJ1M or CJ2M over Ethernet, or only CP1H?

The OmronFINSEthernetCom driver speaks standard FINS/UDP, so it works with any Omron controller that exposes FINS over Ethernet: CP1H, CP1L, CP1E with CP1W-CIF41, CJ1M-CPU11/21 with CJ1W-ETN21, CJ2M, and CS1G/H. For the NJ/NX series, switch to the OmronSysmacEthernetCom driver (Sysmac Gateway) which uses the newer CIP-over-Ethernet protocol on UDP 2222.

What is the default FINS/UDP port and can I change it?

The default is UDP 9600, configurable in the ETN21 / CP1W-CIF41 module's port settings. If you change it, set the Port property of OmronFINSEthernetCom to the same value, update any FINS routing tables, and adjust the Windows Firewall rule accordingly. Always use a port ≥ 1024 to avoid conflicts with privileged services.

Back to blog