Explainer
Why the S7-200 PID wizard scales inputs to 0.0 to 1.0
Short answer
The S7-200 PID instruction computes every loop variable as a REAL normalized between 0.0 and 1.0, so raw AIW0 counts, the engineering-unit setpoint in VD200 and the AQW0 count never enter the loop table directly. The Micro/WIN wizard does the conversions; your inputs are the span and the loop direction.
On this page
If the S7-200 PID wizard seems to ignore your numbers, it is because the instruction never sees them in your units. The PID computes every loop variable — process variable, setpoint, output — as a REAL normalized between 0.0 and 1.0, and the loop table it reads holds nothing else. AIW0, VD200 and AQW0 in your call sit on the raw side of that fence, and the Micro/WIN PID wizard owns every conversion between the two sides. Give the wizard the correct span and the loop direction, and a 30 to 100 °C heater loop lands at 10 V with the process cold and zero at setpoint.
The loop table holds only normalized REAL values #
The loop table is a block of V memory that belongs to one control loop. It stores the process variable, the setpoint, the output, the gains, the accumulated integral and internal bookkeeping, all as REAL fractions of the loop range: 1.0 means the full range, 0.0 means none of it. The instruction never touches counts or degrees.
That is why the belief that the process variable must arrive as a raw count breaks most first attempts. The wizard-generated routine takes the loop's PV, setpoint and output as parameters, converts each across the span you configured, writes the results into the table and runs the PID from there. Your call already wires PV to AIW0 and SP to VD200 — those operands belong to the wizard's routine, and the routine is where the conversion happens. Call it every scan with SM0.0 as the enable; a loop called only on a condition integrates on an irregular clock and tunes badly.
What the wizard asks you to supply #
The wizard walks you through a short list of fields, and each one exists because the table cannot hold your units:
- Loop number and the V-memory address of the table, for example VB100. The table for one loop occupies 80 bytes, so place any second loop's table clear of the first.
- The process variable span in engineering units, low limit and high limit. Your low and high temperatures belong here.
- The output range: unipolar or percent. Pick unipolar for the EM232 voltage output, and the wizard converts the table's output fraction to the count it writes to AQW0.
- The loop direction: reverse acting for heating, direct acting for cooling.
- Initial gains, which you can leave conservative and tune once the loop runs.
The setpoint you pass in is not converted in place: it must already be a REAL in the same engineering units as the span. The wizard also needs a Micro/WIN release that matches your CPU; if the PC still runs an old copy, this guide to the right Micro/WIN version for an S7-200 CPU 224 walks through the check.
Worked example: 30 to 100 °C heater loop on a 0 to 10 V output #
The inputs, and where each comes from:
- Process variable span: 30.0 low to 100.0 high, in °C — the reader's own case.
- Setpoint: 100.0, stored as a REAL in VD200 — the reader's own case.
- Output: unipolar 0–10 V on AQW0 into the EM232, 32000 counts at full scale, which is 3200 counts per volt — the EM232's unipolar voltage range.
- Loop table: 80 bytes at VB100.
Rule in words: the wizard converts each reading to a fraction of the span, normalized = (PV − low) ÷ (high − low), and converts the commanded output fraction back to a count for AQW0.
Arithmetic, with the process variable at 65.0 °C:
- Normalized PV: (65.0 − 30.0) ÷ (100.0 − 30.0) = 35.0 ÷ 70.0 = 0.5
- AQW0 count at a commanded half output: 0.5 × 32000 = 16000 counts
- Voltage at the actuator: 16000 ÷ 3200 = 5.0 V
- Cold limit, reverse acting: fraction 1.0, full-scale counts, 10.0 V
- Setpoint: fraction 0.0, zero counts, zero volts
The decision this example enforces: the span belongs in the wizard, the fraction in the table and the count at AQW0. A raw count copied into the table reads as a nonsense fraction and pins the output at one rail — an AQW0 that never moves regardless of temperature is the tell, and the fix is entering the span in the wizard, not reformatting the call.
The inverted output is a loop-direction setting, not a wiring trick #
Full voltage at the coldest reading and none at setpoint is exactly what a reverse-acting loop produces when the setpoint sits at the top of the span: a cold process variable falls far below setpoint, the output drives high, and it falls away as the process closes on setpoint. Select reverse acting in the wizard and leave the span at its low and high limits as entered.
Do not create the inversion by swapping the thermocouple leads. A reversed thermocouple puts a fixed cold-junction offset into every reading, so the loop controls faithfully — to the wrong temperature. Do not enter the span inverted either: the wizard expects the low limit below the high, and direction is the setting that reverses the action.
Prove the scaling before you close the loop #
Put the loop in manual and force the PV input to both ends of the span, confirming that the count written to AQW0 follows the fractions in the worked example. Then read the process variable back from the table in V memory at its offset from VB100: it should display as a REAL fraction between the limits, and an integer there means the conversion is not running. Finally, pull the process variable below setpoint and confirm the output rises, then let the loop settle and watch the output fall back as the process closes on setpoint.
Keep a hardware overtemperature cutout in the heater circuit: a failed output transistor or a halted scan removes every software limit at once, and scaling checks do not catch it.
If a module reports a no-user-power fault after you wire the rack, that is supply wiring rather than scaling, and this S7-200 EM231 and EM232 no-user-power error resolution page covers that fault.
Questions asked
Can I pass AIW0 raw counts straight into the PID loop table?
No. The table stores normalized REAL values only, so a raw count lands as a fraction close to zero and the output reacts as if the process never leaves the bottom of the span. Enter the engineering span in the wizard and let its routine convert AIW0 every scan.
Why does the heater sit at zero volts while the process is cold?
The loop direction is set to direct acting. For heating, the output must rise when the process variable falls below setpoint, which is the reverse-acting setting in the wizard. Do not fix it by swapping thermocouple leads: reversal adds a cold-junction offset to every reading, and the loop then holds a constant, wrong temperature.
What format does the setpoint in VD200 need?
A REAL in the same engineering units as the span you gave the wizard, never an integer. An integer placed in a REAL location decodes as a tiny fraction, the loop sees a setpoint near the bottom of the span, and the output drifts without ever settling.
Does the newer S7-200 SMART treat the output the same way?
Yes. The S7-200 SMART PID manual defines the loop output as a real number between 0.0 and 1.0 representing the share of the output range, so an entry of 0.5 commands half of the output span. Scale at the module boundaries on that platform too and keep the loop arithmetic in fractions.