IMDHMIControls LibraryShop main store

Troubleshooting

Why an SM 1231 AI8 reads 32767 on unwired channels

Controllers and I/O Published 5 min read By IMDHMI controls team

Short answer

On an S7-1200, an SM 1231 AI8 with only its 24 V supply connected reports the overflow value on every unconnected channel because a floating input has no defined signal. Short unused voltage channels, set unused current channels to the 0 to 20 mA range with wire-break reporting off, and download the hardware configuration.

On this page
  1. What the out-of-range code tells you
  2. First checks on the module
  3. Why an unwired channel reads out of range
  4. Terminate each unused channel for its type
  5. Replace module diagnostics with your own supervision where needed
  6. Prove the fix with a scaling check
  7. Checks after the download
  8. Questions asked

Your SM 1231 AI 8x13 bit is not faulty. A module with only its 24 V supply and ground connected reports 32767 on every unconnected channel because a floating input has no defined signal, and the module codes an undefined measurement as out of range. The fix is to terminate each unused channel for its configured type: short unused voltage channels, set unused current channels to the 0 to 20 mA range with wire-break reporting off, then download the hardware configuration. Disable overflow and underflow diagnostics only on channels you do not use, and replace that supervision with your own logic on every channel that carries a real sensor.

What the out-of-range code tells you #

