IMDHMIControls LibraryShop main store

Explainer

Why an S7-1200 CM 1241 RS232 null modem cable fails

Industrial networks Published 6 min read By IMDHMI controls team

Short answer

The working cable between two CM 1241 RS232 modules is a three-wire null modem: pin 2 to pin 3, pin 3 to pin 2 and pin 5 to pin 5. When that cable stays silent, the fault is flow control left enabled, mismatched framing, or the wrong master and slave assignment, never missing handshake pins.

On this page
  1. What cable joins two CM 1241 RS232 modules?
  2. Why does a correctly wired three-wire cable stay silent?
  3. Do the other pins need bridges like a full null modem?
  4. Where is the CM 1241 RS232 pinout documented?
  5. What serial settings must both ports share?
  6. Which CPU runs MB_MASTER and which runs MB_SLAVE?
  7. How many registers does one struct occupy?
  8. In what order do I commission the link?
  9. Questions asked

Two CM 1241 RS232 modules need a three-wire null modem, not a nine-wire one: pin 2 to pin 3, pin 3 to pin 2 and pin 5 to pin 5, with flow control off and identical framing at both ports, one CPU running MB_MASTER and the other MB_SLAVE. When a cable wired exactly that way stays silent, the conductors are not the fault; the port configuration or the program is. What follows is the pinout, the settings that must match, where the connector definition is documented, the register arithmetic for a struct exchange, and the order that gets the first transaction through.

What cable joins two CM 1241 RS232 modules? #

A three-conductor null modem: run pin 2 to pin 3, pin 3 to pin 2, and pin 5 to pin 5 between the two 9-pin D-sub sockets, crossing transmit into receive and joining signal ground, nothing else.

Both ends are the same module, so the cable is symmetric — you do not have to settle which data pin the manual calls transmit on your unit, because the cross covers both cases. The module presents a 9-pin D-sub socket, so each cable end is a 9-pin D-sub plug with three conductors soldered and six positions left empty. Make up and connect the cable with both CPUs powered down. Use shielded cable and keep the run short: RS232 measures its signals against the single ground conductor, so a long run spends noise margin you will want later.

Why does a correctly wired three-wire cable stay silent? #

Because the wiring was never the problem: with the data pair crossed and ground joined, a silent link means flow control is still enabled, the framing differs between the ports, or both CPUs were configured as the same Modbus role.

The failed attempt you hear about most often is exactly this cable — pins 2, 3 and 5, with 2 and 3 crossed — so the fix was never going to be more pins. Compare the two port configurations before touching the soldering iron again. The three usual causes, in the order to check them: one port still expects handshaking the cable does not carry; the baud, parity or stop bits differ between the ends; or the program calls the same instruction at both ends, so nobody is answering.

Do the other pins need bridges like a full null modem? #

No: once both ports are set to no flow control, the remaining pins are unused, so nothing is bridged, and the idea of wiring every pin except pin 9 collapses to wiring three and leaving six empty.

The loops inside a full null modem — request-to-send returned to clear-to-send, data-terminal-ready returned to data-set-ready and carrier detect — exist for ports that refuse to move data until they see their own handshake lines come back. A CM 1241 RS232 configured for Modbus RTU with no flow control does not wait for those lines, so bridges change nothing and cannot repair a configuration fault. Guessing bridge combinations is how a two-hour job becomes a week: with three conductors documented and sufficient, every extra wire is one more connection to get wrong.

Where is the CM 1241 RS232 pinout documented? #

In the S7-1200 system manual, under the RS232 specifications for the CM 1241 RS232, located by module name rather than by a page number such as 326, which matches only one edition of the manual.

The manual's communication-interfaces chapter assigns each of the nine socket positions a signal name and a direction; read that table once before soldering and check the two data positions and the ground position against the cable described above. Page numbers move between editions, so search the PDF for the module name instead of trusting a page reference from somebody else's copy. Siemens publishes the same tables in its online S7-1200 documentation. The RS422/485 version of the module has its own, different table, and its pair has its own failure mode — see why CM1241 RS485 A/B polarity stops Modbus RTU slave replies.

What serial settings must both ports share? #

Baud rate, data bits, parity, stop bits and flow control, all identical: one workable pair is 9600 bit/s, 8 data bits, even parity, 1 stop bit and no flow control at both CM 1241 ports.

MB_COMM_LOAD is the instruction that configures the PtP module port for Modbus RTU from the program, and the module's port configuration in the device view holds the same settings; whichever place your project uses, both ends must agree. A first-time port setup is walked through in Configure a VFD for Modbus RTU control from an S7-1200 PLC. A mismatch does not always silence the line: a parity or stop-bit difference corrupts what a read returns, as shown in what parity and stop bits change in an M221 Modbus read, while a baud difference produces no valid frame at all.

Which CPU runs MB_MASTER and which runs MB_SLAVE? #

