IMDHMIControls LibraryShop main store

Explainer

How the PLC scan services NETRX and NETWX network reads and writes

PLC programming Published 8 min read By IMDHMI controls team

Short answer

NETRX and NETWX never stall the ladder. The CPU services communications at the start of each scan and runs about one communication instruction per port per scan, so a one-scan pulse every second starts your six reads and writes but proves nothing about completion. Sequence the transfers on the port busy and comm-error SP bits and count completed cycles against the pulse count.

On this page
  1. Where communications run in the scan
  2. What a one-scan pulse proves
  3. Scheduling six NETRX and NETWX boxes on one port against a 1 s trigger
  4. Sequencing the six boxes on busy and error SP bits
  5. When a second interface helps
  6. Proving the cycle before you trust the period
  7. Questions asked

NETRX and NETWX never stall the ladder to wait for the network. The CPU services communications in a window at the beginning of each scan and admits roughly one communication instruction per port per scan, so the ladder can turn over hundreds of times while a read is still out on the wire. That answers the commissioning question directly: a bit that pulses on for one scan every second starts all six of your NETRX and NETWX transfers, but it proves nothing about their completion. To make the set finish inside its scheduled period, sequence the boxes on the port busy and comm-error SP bits, count completed cycles, and compare that count with the pulse count under real network traffic. Below are the service rule itself, a worked six-instruction schedule, and the sequencing pattern to commission it.

Where communications run in the scan #

The scan-sequence chapter of your CPU's user manual shows communications getting their service window at the beginning of each scan. When a rung enables a NETRX or NETWX IBox, the CPU hands that request to the communications scheduler at the window and moves on, so the ladder never pauses for a reply: the transaction proceeds in the background across the following scans.

For general use, plan on roughly one communication instruction serviced per port per scan — talking out port 2 of the CPU with an Ethernet module in the rack means one serviced for port 2 and one for the module in the same scan. The manual adds that the real scheduler is a bit more involved, but this is the rule to design with. The article on what the PLC scan cycle does in each pass walks the rest of the pass, from input read to output write. Ethernet transactions also finish only as fast as traffic and latency allow: the volume of Ethernet traffic in and out of the module and the network's latency both stretch the elapsed time of a transaction.

What a one-scan pulse proves #

NETRX is the network read and NETWX the network write, and the instruction set reference documents that NETRX performs the RX read with built-in interlocking against all other NETRX and NETWX IBoxes in your program. That interlock keeps the boxes from working against each other; it does not report completion, and it does not buy a second service slot per scan.

The pulse is an enable, not a completion report. True for one scan, it presents each ready box's request once, and from there the request's progress belongs to the port, not to your rung. Data proves nothing either way: a read that completed cleanly can return the same value as the previous read, and a changed value can be the previous cycle's transaction landing late. Judge each transfer on its own completion status and the port SP bits, never on the data. The same trap reaches output devices — the page on why DL06 Modbus printing requires completed NETRX reads covers the point from the printer's side.

Scheduling six NETRX and NETWX boxes on one port against a 1 s trigger #

Inputs, each with its source:

  • Six NETRX and NETWX IBoxes under one NETCFG — the program being commissioned.
  • An enable true for one scan, repeating every 1 s — the same program's trigger.
  • The stressing layout: all six boxes talking out the CPU's serial port — the case examined here.
  • The service rule, from the scan-sequence documentation: about one communication instruction serviced per port per scan.
  • An illustrative scan time of 10 ms. PLCs of this class solve modest programs in milliseconds; take your machine's real scan time from the CPU status in your programming software before reusing this arithmetic.

The rule in words: the port holds one service slot per scan. The pulse's scan launches the first ready box, the following scan launches the second, and so on — and launching is not completing, because each transaction spends further scans on the wire after its slot.

The arithmetic:

  • Launch spread on one port: box 1 takes the trigger scan's slot and box 6 takes the slot five scans later, so launching the set consumes 6 service slots, and the sixth box cannot launch before the fifth scan after the pulse.
  • At the illustrative 10 ms scan, that spread is 5 × 10 ms = 50 ms, and the 1000 ms between pulses must still carry six complete network round trips plus any competing traffic.
  • Split for contrast — two boxes on the serial port, four on the Ethernet module: the serial side launches both within 2 scans, the module side all four within 4 scans, and the two interfaces run in parallel.

Result: one port serializes the whole set — 6 service slots, 5 scans of spread — while the split layout's longest launch spread is 4 scans, running alongside the serial side.

Decision: a cycle of six transfers per pulse can hold on one port, but only completions can prove it. Sequence the boxes on the busy and comm-error SP bits, count completed six-transfer cycles, and compare the cycle count with the pulse count over a test window. Equal counts: commission it. Cycle count lagging behind the pulse count: the period does not fit — lengthen it, move a box to a second interface, or trim transactions, and do not stack retries on a schedule that is already tight.

Sequencing the six boxes on busy and error SP bits #

Get the port configured before anything else: NETCFG applies the port's network setup, and no transfer result means anything until it has run clean. The guide on configuring NETRX, NETWX and NETCFG on port 2 of a DL06 walks that setup step by step.

Pull the status bits next: every CPU serial port and Ethernet module slot carries its own SP busy bit and its own comm-error SP bit, and the numbers live in the SP-bit appendix of your specific CPU's user manual. They differ between a serial port and a module slot, so read them from the appendix for your CPU and interface rather than reusing bit numbers from another project or another model.

