Troubleshooting
Troubleshooting S7-300 analog output stuck at 25 mA
Short answer
A 4-20 mA channel on a 6ES7332-5HD01-0AB0 converts 0-27,648 counts to 4-20 mA, so fixed readings of 25 mA and 3.2 mA cannot come from scaling arithmetic. Read the output word online: if it differs from the scaling block's result, a competing write owns the channel; if it matches, the downloaded configuration or the current loop is at fault. Check the block, then the word, then the loop, and stop at the first failure.
On this page
Two readings settle the first question. With the channel on your 6ES7332-5HD01-0AB0 configured for 4-20 mA over a raw span of 0-27,648 counts, the transfer function is current = 4 mA + (counts ÷ 27,648) × 16 mA: zero commands 4 mA, full scale commands 20 mA, and no count in the span maps anywhere near 25 mA or 3.2 mA. A scaling error — wrong limits, integer truncation, swapped high and low — bends the slope, but it cannot push the loop past either endpoint. So the fault is one of three things: another writer is putting its own value into the output word, the configuration active in the remote station is not the one in your project, or the loop itself — terminals, burden, meter placement, channel — is not what you assume. Work the checks below in order and stop at the first one that fails.
Why the readings rule out scaling #
The counts-to-current step belongs to the module, not to your ladder — the same conversion how PLC analog input and output modules convert signals describes, run in the output direction. Inside the nominal span it is linear and monotonic: a bigger count always gives more current. That gives you checkpoints that need no knowledge of your engineering units.
| Raw command | Expected current | What it proves |
|---|---|---|
| 0 | 4.0 mA | Lower endpoint, independent of scaling |
| 518 | about 4.3 mA | The worked example in the next section |
| 13,824 | 12.0 mA | Midpoint: tracking or saturated |
| 27,648 | 20.0 mA | Upper endpoint |
Your loop pins at 25 mA for every command and only falls when the command reaches zero. No arithmetic inside the block produces that shape: a wrong limit changes the slope and a REAL/INT mix changes the offset, but both leave the current between the endpoints and moving with the command. Two explanations survive. Either the output word holds a value beyond full scale for most of the scan — a competing write that happens to land small only at your zero — or the word is right and the channel or loop is converting it wrongly. Reading the word tells you which.
Check the scaling block with a hand calculation #
FC3791 is named Analog output (WORD), and its result is a block tag, not a QW. That is legal, but it means the monitored value is one stage of the path, not the channel. The online monitor shows 15 at InputValue, REAL high and low limits, and 518 at o_OutputValue. Check the arithmetic by hand:
- If the limits are 0.0-800.0 and the target is the full count span, the intended calculation is 15 ÷ 800 × 27,648 = 518.4, which truncates to 518 as a WORD — exactly what the monitor shows for this point.
- A type mix-up would land nowhere near 518: integer division gives zero, and a reinterpreted bit pattern gives a random-looking number. For this point the arithmetic is consistent.
- At the output word, 518 counts should read 4 mA + (518 ÷ 27,648) × 16 mA ≈ 4.3 mA at the terminals.
Two cautions. The 0.0-800.0 limits are an assumption until you read the connected limit tags online. And one point does not prove the block: drive the command to zero, to mid-scale and to full scale, and confirm o_OutputValue follows 0, 13,824 and the top of the span at all three. The counts-from-REAL job is the same one walked through in scale a PID real output to analog output counts. If your hand calculation and the monitor agree at all three points, stop recalculating constants and move to the output word.
Find every writer of the output word #
The channel converts whatever sits in the QW address that HW Config assigns to the 6ES7332-5HD01-0AB0 channel. Your scaling result matters only once something moves it there — and only if nothing else touches that word later in the scan.
- Read the exact word address in HW Config, then monitor o_OutputValue and that QW side by side in a variable table.
- One caution before the test commands: mid-scale and full-scale counts are real speed references, so put the receiving PLC or drive in a state where the channel cannot move the machine.
- Drive the command through zero, mid-scale and full scale. If the QW tracks the block at every point, skip to the loop checks.
- If the QW disagrees, cross-reference the address and everything overlapping it: QB###, QB###+1, any QD that covers the word, and single-bit writes to those bytes.
- Cross-reference misses indirect writes, so also search for moves and pointer instructions that compute an output address at runtime. Overlapping writes of exactly this kind are a known way to corrupt data in these CPUs; a string-read fault traced to overlapping writes shows the tracing method.
A writer that scans only in run fits your timing: the loop locks as soon as the reference block is enabled. Decision: give the channel exactly one writer — the move from the scaling result — and delete or re-address every other one. Do not add a faster cyclic write to outrun the intruder; two racing writers turn a stuck output into an intermittent one.
Then confirm the active configuration and the loop #
If the word is right at every test point and the terminals still read wrong, the program is innocent. Work outward from the module:
- Active range: compare the downloaded station configuration with the project — module order number and channel range. A channel downloaded as a voltage range drives volts, not milliamps, and a zero command that reads 3.2 mA sits below the live zero of the range you meant to configure, so confirm what is actually in the CPU before anything else.
- Terminals: conductors on the documented current-output terminals and return, per the module's terminal diagram.
- One source only: a powered receiving input fights the channel's own current source and can push the loop past full scale. A passive input in series is what the channel expects.
- Burden: receiver, cable and meter together must stay within the load the module manual allows; beyond it the channel cannot regulate.
- Meter: in series, on a current range. Across the loop it shunts current; on a voltage range it reads burden volts, not loop current.
- Diagnostics: with the fault present, read the module diagnostics through the CPU's diagnostic buffer; a channel fault names itself there.
Separate the electrical failure modes before condemning hardware: a shorted or overloaded channel drops out or faults instead of holding a high fixed current, so the pattern in troubleshooting SM1232 short circuit on 4-20 mA analog outputs is the opposite signature. If the word, the configuration and the loop all check out and the current still disagrees at three test points, swap the channel pair or the module.
Decision by case #
- Block result disagrees with your hand calculation: fix FC3791 first — input type, limit tags, order of operations — and re-test. Nothing downstream matters until the counts are right.
- Block right, output word wrong: a competing write owns the channel. Find it by cross-reference plus a search for indirect writes, remove it, and leave the single move as the only writer.
- Word right, current wrong at the terminals: confirm the downloaded range, then the loop — one current source, series meter, burden within the manual's limit, documented terminals — and swap the channel or module if three test points still disagree.
- Word and current both right while the receiver still misbehaves: the fault is downstream; check the receiver's raw counts against the same checkpoints.
Questions asked
Why does the channel still output current when the command is zero?
Because the low end of the range is a live zero, not an off state. At zero counts a healthy channel still sources 4 mA, and the receiver is expected to read that as a zero reference. If the receiving PLC needs a true zero-current off state, wire a separate discrete signal for run or stop instead of trying to push the channel below its live zero; while this current range is configured, the channel cannot reach zero current.
How do I inject a known value into the channel for a loop test?
With the receiver in a safe state, write the midpoint count, 13,824, straight into the output word with the online modify function, or disable the program's writer first. A healthy channel then reads 12.0 mA in series at the terminals. Release the modify afterwards: a value left in a force or modify job keeps overriding the program and looks exactly like a stuck output, which is how a diagnostic can create the fault it was meant to find.
The meter reads differently at the module and at the receiver. What does that mean?
Current is identical at every point of a series loop, so two different readings mean current is splitting through a parallel path or a second source is feeding the loop. Look for a bypass across the receiver, a second power supply in series with the channel, or a device wired in parallel instead of in series. Measure at the module and at the receiver with the same meter, in series, before condemning the channel.
Can I just clamp the scaling block so the channel never exceeds full scale?
Clamping the scaling result at full scale is good protection for the receiver, but it cannot fix this fault. The locked reading stays put while the command varies, so the value reaching the output word is not the value the block computes. Remove the competing writer or correct the loop first, then keep the clamp as a guard against commanded overrange.