IMDHMIControls LibraryShop main store

Comparison

How an S7-300 exchanges data with a Modicon Quantum PLC

Industrial networks Published 9 min read By IMDHMI controls team

Short answer

Put a loadable Modbus TCP package on the CPU 317-2PN/DP and run a direct client link to the Quantum Ethernet module over the PN port: one poll cycle then covers all 40 shared motors, and WinCC stays a viewer. A WinCC-mediated transfer adds an acquisition cycle, a PC runtime and a write cycle to every command, so use it only where seconds of delay are acceptable.

On this page
  1. Can an S7-300 CPU 317-2PN/DP talk Modbus TCP to a Quantum directly?
  2. How does the direct link compare with a WinCC-mediated transfer?
  3. Who should be the Modbus client, and who owns each motor command?
  4. How many registers do 40 shared motors need?
  5. How fast does a command cross, and how do you set the poll interval?
  6. What can stop a Modbus request before the Quantum answers?
  7. What does it take to commission the direct link?
  8. Questions asked

You have a CPU 317-2PN/DP and a Modicon Quantum sharing about 40 motors, with WinCC V6.0 on a PC in between. Exchange the data directly, PLC to PLC: load a Modbus TCP package built for S7-300 PN CPUs, run the 317 as client over its PROFINET port, point it at the Quantum Ethernet module, and one poll cycle carries every shared motor. The 317 has no built-in Modbus instructions — MB_CLIENT and MB_SERVER are documented for the S7-1200 and S7-1500 families — so the loadable package is the piece you add. Below: the two candidate paths compared, the register map, the timing arithmetic and the commissioning order.

Can an S7-300 CPU 317-2PN/DP talk Modbus TCP to a Quantum directly? #

Yes — load a Modbus TCP client/server package for S7-300 PN CPUs onto the 317-2PN/DP and use its PROFINET port as the client, with the Quantum's Ethernet module as the server on TCP port 502; no extra communication processor sits on the Siemens side. The package known in the field for this job is OpenModbusTCP PN CPU; its documentation states the supported CPUs and firmware, and it is licensed per CPU — the registration key is tied to the CPU serial number, as covered in why an S7-300 Modbus TCP registration key ties to the CPU serial number. Buy it from the manufacturer or an authorized distributor, not as a copy from another plant.

The PN port keeps carrying S7 programming and diagnostics alongside the Modbus traffic, the arrangement examined in whether one S7 CPU PN port can run Modbus TCP and S7 comms together. On the Quantum side, identify the installed Ethernet module and its IP address, and confirm it serves Modbus TCP; that module is your server endpoint.

The direct link wins for motor coordination: one request path, no PC in the loop, and a command latency set by your poll interval, while the WinCC route chains an acquisition cycle, PC-side copy logic and a write cycle in series, behind channel licenses for both PLC families.

Criterion Direct Modbus TCP, 317-2PN/DP as client WinCC V6.0-mediated transfer
Request path 317 PN port → network → Quantum Ethernet module 317 → S7 channel → copy logic in the runtime → second channel → Quantum
Software you add One Modbus TCP package, licensed per CPU Licensed channels for both PLC families plus tag licenses, and copy logic you write and maintain
Command latency Poll interval plus response time plus one server scan Acquisition cycle plus transfer execution plus write cycle
Failure exposure One TCP connection, monitored in PLC code PC stop, reboot, channel fault or script error stops the exchange
Best use Requests and status for the shared motors Display, archiving and alarms from both PLCs

The WinCC V6 Communication Manual covers planning and commissioning of the links from the runtime to each controller, and both PLC families have channels for it — but a WinCC that displays values from both PLCs does not copy values between them. That needs per-tag copy logic running in the runtime, and every command then rides a PC that was bought for visualization. Whether a WinCC runtime can reach Modbus TCP equipment without a PLC in between is a separate question, answered for the current generation in whether WinCC in TIA Portal connects to Modbus TCP without a PLC. The decision for this plant: direct Modbus TCP carries the commands, and WinCC stays a viewer of both PLCs.