Then run the cycle as a state sequence, not as six boxes on one shared pulse:

  • Idle: wait for the pulse with the port busy bit clear.
  • Launch: enable exactly one box, the current step's read or write.
  • Wait: hold that rung until the busy bit clears.
  • Check: if the comm-error bit set, freeze the step number and the status, fix the cause — addressing, cable, remote device, network load — and clear the error only by the method your CPU's manual documents.
  • Advance: status clean, step done, move to the next transfer.
  • Complete: after the sixth clean transfer, increment the cycle counter and return to idle.

If the next pulse arrives while the busy bit is still set, launch nothing and count the deferral, so an overloaded schedule shows up as a growing number instead of a mystery. The sequence separates three events that a shared pulse merges into one: the schedule fired, a transfer was accepted, and the full six-transfer cycle finished. One safety note: when a NETWX writes a setpoint or an output the machine acts on, treat a held comm error as a stop condition for that function and let your risk assessment decide about restarting it, not the retry logic.

When a second interface helps #

A CPU serial port and an Ethernet module slot are separate interfaces with separate busy and error bits, so group the six boxes by port or slot before you change anything. Two boxes on the serial port and four on the module launch in parallel, each judged on its own bits, as the worked schedule above shows. One serial port on its own carries transactions strictly one at a time — the same queueing that makes several drives polled over Modbus RTU on a single port crawl, which the article on why Modbus RTU drive polling on one serial port is slow breaks down. Adding a module gives the CPU a second interface to service each scan; it does not make the serial port faster, and module-side completions still ride on Ethernet traffic and latency.

Proving the cycle before you trust the period #

Count every event separately: pulses, busy deferrals, completed transfers, comm errors, completed cycles. Run the test under representative Ethernet traffic, not on a quiet bench network, because traffic and latency decide how long each module-side transaction holds the slot. Then compare counts over a fixed window — 1000 pulses at this rate is about 17 minutes — and read the result by case:

  • Pulse count and cycle count equal, errors zero: the six-transfer cycle fits the period; commission it.
  • Cycle count short by the deferral count: the schedule is tighter than the port; lengthen the period or move a box to the second interface.
  • Transfers complete but cycles do not: one step fails intermittently; freeze that step's error status and repair the transaction before trusting any count.
  • Errors climbing every cycle: stop measuring and diagnose; a rising error count alongside everything else proves only that the port is failing.

Change one thing per test — period, box placement, or traffic — so each result pins a cause; the piece on industrial troubleshooting that improves when each test proves a cause makes that argument in detail. The decision, stated once: the scan will never truncate a NETRX or NETWX transaction, but only a completed-cycle counter matched against the pulse count under real traffic earns the claim that all six transfers finish every time you schedule them.

Questions asked

How do I watch the busy and comm-error SP bits while commissioning?

Trend them beside the enable pulse in your programming software: pulse, busy bit, comm-error bit, current sequence step and the cycle counter on one screen. With that view you see each request launch, watch how long the busy period runs, and catch a deferral or an error at the scan it happens instead of reconstructing events from counters afterwards.

Is a complete read-and-write cycle every second a realistic expectation?

Usually yes for six short transactions, but treat it as a measurement result, not a design assumption. Six transfers on one serial port are serviced one after another and complete in order, and network load stretches each transaction. Build the counters, run the test window under representative traffic, and let equal pulse and cycle counts answer the question for your layout. If the counts do not match, lengthen the period before adding hardware.

Does a read that returns the same value twice mean the read failed?

No. A transaction can complete cleanly and return data identical to the previous read, so a stale-looking value is not error evidence by itself. Judge completion from the instruction's completion status and the port's comm-error bit, and treat the data as neither success proof nor failure proof. If data looks stale while the cycle counter keeps advancing, suspect the remote device or the write side next.

Can two NETRX or NETWX IBoxes go true on the same scan?

Yes, but treat a shared trigger as a queue, not as simultaneous transfers. The boxes interlock with each other, yet the port services about one per scan, so the second box waits at least one scan behind the first plus the network time its own transaction needs.

Does the enable rung have to stay true until the transfer completes?

Match the rung to the handshake documented for the box in your instruction set reference. Some network instructions accept a momentary enable and report completion on their own status, while others expect the enable held until the box signals the transfer finished. Build your sequence steps on the box's documented inputs and status, and let the pulse do only one job: release the next step.

Keep reading

  • Troubleshooting

    Why a PLC misses short input pulses and how to catch them

    A PLC reads each digital input once per scan, so a pulse shorter than the maximum scan time plus the input filter time can rise and fall between two reads and never be seen, with no fault logged. Catch it with a high-speed counter input, an interrupt task, or a latching input module.

    PLC programming

  • Explainer

    How a DL-260 CPU scans thermocouple cards each scan

    The manual's four-channels-per-scan statement describes one card. A DL-260 reads all four channels of each thermocouple card every scan, so four cards deliver all 16 channels each scan and you program no card rotation. Verify your scaling pointer's range covers every card's data words; the pointer sequences your scaling, not the CPU's acquisition.

    PLC programming

  • Troubleshooting

    Why a PLC-5 watchdog fault S:12 83 drops remote I/O

    S:12 = 83 on a PLC-5 is a watchdog timer error: a scan overran the configured limit, the processor faulted, and the remote I/O dropped as a consequence. Stop masking the fault with a longer watchdog or a fault routine, use maximum and routine scan times to find the intermittent delay, and only then judge the 1771-ASB network on its own evidence.

    PLC programming

What a PLC does: scan cycle, applications and advantages