Exactly one of each per link: the CPU that initiates every transfer calls MB_MASTER, the CPU that only answers calls MB_SLAVE with a station address the master polls, and both ports are prepared with MB_COMM_LOAD.

Two masters on one serial link collide on the same pair, and two slaves never transmit at all. The S7-1200 documentation allows up to three CM modules (RS232 or RS485) plus one communication board as Modbus ports on a single CPU, but this link needs one module at each end and nothing more. When the master transmits and nothing returns, it reports a receive timeout; the status the S7-1200 raises for that case is covered in why an S7-1200 MB master gets status 80C8 with no reply.

How many registers does one struct occupy? #

Half its byte count: an example send struct of two INT values and one REAL value is 2 + 2 + 4 = 8 bytes, and 8 bytes ÷ 2 bytes per register gives 4 Modbus registers of 16 bits, so the transfer length is 4.

Modbus moves data in 16-bit registers, so each INT fills exactly one register and the REAL spans two; declare the members in the same order at both ends and every register boundary lands identically in the sending and receiving structs. The receive direction works the same way: an example receive struct of four INT values and one REAL value is 4 × 2 + 4 = 12 bytes, and 12 ÷ 2 = 6 registers. The master's call takes a start address in the slave's Modbus map and a length counted in registers — the number from the division — never a struct name. Keep the first structs to whole-byte members such as INT, WORD, DINT and REAL; bit members pack differently depending on what precedes them and are the usual cause of a miscount.

In four passes: prove each conductor with a continuity meter, verify both port configurations in the project, confirm one poll actually leaves the master, then run the smallest transaction — the 4-register read from the example struct.

  1. Meter the finished cable before it goes near a CPU: the two data conductors ring through crossed, the ground conductor rings through end to end, and no empty position shows continuity to anything.
  2. Power up, download, and read both port configurations side by side: identical framing, no flow control, one master and one slave.
  3. Trigger the master's smallest read and confirm a frame leaves the master; if nothing leaves, the fault is in the call or the port setup, not the cable.
  4. Add the write direction and the remaining data one change at a time, redoing the register arithmetic for every new struct.

The decision in one line: solder the three-wire cable, set both ports to no flow control with matched framing, run one MB_MASTER against one MB_SLAVE — and when the link is silent, stop rewiring and start comparing configurations.

Questions asked

Can I use a purchased null modem cable instead of soldering one?

Yes, if you verify it with a continuity meter before use: a true 9-pin null modem rings pin 2 through to pin 3, pin 3 to pin 2, and pin 5 to pin 5. The handshake bridges inside a bought cable do no harm once both ports run no flow control, because nothing on the line waits for them. A straight-through cable sold as an extension fails the check and cannot be used.

Can one CM 1241 RS232 talk to several slaves?

No. RS232 is point-to-point, with one transmitter per conductor, so a second slave would drive the same line against the first. Multiple slaves on one serial link need the RS422/485 version of the CM 1241, which is built for multidrop wiring; that is the module to choose when the design grows past two nodes.

Does the RS422/485 version of the CM 1241 use the same pins?

No. On the RS422/485 module the table is different: pin 2 is TxD+ and pin 9 is TxD-, while pin 3 (RxD/Tx+) and pin 8 (RxD/TxD-) form the RS485 pair. A null modem built for the RS232 module does not apply, and the RS485 pair also wants the line termination its segments require.

Why not just connect the two CPUs over Ethernet?

Whenever the two CPUs may share a network, Ethernet is the simpler link: the built-in ports carry Modbus TCP with no special cable. The serial link earns its place when the design keeps the two CPUs on networks that must stay separate, because a point-to-point RS232 cable moves data with no IP addressing involved at all.

Keep reading

  • How-to

    How an S7-1200 reads PAC3200 floats over Modbus RTU

    MB_MASTER takes register references, not the meter's offsets: DATA_ADDR is 40001 plus the offset, so offset 1 for the Va-n voltage becomes 40002, and DATA_LEN counts registers, so one 32-bit float needs a length of 2. The meter sends the high word first, which is already REAL order in S7-1200 memory, so the pair decodes with no swap.

    Industrial networks

  • How-to

    Using a Beijer HMI as a Modbus bridge to an S7-1200

    Yes. The Beijer HMI polls the RS485 device as a Modbus RTU client and its data-transfer function copies the values into tags the S7-1200 already shares with the screen over Ethernet, so the PLC needs no serial module; the bridge lives in the HMI application.

    Industrial networks

  • Troubleshooting

    Why a CJ2M Modbus RTU master gets no answer from an S7-1200

    Yes, a CJ2M can poll an S7-1200 over Modbus RTU. The simulators proved each PLC's serial settings, not the cable or the port mode between them: set the Omron port to the mode the MRTU_CPU_Master package requires, bring the send pair onto RDA and RDB for 2-wire operation, load the S7-1200 port at even parity, and confirm the frame on the wire with a known value.

    Industrial networks