How-to
Read a Modbus RTU meter from Modicon Momentum with XXMIT
Short answer
Use the XXMIT EFB in Concept's IEC editors to drive the Momentum CPU's RS-232 port as a Modbus RTU master; XMIT is the same block for 984LL ladder sections. Wire a null-modem cable with pins 2 and 3 crossed and pin 5 straight, set 9600 baud, 8 data bits, no parity and 1 stop at both ends, and prove the link with one function-3 read of a single 4x holding register (40001 = offset 0, COUNT = 1) before widening.

On this page
- Which Concept function block reads Modbus RTU on the CPU serial port?
- How do you wire the RS-232 port to the meter?
- What serial settings do both ends need for the first test?
- How do you set up and trigger the first XXMIT read?
- How do you confirm the value and correct a wrong offset?
- How many registers can one read fetch, and how long does it take?
- What is the right setup for each connection case?
- Questions asked
Yes, the instruction you found is the right one: in Concept, the XXMIT embedded function block drives the Momentum CPU's RS-232 port as a Modbus RTU master, and XMIT is the same block for sections kept in 984LL ladder. The whole first commissioning is one recipe: wire a null-modem cable, match the serial settings at both ends, and prove the link with a function-3 read of a single 4x holding register whose value you can check against the meter itself. Once that one register comes back correct, widen the read to the block of registers you actually need. This article walks the recipe in order, with the wiring pins, the port settings and the offset arithmetic.
Which Concept function block reads Modbus RTU on the CPU serial port? #
Use XXMIT: it is the Modbus serial master block for Concept's IEC 61131-3 editors (FBD, LD, ST, SFC and IL), while XMIT is its twin for 984LL ladder sections, and both take the same slave address, function code, start register and count.
A Momentum CPU carries four communication paths: Modbus RTU on RS-232 or RS-485, Modbus ASCII on RS-232 or RS-485, Modbus Plus, and Modbus TCP/IP on Ethernet. Your meter speaks Modbus RTU over RS-232, so XXMIT is the block for that path. MSTR, READ_REG and WRITE_REG belong to Modbus Plus and Modbus TCP/IP; none of them will drive the serial RTU port.
| Block | Editor | Path it serves |
|---|---|---|
| XXMIT | IEC 61131-3 (FBD, LD, ST, SFC, IL) | Modbus RTU or ASCII master on the CPU serial port |
| XMIT | 984LL ladder | Same serial master function |
| MSTR | Both | Modbus Plus and Modbus TCP/IP |
| READ_REG, WRITE_REG | Both | Direct register access on Modbus Plus or Modbus TCP/IP |
The complete input list and the control-block layout for both blocks are collected in a Modbus XMIT and XXMIT block configuration guide.
How do you wire the RS-232 port to the meter? #
Build a three-wire null-modem cable: CPU pin 2 to meter pin 3, CPU pin 3 to meter pin 2, pin 5 to pin 5 for ground — the crossover that connects each side's transmit to the other side's receive when both ports are DTE.
RS-232 instruments are almost always DTE, which is why the crossover is the default; if the meter's manual draws its port as DCE, use a straight-through cable instead — the drawing decides. XXMIT messaging needs only these three signals, so leave the handshake lines open unless the meter's manual says it actually uses them. If the meter offers RS-485 only, put a 232/485 converter at the meter end and keep the CPU side of the cable unchanged.
What serial settings do both ends need for the first test? #
Set the CPU port and the meter to 9600 baud, 8 data bits, no parity, 1 stop bit, and take the meter manual's communication row as the final authority for both ends.
The CPU side lives in the Concept PLC configuration for that port: Modbus RTU mode, not ASCII, with a response timeout of about 1000 ms for the first tests. RTU always means 8 data bits, so the free choices are speed, parity and stop bits, and they must match at both ends — a parity mismatch shows up as silence, not as a wrong number. The Modbus serial-line specification pairs no parity with two stop bits, so if the meter's table lists 8N2, set two stop bits on the CPU as well; the mismatch is what breaks the link, not the choice itself.
How do you set up and trigger the first XXMIT read? #
Drop one XXMIT block into an FBD or LD section and configure a function-3 read of one holding register you can verify on the meter's display or register map, with COUNT = 1 and the offset for 40001 set to 0.
- Reserve the control block: a short consecutive array in %MW memory that carries the handshake and the returned status, for example %MW100 through %MW104 in this example.
- Set SLAVE to the meter's node address; Modbus serial addresses run from 1 to 247.
- Set FCT to 3 for holding registers (4x). Choose 4 only if the meter publishes its data as input registers (3x) — the trade-off is covered in Modbus holding register vs input register: which one to use.
- Set START to 0, the offset of register 40001.
- Set COUNT to 1 for the discovery read.
- Pulse the enable input once; the rising edge runs a single transaction and the control block reports completion or the exception.
How do you confirm the value and correct a wrong offset? #
Compare the returned word with something you can see independently — a totalizer or a live reading on the meter's display — and if the data comes back shifted by one register, move the offset by one.
The 4x convention is zero-based: the offset equals the register number minus 40001, so register 40102 asks for 40102 − 40001 = 101, and input registers count the same way from 30001. Total silence instead of a wrong value means the offset is not the suspect yet: check the node address, the framing and the cable before touching addresses. Check the register map for scaling too; many meters publish flow as an integer with a stated factor, and the block faithfully returns that raw integer. Keep write tests out of this step — a value pushed into a totalized or billing register is not something the PLC can undo.
How many registers can one read fetch, and how long does it take? #
The Modbus application layer caps a function-3 request at 125 registers, and the meter's documented maximum is usually lower, so widen COUNT in steps until you reach whichever limit is smaller.
Timing example, one register at 9600 baud with 8 data bits, no parity and 1 stop bit: the request frame is 8 bytes (address, function, two address bytes, two quantity bytes, two CRC bytes) and the response is 7 bytes (address, function, byte count, two data bytes, two CRC bytes), 15 bytes in total. Each byte occupies 10 bits on the line, so the line time is 15 bytes × 10 bits = 150 bits, and 150 ÷ 9600 bit/s ≈ 15.6 ms.
RTU also requires at least 3.5 character times of silence around every frame; at the same bit rate that is 35 bits ÷ 9600 bit/s ≈ 3.6 ms each side. Add the meter's own turnaround, and a fast meter completes one poll in roughly 25 to 50 ms. When the same port later has to serve several meters, the Concept 2.6 XXMIT limits for polling many Modbus RTU slaves decide how the poll queue is built.
What is the right setup for each connection case? #
For a Modbus RTU meter on RS-232, the recipe above is the whole job: XXMIT, a null-modem cable, matched serial settings and a verified one-register read before anything wider.
- Meter with RS-485 only: same XXMIT configuration through a 232/485 converter at the meter end; the CPU side of the cable does not change.
- Project sections in 984LL ladder: call XMIT instead; the message parameters are identical.
- Target on Modbus Plus or Modbus TCP/IP: use MSTR, or READ_REG and WRITE_REG for direct register access; XXMIT does not serve those paths.
- Momentum programmed with Unity: after an XMIT or XXMIT function the Modbus serial port does not automatically return to slave mode, so before the port must serve a terminal or a slave poller again, set bit 15 (0x8000) in the command word to trigger the change back to slave.
Questions asked
How do you write a value back to the meter?
Change the function code to 6 to write one holding register, or 16 to write a block of them, keep the same slave address and control block, and read the register back to confirm the value landed. Touch only registers the meter's map marks as writable; a write uses the same one-transaction handshake as the read, so the same test rig proves both directions.
What does an exception response from the meter tell you?
An exception answer arrives as the function code plus 0x80 and a one-byte code: 01 says the function is not supported, 02 says the data address is wrong, 03 says the quantity is invalid. On a first setup, code 02 almost always means the start offset does not match the meter's addressing convention, so recheck the register base before changing anything else.
How do you read a 32-bit float across two registers?
Set COUNT to 2 and read the register pair in one transaction, then combine the two 16-bit words into a 32-bit value before converting it to a real. Check the meter's register map for the word order, because some devices send the high word first and others the low word first, and a swapped order looks like a wild value rather than an error.
What changes when the meter is RS-485 instead of RS-232?
Only the physical layer: fit an RS-232 to RS-485 converter at the meter end, set its serial format to match the CPU port, and keep the XXMIT configuration exactly as for the direct cable. The manufacturer documents the wiring pinout between the RS-232 port of a Momentum M1 processor and such a converter, so follow that sheet rather than a generic adapter pinout.


