Explainer
How PLC analog input and output modules convert signals
Short answer
Analog input modules amplify and digitize a field voltage or current into a 12-bit binary code (4,096 counts) or a three-digit BCD value, and the program scales that code into engineering units. Analog outputs run the same path in reverse through a DAC. Troubleshoot in the order signal, format, scaling.
On this page
- The input path: signal to digital code
- What the processor receives: 12-bit binary or 3-digit BCD
- Scaling the raw code into engineering units
- The output path: digital code to voltage or current
- Worked example: reading 12.0 mA on a 4-20 mA, 0-100 psi, 12-bit channel
- Prove signal, format, then scaling
- Traps that cost an afternoon
- Questions asked
An analog input module takes a continuously varying voltage or current from a transmitter, amplifies and digitizes it with an analog-to-digital converter, and hands the processor a proportional digital code: 12-bit binary, 4,096 counts, or a three-digit BCD value, depending on the module configured format. An analog output module runs the same path in reverse: the processor writes a digital code, a digital-to-analog converter turns it into a proportional voltage or current for a valve, a small motor, a meter or a display. Every analog symptom you will troubleshoot lives somewhere on that path, so prove it in a fixed order: the electrical signal at the terminals first, the data format second, the engineering-unit scaling last. Scaling arithmetic cannot fix a noisy signal, and it cannot fix a BCD value decoded as binary.
The input path: signal to digital code #
Temperature, pressure, light, speed and position transducers all deliver a voltage or a current proportional to the quantity they measure. The module conditions that signal, and the channels do not each get a converter of their own: multiplexer switches route one channel at a time into a sample-and-hold circuit feeding a successive-approximation converter. Designs differ in how many converters they share; a module built around a single 12-bit converter serving eight multiplexed inputs with per-channel programmable ranges is one documented arrangement.
The thermocouple is the case that sets the wiring rules. It produces a DC voltage in the millivolt range, proportional to temperature, and the module amplifies that small signal before digitizing it. Anything induced into the conductors is amplified with it, which is why the run to the module uses shielded cable routed away from wiring that switches.
Because induced noise on a low-level input can cause operating errors and unexpected machine behavior, treat an unstable millivolt reading as a wiring and shielding fault to correct, with the circuit de-energized or isolated per the machine procedure before you touch terminals. The channel must also accept the thermocouple signal type; FX5U thermocouple readings that need a dedicated TC input shows what happens when a generic analog channel stands in.
The converted value reaches the processor when the program input instruction calls for that channel data, not as a free-running broadcast.
What the processor receives: 12-bit binary or 3-digit BCD #
A 12-bit converter produces 4,096 distinct codes. Counting from zero, the codes run 0 through 4,095, and the mapping of those codes onto the electrical range, meaning which count equals 4 mA and which equals 20 mA, comes from the channel configuration, never from the resolution alone. Modules of the same resolution can map endpoints differently, so read the installed module configuration before doing arithmetic with its data.
The other documented representation is three-digit BCD: each decimal digit of the reading occupies four bits, and the digits travel packed in a 16-bit input word. The Allen-Bradley 1771-IFE, a 12-bit input module used with PLC-5 systems, is a documented example of data moving in 12-bit three-digit BCD, with natural binary as the alternative representation.
Mixing the two formats up is a classic fault. A BCD-encoded 205 packs its digits as 0010 0000 0101; a program decoding those twelve bits as ordinary binary computes 512 + 4 + 1 = 517. The symptom is a stable reading that is wrong by an amount which changes with signal size, close to correct near zero and progressively further off as the value climbs.
Scaling the raw code into engineering units #
Once the raw value is stable and decoded in the right format, the program applies one linear relationship:
Engineering value = engineering minimum + (raw value - raw minimum) × engineering span / raw span.
Both raw endpoints come from the module channel configuration; both engineering endpoints come from the transmitter documented range. Guessing either pair from the current panel reading is how a working channel gets rescaled into a wrong one.
Two rules hold the line between signal work and math work. Never rescale while the raw value is unstable, because scaling changes magnitude, not signal integrity. And never use scaling to compensate for an electrical mismatch: if the channel is set for voltage and the device drives current, fix the channel configuration to the actual signal form. Scaling MicroLogix analog inputs to Pascals over DF1 reads walks this same linear arithmetic through real channels.
The output path: digital code to voltage or current #
An analog output module receives digital data from the processor and passes it through a digital-to-analog converter, which produces a proportional voltage or current in quantized steps: the output moves in discrete increments, one per code, rather than continuously. Small motors, valves, analog meters and seven-segment displays are the loads this path drives.
A correct command value in the processor proves only the software side of the path. To prove the rest, write a known command, confirm the code the module receives, measure the voltage or current at its output terminals, then check that the load responds. Wiring a 1769-OF2 analog output to a PowerFlex 753 input is a complete wired example of the same check.
Worked example: reading 12.0 mA on a 4-20 mA, 0-100 psi, 12-bit channel #
This is an illustrative case with typical numbers; the method is the deliverable. The inputs:
- Loop current measured at the module terminals: 12.0 mA, meter in series, transmitter at steady state.
- Transmitter range from its data sheet: 4-20 mA corresponds to 0-100 psi.
- Channel configuration: 4-20 mA input, 12-bit converter, raw endpoints of 0 at 4 mA and 4,095 at 20 mA.
The rule in words: the expected raw code is the fraction of electrical span times the raw span, and the engineering value is the engineering minimum plus the code fraction of raw span times the engineering span.
The arithmetic:
- Fraction of span: (12.0 - 4.0) mA / (20.0 - 4.0) mA = 8.0 / 16.0 = 0.500.
- Expected code: 0.500 × (4,095 - 0) = 2,047.5, so the converter returns 2,047 or 2,048.
- Scaled value at 2,048: 0 psi + (2,048 - 0) × (100 - 0) psi / (4,095 - 0) = 204,800 / 4,095 = 50.01 psi.
- Independent check from the current alone: 0.500 × 100 psi = 50.0 psi.
- One count: 100 psi / 4,095 = 0.0244 psi. The 0.01 psi difference between steps 3 and 4 is under half a count, which is quantization, not error.
Decision: a scaled reading that agrees with the value computed from the measured current within one count, 0.024 psi here, proves signal, conversion and scaling together, so accept the channel. A stable disagreement larger than two counts, 0.05 psi here, points at wrong raw endpoints or a format mismatch; fix the configuration, not the math. A raw value that jumps while the meter holds 12.0 mA points at terminations, shielding or the channel itself, and scaling is not the place to work.
Prove signal, format, then scaling #
- Measure the field signal at the module terminals and compare its direction and stability with the raw value on the same channel.
- Confirm the channel the program references is the channel you are measuring; a stable neighbor can impersonate a dead input.
- Confirm the configured input type matches the connected device, using the module configuration and the device documentation.
- Confirm the data format, binary or BCD, and the raw endpoints before touching any math.
- Apply the linear scaling, then verify at two distinct process conditions with nearby loads switching, because induced noise often appears only then.
- For an output, command two levels, confirm the delivered code, measure the terminals, and watch the load.
Traps that cost an afternoon #
- Replacing a module whose raw value already tracks the measured signal; the fault is then in scaling, mapping or the field device.
- Swapping the transmitter when the raw value is stable but wrong; that fault sits in format or endpoints.
- Decoding three-digit BCD as ordinary binary and hunting a wiring fault that is not there.
- Assuming every analog input shares one electrical range or one set of raw endpoints.
- Adding heavy filtering to calm a noisy display instead of repairing the shield, the routing or the termination; the display goes quiet and real process changes arrive late.
Questions asked
Why does a 12-bit converter give 4,096 counts but a top code of 4,095?
Twelve binary bits give 2 to the 12th power combinations, which is 4,096, and counting starts at zero, so the codes run from 0 through 4,095. The least significant bit is worth one count, which on an endpoint-inclusive channel equals the span divided by 4,095, about 0.0244 psi in the worked example. A value landing between codes reads to the nearer one, which is why 12.0 mA came out half a count from 50.00 psi.
Can I correct a binary versus BCD mismatch with scaling constants?
No. The number the program computes when it decodes BCD as plain binary is not a linear function of the true value; it jumps at every decimal digit boundary, so one slope and offset cannot repair it across the range. Use the module format setting or a BCD conversion instruction before any engineering-unit scaling. The symptom is a stable reading that is wrong by an amount that changes with signal size.
Do current loops need shielded cable like thermocouples do?
A 4-20 mA loop carries a much higher level signal than a thermocouple, so it picks up far less interference, but shielded twisted pair is still the normal choice near drives, contactors and switching power. The 4 mA live zero also gives you a broken-wire test: a sound loop never reads below 4 mA, so a raw value pinned near zero means an open conductor, not zero process.
Is 12-bit resolution enough for my process?
Compare one count with the smallest change you act on. On a 0-100 psi span, one count is 100 divided by 4,095, about 0.0244 psi. If your smallest meaningful change is 0.5 psi, that change covers roughly twenty counts and 12 bits is comfortable. If you need to resolve 0.01 psi, one count is larger than your requirement and you need a finer converter.
How do I test an analog output channel end to end?
Command two levels near opposite ends of the range, for example 25 percent and 75 percent, and at each one confirm the code the module receives, measure the voltage or current at its output terminals, and watch the connected device respond. Both points should land within one count of the module documented code-to-signal mapping. With the load disconnected, follow the machine isolation procedure first.