The decimal value 32767 (16#7FFF) in the peripheral input word is the module's overflow code; underflow reports the negative limit, -32768. Siemens documents that an analog input module reports these codes on any channel with a diagnostic error even when diagnostics are not enabled, so the value appears in your watch table whether or not you configured any alarm for it. A missing 24 V supply to the module produces the same overflow value on all input channels, which is why the supply check comes before anything else.

First checks on the module #

Work through these observations in a watch table before changing any configuration:

  • Every unconnected channel sits at the overflow value and nothing else is faulted: floating inputs, expected behavior.
  • A wired channel sits at the overflow value: the signal is above the configured range, or the channel is set for the wrong measurement type or range.
  • A wired current channel sits at the underflow value: the loop is open, from a broken wire or an unpowered transmitter. The wired-loop case is covered in why an S7-1200 analog input shows 32767 on wire break.
  • All channels, wired ones included, sit at the overflow value: verify the 24 V feed to the module's supply terminals, because a missing supply diagnostic makes every channel report overflow.

Why an unwired channel reads out of range #

A voltage input has a high input impedance. With nothing connected, leakage current and coupled noise drift the node to an arbitrary level, often beyond the nominal range, and the converter reports what it sees. Current inputs behave differently: a channel configured for current conducts loop current only when the module is powered and configured, and the transmitter needs its own external supply to drive the loop. Without that supply the loop is open, which reads as below range or as a wire break.

Powering the module's supply and ground terminals energizes only the electronics. It gives the measurement channels no reference, so the readings stay undefined until each channel has a signal source or a termination.

Terminate each unused channel for its type #

  1. Open the device configuration for the SM 1231 AI8 and note the measurement type and range configured for each channel.
  2. For each unused voltage channel, short the two input terminals together. This gives a defined 0 V reading instead of a floating node.
  3. For each unused current channel, set the range to 0 to 20 mA and disable the wire-break diagnostics for that channel, so an open loop is no longer flagged.
  4. Optionally, also disable overflow and underflow diagnostics for that channel in the module properties, so the module stays silent about a channel that carries nothing.
  5. Download the hardware configuration to the CPU. Range and diagnostic changes take effect only after the download; editing the configuration and not downloading is the most common reason the reading does not change.

Replace module diagnostics with your own supervision where needed #

Turning off overflow and underflow detection removes the module's warning, but the raw value still runs to the limit codes when a signal goes out of range. On every channel wired to a real sensor, compare the raw value against the limits that channel can legitimately reach, flag the channel as invalid when it hits a limit code, and hold the last good value or force a safe state rather than scaling the code into engineering units. The same raw-limit comparison pattern is described in programming wire-break and out-of-range detection on a compact PLC, and detecting a failed analog input channel and reporting it to SCADA shows how to surface the invalid bit to the operator.

One rule: keep the module's diagnostics enabled on any channel that feeds control or interlocks. Disabling diagnostics there to clear a display would let a real broken wire pass unnoticed.

Prove the fix with a scaling check #

On the SM 1231 AI 8x13 bit, a 0 to 10 V range maps linearly to 0 to 27648 counts. Run this worked example after the download:

  • A shorted, unused voltage channel reads 0 counts: 0 V divided by 10 V, times 27648, is 0.
  • A wired voltage channel with a source set to 5.00 V reads (5.00 V ÷ 10 V) × 27648 = 13824 counts.
  • A current channel set to 0 to 20 mA with a source at 12.0 mA reads (12.0 mA ÷ 20 mA) × 27648 = 16588.8, so 16589 counts.

Within converter tolerance, these readings prove the range settings took effect. Disconnect the source and confirm the channel returns the out-of-range code and that your own supervision logic catches it.

Checks after the download #

  • Watch table: shorted voltage channels read 0 counts and no longer show the overflow value.
  • Unused current channels at 0 to 20 mA with wire-break reporting off read at or near the bottom of the range with no diagnostic entry.
  • Online module diagnostics: no overflow, underflow or wire-break entries remain for the terminated channels.
  • One used channel with a known source tracks the source across its range.
  • The CPU diagnostic buffer shows no new module error events after a power cycle.

Questions asked

Does the CPU stop when the module reports these diagnostics?

No. Without a Diagnostic error interrupt OB the CPU stays in RUN and records the event in the diagnostic buffer. If you want your logic to react to an incoming or outgoing diagnostic event, such as a wire break on a used channel, add a Diagnostic error interrupt OB; the CPU calls it on each such event so you can latch a fault bit or raise an alarm.

Does the reading mean the SM 1231 module is defective?

No. Unused channels reading 32767 with nothing connected is documented normal behavior, not a hardware failure. A defective module shows a module-level fault in the online diagnostics and the diagnostic buffer rather than clean per-channel limit codes. Replace the module only if a wired, correctly ranged channel with a verified source still reads out of range after the configuration is downloaded.

Can I leave the unused analog input channels open?

Yes, the module works and no damage results, but the open channels keep reporting the overflow value and any diagnostics left enabled on them keep reporting faults that are not real. Terminating them costs minutes and keeps watch tables, alarms and the diagnostic buffer clean, which is worth it when you later troubleshoot a genuine channel problem.

Will a current channel work if I power only the module?

No. Without the transmitter supply the loop stays open, the channel reads below range, and if wire-break diagnostics are enabled the module reports a fault.

Keep reading

  • Troubleshooting

    Why an S7-1200 analog input shows 32767 on wire break

    With no transmitter connected, a 4-20 mA channel on an S7-1200 SM 1231 analog input carries less than 1.185 mA, and the module substitutes 32767 (hex 0x7FFF) in the input word instead of zero. The same word reports overflow above 22.81 mA, so measure the channel current to decide which fault you have. Below the wire-break threshold, repair the loop; above the overflow threshold, fix the over-current source.

    Controllers and I/O

  • Troubleshooting

    Troubleshooting non-linear 4-20 mA readings on an S7-1200 analog input

    A 4-20 mA loop is linear by construction, so counts swinging between 10 and 30246 mean the current at the terminal is not what the sensor LCD shows. On the SM 1231, 27648 counts is the top of the 4-20 mA range and 30246 decodes to 21.5 mA over-range fault current. Check the loop with a series meter, split sensor from module with a calibrator, and anchor NORM_X to 0 and 27648.

    Controllers and I/O

  • Troubleshooting

    Why a CODESYS analog input stays at zero on one channel

    A CODESYS analog input stuck at zero on one channel while the other channels respond is a channel fault, not a scaling problem: no formula recovers a value that never arrives. Measure the voltage at the channel's terminals and reference, watch the mapped input word online with the scaling untouched, then move the same signal to a second channel to prove which part is dead.

    Controllers and I/O