IMDHMIControls LibraryShop main store

How-to

Connect an FX5U PLC to a weighing indicator over Modbus TCP

Industrial networks Published 7 min read

Short answer

Check the indicator's wiring first: Ethernet means Modbus TCP with static addresses such as 192.168.3.10 for the indicator and 192.168.3.250 for the FX5U on port 502; RS-232 or RS-485 means Modbus RTU and no IP settings. In GX Works3 run Simple CPU Communication while the project fits its 16-connection limit, otherwise poll with ADPRW one request at a time, and assemble the 32-bit weight from two holding registers read with function code 03, swapping words if the value is implausible.

On this page
  1. Is the indicator wired for Ethernet or serial?
  2. Which IP addresses does the Modbus TCP link need?
  3. How do you configure the FX5U built-in Ethernet port in GX Works3?
  4. Should you use Simple CPU Communication or ADPRW?
  5. How do you sequence ADPRW requests to two indicators?
  6. Why does the PLC read a nonsense weight when the display is correct?
  7. What must you prove before trusting the weight value?
  8. Questions asked

Check what is physically landed on the indicator before you open GX Works3: Ethernet conductors mean Modbus TCP with a static address pair — 192.168.3.10 for the indicator and 192.168.3.250 for the FX5U, mask 255.255.255.0, port 502 — while RS-232 or RS-485 conductors mean Modbus RTU and no IP settings at all. With Ethernet confirmed, use Simple CPU Communication while the project fits inside its 16-connection limit, otherwise ADPRW issued one request at a time. Read the weight as two holding registers with function code 03 and assemble the 32-bit integer in the indicator's word order, swapping high and low words if the number is implausible. This design makes the FX5U the client; making the FX5U a Modbus TCP server for a KTP700 panel is the opposite role and a separate configuration.

Is the indicator wired for Ethernet or serial? #

Open the panel and trace the conductors: an Ethernet cable to the indicator means you configure Modbus TCP with IP settings, while landed RS-232 or RS-485 cores mean Modbus RTU configured by station number and baud rate, with none of the IP setup applying.

If the project migrated from an FX3G, treat serial as the default assumption, because that CPU has no built-in Ethernet port and whatever talked to the indicators on the old machine ran through a serial board or module. An EN suffix on the indicator model suggests Ethernet capability, but the landed wiring and the interface selected in the indicator decide — and a cabinet can hold one of each, so record the interface per indicator.

On a serial link, match station number, baud rate, parity, data bits and stop bits against the indicator's configuration; one mismatch stops every exchange, and a wrong station number shows up as requests that never reach the device, the same signature as when Modbus RTU sends to slave address 0 instead of your device. On Ethernet, confirm both addresses are unique on the machine subnet before configuring anything else.

Give both ends fixed addresses on one subnet — for example 192.168.3.10 for the indicator and 192.168.3.250 for the FX5U with mask 255.255.255.0 — leave the Modbus TCP port at 502, and set the indicator's device or station ID to the value configured in it, commonly 1.

Those addresses are working examples, not universal values: any addresses from your own private scheme work as long as both ends sit on one subnet and stay unique against everything else on that network. Switch the indicator itself to Modbus TCP operation in its own configuration, because it is the server in this design — the FX5U opens the connection to the indicator's listener. If the panel network runs a DHCP server, exclude both fixed addresses from its pool so a lease cannot collide with the PLC's target.

How do you configure the FX5U built-in Ethernet port in GX Works3? #

In GX Works3 open Module Configuration, then Built-in Ethernet Port Settings, set the FX5U's IP address and mask, and under External Device Configuration create one Modbus TCP connection that targets the indicator's address 192.168.3.10 on port 502.

Write the parameters to the PLC and apply the restart GX Works3 asks for, because the built-in port picks up new Ethernet settings only after that. The connection joins the active connections list as a Modbus/TCP block; whether its exchanges then run through the Predefined Protocol Support Function or through ADPRW instructions is the next decision. The FX5U is the client in this design, so nothing on the PLC side listens — the indicator does. An FX5-ENET module changes only where the connection is defined, not the addresses or the logic.

Should you use Simple CPU Communication or ADPRW? #

Use Simple CPU Communication when the whole project needs no more than 16 connections — Mitsubishi documents that maximum for the FX5 simple CPU communication function — because it runs the Modbus exchanges from parameters with no ladder code, and two indicators spend only two entries of that budget.

The setting sits under the same built-in Ethernet settings in GX Works3: select the Simple CPU Communication setting, choose a read or write operation, enter the indicator's IP address, and map the holding registers you want onto PLC devices. The budget is per CPU, not per indicator, so count the predefined-protocol connections the project already uses before adding the indicators. Two outcomes decide it:

  • Entries remain: map both indicators here and the exchanges run without any code.
  • Entries are exhausted: move to ADPRW, which is program-controlled and does not draw on that pool.

Pick one method per project rather than mixing them; a weight that sometimes updates from parameters and sometimes from ladder is twice as hard to diagnose when it goes stale.

How do you sequence ADPRW requests to two indicators? #

Issue one ADPRW transaction at a time per path: trigger the first indicator's request on an edge, wait for its completion or error flag, clear the request, and only then start the second — simultaneous requests to one connection stall as timeouts or busy states.

  1. Give each indicator its own ADPRW control data holding its target address, channel and the registers to read.
  2. Trigger the first indicator's request with a rising edge while the channel is idle.
  3. Hold the second indicator's request off until the first reports completion or error.
  4. Reset the first request in the order the instruction sequence expects, then trigger the second.
  5. Repeat the cycle, and never fire both requests in the same scan.
  6. Add a timeout path and keep the last completion or error result in a diagnostic device.

