Troubleshooting
Why a CODESYS V3 HMI connection fails an encrypted PLC
Short answer
A network scan only proves the cable and the IP path. When the controller accepts only encrypted CODESYS V3 traffic, an HMI driver that has not implemented that encryption keeps reporting a connection error no matter how many times you import tags. Put the controller's two Ethernet interfaces on separate subnets, leave the 11740 gateway port alone, and fix the link at the driver level or move the visualization to hardware that speaks encrypted CODESYS.
On this page
- Separate the scan from the session
- The encryption requirement decides the link
- Keep XF10 and XF51 on different subnets
- Worked example: XF51 at 192.168.1.5/24 against the XF10 overlap check
- Leave the 11740 gateway port alone
- Verify each layer before you touch tags
- Fixes that cannot close the gap
- The decision for each case
- Questions asked
When a CODESYS V3 HMI scans the network, finds the controller, and still reports a connection error, the fault is almost never in the cable or the tag list: the controller accepts only encrypted CODESYS V3 communication, and the HMI's driver has to implement that encryption explicitly. Everything else in the setup — the exported symbol XML, the imported tags, the test button — sits downstream of a session that never comes up. This article walks the reported case of a Weintek cMT2078X on EasyBuilder Pro V6.09.02.338 against a ctrlX CORE at v1.20.07. Work the layers in order: prove the path with the scan, put the controller's two Ethernet interfaces on separate subnets, leave the 11740 gateway port untouched, and settle encryption at the driver level, because that last layer decides whether the link can exist at all.
Separate the scan from the session #
The scan utility in the HMI's device settings answers a discovery query. It proves one thing: the HMI can reach the interface at the IP address you entered. The CODESYS V3 session is a second, separate exchange at the application layer, with its own handshake, and the encryption requirement lives there. Discovery succeeding while the session is refused is the signature of a capability failure on a modern controller, and it is why a green scan and a connection error so often appear together.
Treat the scan as wiring proof and nothing more. The same split between being visible on the network and completing a session shows up on the programming side as well — why an HMI is detected but a project download still fails is the same disease with a different symptom. Until the session comes up, no label binding or button write deserves a minute of your time, because nothing downstream has a live link to ride on.
The encryption requirement decides the link #
The controller communicates only over encrypted CODESYS V3 traffic, and its maker states that as mandatory, not optional: the V3 communication client on the HMI side must be able to use encrypted communication. The HMI maker's own update in this case stated that its CODESYS PLC handler had not yet implemented encrypted communication at that date. Put the two facts together and the outcome is fixed: an unencrypted client against a controller that accepts nothing else cannot connect, whatever the tags, masks or ports say.
Two consequences follow. The symbol XML cannot help, because it defines which tags the HMI may address, not how packets are wrapped. And the question is version-specific: HMI lines across the market carry CODESYS V3 Ethernet drivers under their own names — Proface's driver list, for instance, includes a CoDeSys V3 Ethernet selection — and every driver version answers the encryption question for itself. Read the release information for the exact driver build you run: the reported EasyBuilder Pro V6.09.02.338 handler had no encrypted support, and any build without it ends the link against this controller.
Keep XF10 and XF51 on different subnets #
The controller carries two Ethernet interfaces, XF10 and XF51, and the maker's guidance for this setup is blunt: they must not sit in one subnet, with 192.168.1.x/24 named as the example, because the runtime then cannot direct messages to the correct interface and traffic lands on the wrong port. The reported setup had XF51 at 192.168.1.5, inside precisely the range the warning names — so the first configuration you read should be XF10's address and mask, not XF51's.
If both interfaces AND out to the same network address, readdress one of them into a different network before anything else. This fault breaks the link even after a driver with encrypted communication is in place, so the two fixes are independent. Make the interface change at a planned stop: readdressing a PLC interface on a live line can drop remote I/O, drives or a second panel off the wire mid-cycle.
Worked example: XF51 at 192.168.1.5/24 against the XF10 overlap check #
Inputs, with sources: XF51 sits at 192.168.1.5 with a /24 mask, 255.255.255.0 — the address comes from the reported setup and the mask from the case the controller maker's warning names. The candidate for XF10 is the overlap pattern the warning flags: 192.168.1.x with the same /24 mask, where x is whatever last octet the second interface currently holds.
Rule in words: a subnet is the interface address ANDed with its mask octet by octet, and two interfaces on one subnet produce the identical network address — that identity is the forbidden configuration.
Arithmetic: 192.168.1.5 AND 255.255.255.0 gives 192 AND 255 = 192, 168 AND 255 = 168, 1 AND 255 = 1, and 5 AND 0 = 0, so XF51's network is 192.168.1.0/24. For XF10 at 192.168.1.x with the same mask, the first three octets AND out identically to 192.168.1 and the last octet gives x AND 0 = 0, so the network is again 192.168.1.0/24 regardless of which address XF10 carries.
Result: both interfaces announce 192.168.1.0/24, exactly the configuration the maker's warning describes — the runtime cannot tell which physical port PLC-bound traffic belongs to, so messages head toward the wrong interface.
Decision: the threshold is the ANDed network address. Identical means fail; different means pass. Keep XF51 with the HMI on 192.168.1.0/24 and move XF10 into any unused network — a different third octet on a /24 does it — then retest.
Leave the 11740 gateway port alone #
The setup shows the PLC communication port as 11740, fixed and not editable. That is by design: the port carries traffic between the programming environment on your PC and the PLC runtime through the controller's PLC gateway. It is not an HMI selection, and nothing on the HMI changes it.
A different port value could not rescue the link even if the field were editable, because the failure sits at encryption, not at the port number — the scan already proved the HMI reaches the interface. Read it once, record it, and leave it alone for the life of the project.
Verify each layer before you touch tags #
Work down this list and compare each reading against its expected value:
- Interface addressing: read XF10's and XF51's address and mask from the controller configuration. Expected: different ANDed network addresses. Both inside one /24 network fails.
- Gateway port: read the PLC communication port. Expected: 11740, unchanged from the controller's own setting.
- Driver capability: compare the installed HMI driver build against its release information. Expected: explicit encrypted CODESYS V3 support; the reported EasyBuilder Pro V6.09.02.338 handler did not have it, and against this controller that ends the link.
- Session and data: once addressing and driver capability line up, run the project and press the test button. Expected: the connection error clears and the value you write appears at the PLC tag.
Only when all four read as expected does tag-level debugging earn its time; before that, imported symbols have nothing to run on.
Fixes that cannot close the gap #
- Re-importing the symbol XML: the file carries tag names, addresses and types; it touches no transport setting and cannot add an encrypted client.
- Editing or chasing the gateway port: it belongs to the PC-to-runtime path on the controller and does not take part in the HMI session.
- Trusting the scan as end-to-end proof: discovery confirms reachability only and never exercises the encrypted handshake.
- Fixing subnets alone: separate networks remove one real hazard but supply no encryption; the two faults need two fixes.
The decision for each case #
Scan finds the controller and the connection still errors, and your driver build has no encrypted CODESYS V3 support: the link cannot come up on that driver. The working paths are a driver release that explicitly implements encrypted communication, the controller family's own HMI — where the reported installation ultimately landed — or moving the operator interface onto industrial panel PCs running visualization software that supports the encrypted link. No tag, port or cabling change on the HMI side substitutes for any of the three.
Both controller interfaces inside one subnet: readdress one interface into a different network at a planned stop, then retest, even when a driver change is also pending.
Connection error gone but values wrong: now, and only now, re-check the symbol import against the PLC tag list.
Questions asked
Why does the HMI scan find the ctrlX CORE but the connection still reports an error?
Discovery and session run at different layers. The scan is a short discovery query that only proves the HMI reaches the interface at the IP layer. The CODESYS V3 session is negotiated afterward at the application layer, and the encrypted handshake lives there. A driver without encryption answers discovery happily and then fails the session, so you see the device in the scan list and a connection error on the screen at the same time.
What does the exported symbol XML actually change in this setup?
The symbol configuration in the PLC project exports an XML file listing the tag names, addresses and types the HMI may display; some toolchains generate it as the ARTI XML. Importing it fills the HMI tag database, and if the file is never created the import list stays empty. It changes nothing about transport, ports or encryption, so no number of re-imports repairs a session-level failure.
Is there a CODESYS-native option instead of a third-party HMI driver?
CODESYS HMI SL runs the visualization on a remote device and collects its data from one or more CODESYS V2 and V3 controllers configured as data sources. Since both ends of that link are CODESYS components, the third-party handler that lacked encrypted communication drops out of the equation. It is the closest like-for-like substitute when the controller family's own panel is not an option.
Can the 11740 port be remapped so the HMI attaches to a different service?
No. The port belongs to the path between the programming environment on the PC and the PLC runtime through the controller's PLC gateway, and the controller's configuration fixes it. Remapping it would not create an encrypted client where the driver has none. The only port work worth doing is confirming which interface, XF10 or XF51, the HMI network physically reaches.