IMDHMIControls LibraryShop main store

Troubleshooting

Why Citect MODNET reads lag 10 seconds behind an M580

SCADA and data logging Published 6 min read By IMDHMI controls team

Short answer

Citect writes go out as soon as the driver can service them, but PLC-side changes wait for the next tag scan and the read round behind it. MODNET30 caps a read at 64 words, so about 10,000 %MW tags cost roughly 157 messages per round. Correct the scan period first, then change the variant to MODNET and set the documented port queue values.

On this page
  1. The write path is not the read path
  2. A flat lag is a setting, not congestion
  3. What the variant costs in messages
  4. The M580 request budget per cycle
  5. The change sequence
  6. The decision
  7. Questions asked

Your own Citect writes appear on screen at once, but a value that changes in the PLC sits unseen for ten seconds. That asymmetry is the diagnosis: the write path is event-driven, the driver sending it the moment it can, while the read path waits for the next tag scan and then for the driver to fetch the data. Two quantities set how long that takes: the scan period the tags are polled with, and the number of Modbus messages one full round costs. With the MODNET30 variant, a read block is capped at 64 words, so the reported 10,000 %MW variables need roughly 157 messages per round. Fix the scan period first, then change the variant to MODNET and set the documented port queue values, measuring at each step. Everything here is scoped to Citect SCADA 2018 with the MODNET driver against an M580.

The write path is not the read path #

Citect sends an operator write as soon as the driver can service it; no scan is involved. A PLC-side change is noticed only when the next tag scan asks the driver to read that address. So an immediate write proves the link, the connection and the PLC's Modbus server are healthy, and it says nothing about how often reads run. The same write-now, read-later split shows up when fixing slow Citect polling to a Quantum hot standby pair, and in both cases the answer lives on the read side.

The client page scan of 250 ms (also the client default) only redraws the page; it cannot display a value the I/O server has not read yet. If the server already holds the new number while the screen stays stale, the fault is client-side, not driver-side.

A flat lag is a setting, not congestion #

Time it before changing anything: force a tag at the PLC and measure from the change to the new value on screen, several times, under normal load. A delay that is consistently just over ten seconds, neither growing nor jittering with plant activity, is a scan period configured at that value somewhere on the read path, and no queue setting will beat it. Congestion behaves differently: it varies with what else is talking and stacks up as messages wait.

The scan rate lives in the project's tag scan configuration; the driver documentation describes the setting, and any periodic client requests count too. Read the real value there rather than inferring it from the page scan. This is also why the earlier trial of equal pending and outstanding values of 8 changed nothing: queue sizes alter how requests are buffered and pipelined, not how often tags are scanned or how many messages a scan costs.

What the variant costs in messages #

The MODNET30 variant limits a read block to 64 words and a message to 128 bytes; the MODNET variant takes a standard Modbus read of 125 registers and messages up to 1024 bytes. That comparison is documented in the AVEVA MODNET driver material and its technical note TN8313. Larger blocks mean fewer messages for the same data, and messages per CPU cycle are exactly what an M580 rations.

MODNET30 MODNET
Maximum read block 64 words 125 registers
Maximum message length 128 bytes 1024 bytes
Messages per full round of the reported tag set 157 80

Worked example, taking the reported set as %MW words with contiguous addresses so every block fills:

  • MODNET30: 10,000 ÷ 64 = 156.25, and a partial block still costs a message, so 157 messages per round.
  • MODNET: 10,000 ÷ 125 = 80 messages per round, which is 77 fewer, about half the traffic.

If the addresses are scattered, blocks fill less and the count rises; that case is handled at the end.

The M580 request budget per cycle #

An M580 serves Modbus requests in server mode out of its cyclic work, and the vendor FAQ for the M580 4040 documents a ceiling of 32 requests per PLC cycle. At the reported scan time that caps every client combined at 32 ÷ 0.077 s ≈ 415 requests per second. The 4040 is the FAQ's example CPU; your unit is a 2040-class processor, so read your own CPU's figure in the same FAQ. The method below does not change.

Best case, with Citect the only client: one MODNET30 round takes 157 ÷ 32 = 4.9 cycles of the 77 ms scan, about 0.38 s; after the variant change, 80 ÷ 32 = 2.5 cycles, about 0.19 s. It is not the only client, because the same CPU also serves a second HMI server, a safety CPU, a Profibus gateway with eight nodes and an OPC server, so Citect receives a fraction of that ceiling.

Two conclusions follow. Message count cannot produce the reported lag, since the worst round above is under half a second, so the scan period remains the primary fault, exactly as the flat-lag test says. And message count sets the floor on how fast polling may run, and that floor, not preference, decides the scan period you write. Keep the division of labor straight while tuning: the poll is monitoring, never protection; the safety functions stay in the safety CPU, and no scan period you pick changes that.

