Troubleshooting
Why an FX3U-ENET cannot serve Modbus TCP on port 502
Short answer
Modbus TCP on an FX3U needs the FX3U-ENET-P502: only that module can open TCP port 502. The standard FX3U-ENET reserves every port below 1024 for its own protocols, so a Modbus TCP client cannot connect to it and no GX Works2 setting changes that. Read the module label first; if it lacks the P502 suffix, the fix is a module swap or a gateway, not ladder edits.
On this page
- Check the module before you touch the logic
- Why the standard FX3U-ENET cannot listen on port 502
- Swap in an FX3U-ENET-P502 on the installed machine
- Keep the FX3U-ENET and convert in front of it
- Make the register map agree on both sides
- Commission with one value before production
- The decision for each case
- Questions asked
A Modbus TCP connection to an FX3U stands or falls on one label. The FX3U-ENET-P502 opens TCP port 502 and runs Modbus TCP; the standard FX3U-ENET reserves every port below 1024 for its own protocols and cannot listen on 502, so a standard Modbus TCP client has nothing to connect to. That is why a project finds no Modbus TCP setting in GX Works2 for an installed FX3U-ENET: the setting does not exist because the hardware does not support it, and no ladder edit, parameter change or socket program on the PLC adds it. Read the module label first, then take one of two hardware paths — swap in a P502 or convert in front of the ENET. This article gives the checks, the register-map arithmetic that keeps the values right once the link is up, and the decision for each case.
Check the module before you touch the logic #
Three checks settle it:
- Read the label on the Ethernet module itself, not the base unit. An FX3U-128M base unit — the model in the reported case — says nothing about Modbus TCP; the Ethernet module model decides it, and the P502 suffix is easy to miss on a machine someone else commissioned.
- Open the Ethernet module's parameter screens in GX Works2 for the module actually fitted. A P502 presents Modbus TCP slave settings; a plain FX3U-ENET presents none. A missing Modbus screen is the hardware telling the truth, not a damaged project file.
- Do not hunt for a way to free port 502. On the FX3U-ENET every port below 1024 is reserved, so 502 cannot be assigned to anything you choose, and neither ladder nor a user socket program lifts that limit.
If all three point at a plain FX3U-ENET, stop editing the program. The missing setting is the module's specification, and the fix is hardware.
Why the standard FX3U-ENET cannot listen on port 502 #
A Modbus TCP client opens its connection to TCP port 502 on the server; that number is the protocol's assigned port, and client tools assume it unless someone deliberately overrides it. The FX3U-ENET reserves all ports under 1024 for its own protocol services — its programming connections and Mitsubishi's MC protocol — so port 502 cannot be set, and the module carries no Modbus server application on any port. That is a specification of the standard module, not a configuration gap: Modbus TCP on an FX3U exists only on the FX3U-ENET-P502, which exists precisely to open port 502 for it.
| What you find | What it means | Decision |
|---|---|---|
| Label reads FX3U-ENET, no Modbus TCP settings in GX Works2 | Port 502 is reserved and the module has no Modbus server function | Swap in an FX3U-ENET-P502 or convert in front of it; leave the ladder alone |
| Label reads FX3U-ENET-P502, slave settings present | Modbus TCP on port 502 is supported | Set the IP parameters and slave map, then commission with a test value |
| Either module, new machine on the drawing board | Both modules sit under a Mitsubishi production-discontinuation notice | Take the alternatives named in that bulletin; do not start a new design on either module |
Swap in an FX3U-ENET-P502 on the installed machine #
Isolate the panel and lock out before pulling the module; the swap is a power-off job. Mount the P502, select it as the module type in GX Works2, set its IP parameters, enable the Modbus TCP slave function, and build the slave map the module manual specifies — which D and M devices answer which protocol addresses and function codes. The map is yours to define; nothing about it is automatic.
The S7-300 side needs the same hardware-first check. The link exists only if the interface on that rack documents Modbus TCP client support — in practice a CP343-1-class communications processor with that function in its specification. Confirm the exact order number before planning, and keep the roles one-sided: the P502 serves and the S7-300 requests, because two ends configured to initiate leave the connection permanently closed.
Before you finalise the server side, work through what you must configure on the PLC side for Modbus TCP. Note too what this link will never carry: Modbus exchanges process data and cannot transfer a PLC ladder program over TCP, so the client machine still holds its own copy of any logic it runs.
Both Ethernet modules sit under a production-discontinuation notice, so confirm the exact P502 suffix and the supply route with your Mitsubishi distributor for this repair, and carry neither module into a new design.
Keep the FX3U-ENET and convert in front of it #
When the module cannot come out — no downtime window, or the P502 is not an option for that repair — put a converter between the client and the PLC. The client connects to the converter on port 502 as an ordinary Modbus TCP client, and the converter speaks MC protocol to the ENET using the frames the FX3U-ENET manual documents (3E and 4E). Converters of that Modbus-TCP-to-Mitsubishi class exist from several vendors; confirm the one you choose lists the FX3U and those frames. The second shape is a protocol-converter host: an industrial mini PC in the cabinet running conversion software that serves Modbus TCP on 502 to the client and speaks MC protocol to the ENET — the same job in software rather than firmware.
Whichever shape you pick, hang the converter off a switch instead of passing unrelated traffic through it: an industrial gateway locks up when it is used as a network hub, and the crash looks exactly like the fault you started with.
Make the register map agree on both sides #
A connection that opens but returns wrong values is almost always a map fault. Two things must match at both ends: the address base and the data shape.
Worked example. Say the P502 slave map places the 32-bit production counter held in D200 at protocol address 100, and the S7 client needs it. Client-side holding-register references are 1-based and start at 40001 for protocol address 0, so the client reads reference 40001 + 100 = 40101. One Modbus register carries 16 bits and the counter is 32 bits, so the read length is 2 registers: the block runs from protocol address 100 to 100 + 2 − 1 = 101, that is references 40101 and 40102.
Let the counter hold 123,456 = 0x0001E240. The first register carries the high word 0x0001 and the second the low word 0xE240, since 0x0001 × 65,536 + 0xE240 = 65,536 + 57,920 = 123,456. If the client stores the words in the opposite order, the same two registers decode as 0xE240 × 65,536 + 0x0001 = 3,795,845,120 + 1 = 3,795,845,121 — a plausible number about 30,000 times too large. Set the word order once, on the client's storage, and prove it with a test value before anything writes.
The address 100 in the example illustrates the arithmetic; it is not a default the module ships with. Client tools also differ over whether the field wants the bare offset 100 or the 6-digit reference, and a few apply their own +1; check which convention yours uses and keep both ends on it.
Confirm as well that every function code the client issues is in the server's documented set. Reads succeeding while one particular write errors is the signature of a code the server does not implement.
Commission with one value before production #
Prove the link while the machine is still in a controlled state. Write a known value into the mapped FX device from the GX Works2 device monitor, read it from the S7 client, and compare digit for digit. Reverse one path: write a test value from the client into a scratch FX word and confirm in the monitor that it lands unchanged, word order included. Record the final address map, the function codes in use and the agreed word order in the project notes, so a later fault can be judged as a connection failure or a mapping error without re-deriving the link.
The decision for each case #
- Installed machine on a plain FX3U-ENET, Modbus TCP required: change hardware. Fit an FX3U-ENET-P502 or put a converter in front of the ENET. There is no ladder path and no GX Works2 setting that adds the function; the port limit is in the module.
- Installed machine already on an FX3U-ENET-P502: configure the IP parameters and the slave map, then commission with a test value. The link is supported as it stands.
- New machine: neither module. Take the alternatives named in the discontinuation bulletin — the current iQ-F CPUs list Modbus TCP client and server on their built-in Ethernet port in the network manuals — and design the exchange around the CPU rather than an option module.
Questions asked
How do I tell the two modules apart on a running machine?
Read the model printed on the module's side label; the -P502 suffix is the only difference that matters here. The GX Works2 parameter screen backs this up: it shows the Ethernet module type selected for that position, and a P502 offers Modbus TCP slave settings that a plain FX3U-ENET's screens do not. If a label is unreadable or missing, read it at the next planned stop rather than pulling a module out of a powered assembly.
Can the Modbus client use a port other than 502 and skip the P502?
No. On the standard FX3U-ENET every port below 1024 is reserved for the module's own protocol services, so 502 cannot be assigned, and no setting installs a Modbus server on any other port. A client that accepts a custom port number would simply find nothing Modbus behind it. The service has to come from the P502 module or from a converter placed in front of the PLC.
Which S7-300 hardware can open the connection?
The S7-300 needs an interface whose documentation lists Modbus TCP client support — in practice a CP343-1-class communications processor with that function in its specification, configured with the functions Siemens documents for it. An ordinary Ethernet connection on its own does not provide the client role. Confirm the exact order number and firmware before planning the project, because the S7 side fails in the same hardware-first way as the FX3U side.
Why do reads work while one specific write keeps failing?
Client and server must both implement the function codes the exchange uses. The classic case is a write issued as function code 22, mask write, to a server that does not list it: every read returns normally and that write errors each time. Check the server's documented function-code set and move the write to a code it lists, such as a single-register or multi-register write, before suspecting the map or the wiring.