Who should be the Modbus client, and who owns each motor command? #

Make the S7-300 the single Modbus client: it polls status words from the Quantum and writes request words, while each motor keeps exactly one owning controller that executes the output logic and applies its local permissives. Modbus separates the client, which initiates every transaction, from the server, which only answers; here the 317 initiates and the Quantum module answers. Keep it to one client per pair — two clients writing in both directions doubles the traffic and invites both sides to write the same word.

Data group Writer Reader Rule
Run or stop request The requesting PLC, into the owner's request word The owning PLC The owner checks its permissives and ignores invalid requests
Running, ready, fault status The owning PLC The other PLC and WinCC Feedback only, never proof that a request was accepted
Acknowledgment The owning PLC, matched to the request The requesting PLC Clears the outstanding request
Heartbeat counter Each side increments its own The other side Missed increments mark the remote data stale

Safety functions — emergency stop, guard interlocks, safe stop — stay hardwired or in the safety controller; this exchange is ordinary data and carries no safety rating on either side.

How many registers do 40 shared motors need? #

Two registers per motor — one request word and one status word — come to 80 registers for the plant, and both directions fit inside single Modbus transactions: one read and one write per poll. The limits come from the Modbus Application Protocol Specification V1.1b3: a read of up to 125 holding registers under function code 03, a write of up to 123 registers under function code 16, and at most 253 data bytes in a response; the companion TCP implementation guide assigns the server port you configure later. The arithmetic for your map:

  • Requests: 40 motors × 1 word = 40 registers, and 40 is under the 123-register write limit, so one write transaction covers every request.
  • Status: 40 motors × 1 word = 40 registers, plus one heartbeat word = 41 registers, under the 125-register read limit, so one read returns everything; the data is 41 × 2 bytes = 82 bytes, well inside the 253-byte limit.

An example layout:

Block Registers in this example Content
Requests, motors 1 to 40 40001 to 40040 Bit 0 run request, bit 1 stop request, bits 8 to 15 optional step
Status, motors 1 to 40 40101 to 40140 Bit 0 running, bit 1 ready, bit 2 fault, bit 3 local control active
Heartbeat 40201 Incremented by the Quantum once per scan

Two conventions decide whether those addresses work: whether the package addresses the first holding register as an offset or by its displayed reference, and the word order if you ever carry 32-bit values. Keep motor data in single words and bits where you can, and settle the offset question before coding — the one-register shift that mixing conventions causes is the fault in why a Modbus TCP coil write lands one address off the map.

How fast does a command cross, and how do you set the poll interval? #

At an example poll of 100 ms and a response of 15 ms, a request is acknowledged back in the 317 within about 215 ms plus one Quantum scan, and that arithmetic — poll plus response plus poll — is what you check the machine sequence against. Work it as a timeline, then replace the example inputs with measured ones:

  • 0 ms: the 317 program writes the request into its request block, just after a poll has departed.
  • 100 ms: the next poll departs and carries the write.
  • 115 ms: the write transaction completes; the Quantum applies it within its own scan time, which you measure.
  • 200 ms: the following poll departs and reads the status block.
  • 215 ms: the acknowledgment is usable in the 317 — 100 + 15 + 100 = 215 ms, plus the scan contribution.

Set the interval from the sequence, not from ambition: if coordinated starts need confirmation inside half a second, this poll passes with margin, and halving the interval halves the wait while doubling the telegrams per second the 317 has to serve. Declare the remote data stale after a fixed number of missed polls — three misses at this poll is 300 ms — and let the stale flag drive each motor's defined fallback. For contrast, the same command through WinCC with example 1 s cycles needs up to 1 s to be acquired, up to 1 s in the copy logic and up to 1 s to be written — two to three seconds before the Quantum scan even sees it, roughly ten times the direct path, with the PC as a single point of failure.

What can stop a Modbus request before the Quantum answers? #

Work the fault from layer to layer — link state, then IP reachability, then the TCP connection to the server's port, then the application reply — because a ping that succeeds proves only the network layer, never the Modbus transaction.