Two simultaneous reads against one server is exactly the failure documented in why two MB_CLIENT instances stop Modbus TCP reads from one server, and the rule holds whether the duplication is two instructions or one instruction triggered twice. A permanently driven request bit re-arms a transaction before the program has processed the previous result, so keep the trigger edge-driven.

Why does the PLC read a nonsense weight when the display is correct? #

The weight is a 32-bit integer spread across two consecutive holding registers, and if you assemble the two 16-bit words in the wrong order a valid 1234 becomes 80,871,424 — a 65,536-times error that looks like nonsense while the indicator display stays correct.

Read the pair with function code 03, which the MELSEC iQ-F FX5 MODBUS Communication manual documents as read holding registers, supported over both MODBUS serial and MODBUS/TCP, and request both registers in one transaction from the weight's base address.

Worked example, with example values: the indicator displays 12.34 with its decimal point set to two digits, so the raw integer is 1234, and the read returns a high word of 0x0000 and a low word of 0x04D2, which is 1234 decimal. Assembled as high word × 65536 + low word: 0 × 65536 + 1234 = 1234, and 1234 at two decimal digits is 12.34. If the map stores the low word first and you assemble first register × 65536 + second register, the same healthy transaction yields 1234 × 65536 + 0 = 80,871,424, which is 65,536 times the true value — the transaction is healthy and only the order is wrong, so swap the words and leave the register address alone.

Manufacturers do not use one universal word order for 32-bit Modbus values, so take the order from the indicator's register map, and apply the decimal-point position and any engineering scaling only after the raw integer assembles correctly. Map the status bits — stable, zero and the rest — from their own register so the program can reject an unstable measurement without touching the raw reading, and take the exact register addresses from that map rather than guessing where gross weight, net weight or status live.

What must you prove before trusting the weight value? #

Acceptance is three live proofs: the PLC weight tracks the indicator display under load changes, the status bits follow the indicator's stable and zero state, and both indicators keep alternating transactions without timeouts for a full shift — a completed ping is not proof of a working Modbus link.

  • The indicator displays a valid weight locally, with the link LED lit on Ethernet or the serial settings confirmed.
  • Both raw 16-bit registers move predictably in the PLC while the load changes.
  • The assembled value matches the display once the decimal point and scaling are applied.
  • Status bits track the indicator's stable and zero state.
  • With two indicators, requests alternate and each completes or faults before the next one begins.

Fix a timeout before touching scaling, because a scaling change cannot rescue a link that never completes. One boundary from Mitsubishi's FX5 communication manual belongs beside this list: the safety circuits that protect people sit outside the PLC, so they hold through a PLC failure or a power supply problem — weight data from this link is process data, not a safety function.

Questions asked

Does using the FX5-ENET module change the setup?

No. The addresses, port 502 and function code 03 stay the same, and the logic reads identically. The difference is where the connection lives in GX Works3: an FX5-ENET is configured as its own module in the parameter tree, so the Modbus TCP connection is defined on that module's own connection settings rather than under the CPU's built-in Ethernet port. Target the indicator the same way and the word-order checks apply unchanged.

Do I need a gateway address for a direct PLC-to-indicator link?

No. A gateway is only consulted when traffic has to leave its own subnet, and a PLC talking to an indicator across a flat machine subnet never does. Leave the gateway entry unset on both ends unless the two devices genuinely sit on different subnets with a router between them; then the gateway address is the router's address on the sending device's own subnet.

How fast does the weight value update in the PLC?

Once per completed read. The PLC value refreshes each time a transaction finishes, so the update rate equals the poll rate: with Simple CPU Communication it is the cycle you configured, and with ADPRW it is how quickly the edge-triggered sequence completes. Keep the poll interval comfortably longer than the configured response-wait time so one slow answer cannot overlap the next request.

Keep reading

  • Selection guide

    Choosing a ControlLogix path to a Modbus TCP Schneider PLC

    ODVA Volume 7 defines how Modbus devices integrate into CIP; it is not a ControlLogix feature, so no stock 1756 Ethernet module speaks Modbus TCP natively. Choose from four paths: an in-rack or standalone gateway, Modbus TCP written over generic sockets on a 1756-EN2T at firmware 5 with RSLogix 5000 v20 (or a 1756-EWEB), an OPC bridge on a PC, or EtherNet/IP on the Schneider side where the CPU supports it.

    Industrial networks

  • Troubleshooting

    Making an FX5U a Modbus TCP server for a KTP700 panel

    A SIMATIC KTP700 BASIC can only open Modbus TCP requests, so the FX5U must answer them as the server; enabling Modbus TCP in GX Works3 and TIA Portal together opens nothing. Prove the Ethernet path, enable the FX5U's Modbus TCP slave service in its Ethernet module parameters, point the panel connection at the FX5U address on port 502, and bind one test tag to a known register before scaling up.

    Industrial networks

  • Selection guide

    Choosing how an S7 PLC talks to a Mitsubishi Q or AnS PLC

    Yes — the link exists on every generation. Put Modbus TCP (QJ71MT91) or Modbus RTU (QJ71MB91) against a Mitsubishi Q series PLC, PROFIBUS master or slave against an AnS or QnAS because those generations had no Modbus modules, and a protocol-converting gateway where the two sides share no interface.

    Industrial networks