The change sequence #

  1. Baseline: copy the project and the INI files, record the active protocol variant and every MODNET value, and time the PLC-change-to-screen delay for a representative tag under normal load.
  2. Scan period: read the configured scan rate for the tags and any periodic client requests, confirm it matches the measured lag, then set the bulk %MW poll to 1 s. Put a small critical subset, for example 100 words, which fits one MODNET block, on 250 ms; that adds four requests per second.
  3. Variant: on the MODNET I/O device, change the protocol variant from MODNET30 to MODNET, confirm communication is healthy, and re-time the same tag.
  4. Port queues: in Citect.INI, set [MODNET.TCPPORTx] MaxPending = 16 and [MODNET.TCPPORTx] MaxOutstanding = 8, where the x is your MODNET TCP port number. MaxPending is the driver's internal buffer of requests ready for transmission; MaxOutstanding is how many requests may be in flight awaiting replies. These are the documented values to test, not guaranteed optima: measure, then move them only as the measurements say. Leave the remaining generic and port-specific MODNET settings at their defaults unless communication itself requires a change.
  5. Verify: driver diagnostics show no timeouts, writes still go out at once, and the measured delay now equals the scan period plus a round. Keep the rollback copy until the next shift confirms normal operation.
  6. Still wrong, or addresses scattered: move the read path onto an OPC server, which regroups non-contiguous addresses into fewer messages; reading M580 I/O in Plant SCADA without mapped memory addresses covers that route with this PLC family. A subscription interface goes further and removes the poll-round wait entirely, and why OPC UA subscription updates beat polling for PLC input changes shows the mechanism.

The decision #

  • Lag flat at ten seconds: the scan period is the fault. Correct it, and with the variant change the screen should track a PLC change in about 1.2 s, the 1 s scan plus the 0.19 s round, with the critical subset far faster.
  • Lag jittering and growing with load: congestion. Apply steps 3 to 5 and confirm the round time from the driver diagnostics.
  • Bulk poll at the page rate: not available at this tag count, because even the halved round would consume most of the shared ceiling. One second for the bulk plus a fast critical subset is the working point, and the request arithmetic in the FAQ shows why.
  • Scattered %MW addresses: fix the layout if you own the PLC program; otherwise take the OPC route in step 6.

Questions asked

The I/O server holds the new value but the operator page still shows the old one. Where is the fault?

On the client, not the driver. View the same tag from a second client or from the server's own display: if it is fresh there, the read path works and the first client is at fault. Check that page's scan period, that the display object actually animates that tag, and that any trend or alarm requesting it is not holding the last value behind a deadband. Only when the server itself reports the stale value do the scan and driver checks in this article apply.

Can the bulk %MW poll run at the 250 ms page rate once the variant is MODNET?

No. The round after the variant change is 80 messages, and at 250 ms that is 320 requests per second from Citect alone, about three-quarters of the 415-request ceiling the PLC scan allows, before the second HMI server, the safety CPU, the Profibus gateway and the OPC server draw from the same budget. Spread over one second the same round takes about a fifth of the ceiling, which is why one second is the working point. A faster bulk scan requires fewer variables, fewer clients or a shorter PLC scan.

Would raising MaxOutstanding above 8 speed up the round?

Only if the pipe is starved. MaxOutstanding sets how many requests may wait for replies at once; the PLC still serves no more than its per-cycle budget, so extra outstanding requests queue at the CPU and add load, not speed. Watch the driver diagnostics during a round: if outstanding requests sit well below the limit while the CPU idles between replies, raise the value a step and re-measure. If outstanding sits at the limit, the PLC is the constraint and the setting stays where it is.

Does the 32-request ceiling apply to every M580 CPU?

The published figure of 32 server-mode requests per PLC cycle is documented for the M580 4040. The 2040-class CPU reported in this type of installation has its own figure in the same vendor FAQ, so read that row before trusting the arithmetic to the decimal. The method is identical for any CPU: messages per round divided by the per-cycle cap, multiplied by the scan time. Until you confirm your figure, treating the 4040 number as an optimistic ceiling only strengthens the conclusion that message count is not what makes a lag of this size.

Keep reading

  • Troubleshooting

    Why MODNET3 bit in word tags read zero in Citect SCADA

    A MODNET3 word tag that reads 147 while every DIGITAL bit tag on that register stays at zero is two faults stacked: the bit tags are not receiving a live pattern at all, and once they do, the driver's default mirrored order puts the set bits at the wrong suffixes. Verify device, quality and loaded project first, then set the MODNET parameter RegisterBitReverse to 1 and reload.

    SCADA and data logging

  • How-to

    Connecting Citect SCADA to a Modbus RTU gateway over MODNET

    Yes — MODNET is Citect's driver for Modbus over TCP/IP, and a true RTU-to-TCP converter presents standard Modbus TCP on its Ethernet side, so the combination works. Success then rides on two things: the gateway's operating mode, and carrying the RTU slave address and register offsets into Citect correctly, proved by reading one register whose value you can see at the device.

    SCADA and data logging

  • Troubleshooting

    Fixing junk Modbus TCP REAL writes from Citect SCADA

    The junk is the two 16-bit halves of your 32-bit REAL, assembled in the wrong order. Give each REAL two consecutive holding registers and set the [MODNET]FloatMode parameter - values 0 to 3, default 0, byte order 1 0 3 2 - until the PLC reads back the entered value. The address is usually right; ModScan already matched the PLC arrangement.

    SCADA and data logging