Layer What to check Symptom when it fails
Physical Link indications at both ends and at the switch ports, cable path No traffic at all; the client reports a send or connection fault
IP Both addresses and masks on one subnet, or a working gateway between them Requests die at the sender's routing or at the gateway
TCP The client configured with the server's address and port, with no filtering in between Connection attempts time out while pings succeed
Application Unit identifier, function codes, register addresses against the map The connection opens; replies carry exception codes or wrong data

A capture at the switch or on the engineering PC separates the four cases in minutes. An exception reply with code 02, illegal data address, means the network and the connection are fine and your register map disagrees with the Quantum's — fix the map, not the cable.

Five steps in order — record identities, match the package, prove the network, configure both ends, test with the motors inhibited — and each one runs with the outputs disabled until the last.

  1. Record the 317's order number, serial number and firmware — V2.3 is a documented version for 6ES7317-2EJ10-0AB0 — plus the Quantum CPU, its Ethernet module type, and both IP configurations.
  2. Match the package's compatibility list against that CPU and firmware before you buy.
  3. Prove the route from the engineering PC: both addresses reachable on one segment or through the configured gateway, with nothing filtering the server port between the two controllers. Keep both on the control network segment and never forward that port toward the office network.
  4. Configure the client in the 317 with the server's IP address, TCP port 502, the unit identifier the Quantum answers to, and the timeout you measured; call the client logic cyclically and track its busy, done and error states.
  5. Test with outputs inhibited: write a known bit pattern, verify bit meaning and the offset convention against the map, watch the heartbeat increment, then pull the cable and confirm the stale flag and the motor fallbacks do what the design says.

The decision: direct Modbus TCP, the 317-2PN/DP as client, the Quantum module as server, one read and one write per poll at the interval your sequence needs, and WinCC kept to display and archiving. Nothing else in the cabinet changes.

Questions asked

How do you read the firmware version of the CPU before buying the package?

Open the CPU's module information or its diagnostics buffer from the engineering tool; both list the firmware version. Note it together with the order number and the serial number, because the package's compatibility list and its registration key both depend on those three identities.

Can the Quantum act as the Modbus client instead?

Only if the installed Ethernet module and its configuration support client messaging, and if the S7 package then runs as server. Keep one client per pair: with two clients the traffic doubles and both sides can write the same request words. For this plant the S7-300 as client is the simpler arrangement, because the Quantum module already serves Modbus TCP.

What should each motor do when the link fails?

Decide per motor and code it on the owning PLC: hold the last state, ramp to a stop, or continue on local control only. On the requesting side, clear the outstanding request and latch a communication-fault bit after the configured number of missed polls, so the operator sees a defined condition instead of frozen data.

Does the direct link replace the existing WinCC connections?

No. WinCC keeps its licensed channels to both PLCs for display, archiving and alarms, which is the job it already does. What it loses is the command traffic, so a runtime stop, a PC reboot or a channel interruption can no longer stall coordination between the two controllers.

Keep reading

  • 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

  • How-to

    Linking Modbus RTU BMS SCADA to a redundant S7-1500R

    Use one Modbus RTU-to-TCP gateway as the Modbus TCP client, and run the Modbus TCP server on the S7-1500R system IP address that switched communication moves to the surviving CPU. The BMS keeps polling its RS-485 link unchanged; on a switchover the TCP session drops and the gateway reconnects. Set the comm-fail timeout to the measured gap plus one poll interval: 3 s at a 1 s rate in the example.

    Industrial networks

  • Explainer

    Why an S7-400H PN interface carries only one IP address

    The integrated PN interface of an S7-400H CPU carries one IPv4 address, so Modbus TCP to the DCS and S7 communication share that address and are separated by TCP port and connection resources. A VLAN or routed subnet separates the traffic logically; a physically separate DCS network needs a second interface, a communication processor with its own address on its own subnet.

    Industrial networks

S7-1200 to S7-300 data exchange: I-Device or PUT/GET