S7-1200 Analog Output Configuration in TIA Portal: Scaling Guide

David Krause16 min read
S7-1200SiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

S7-1200 Analog Output Configuration in TIA Portal: Scaling Guide

The Siemens SIMATIC S7-1200 PLC family supports analog outputs on the CPU itself (CPU 1211C/1212C/1214C/1215C/1217C), on signal boards (SB 1232), and on signal modules (SM 1232, SM 1234). Configuring these outputs in TIA Portal involves three distinct steps: hardware parameter assignment (output type, range, diagnostics), output address resolution, and program-side scaling of the engineering value to the raw 16-bit output word (AQW). This guide consolidates the field-proven procedure with the scaling rules, the SCALE_X and NORM_X instruction mechanics, and the most common commissioning faults that prevent the analog output from producing the expected voltage or current.

For the official CPU electrical specifications, refer to the S7-1200 Manual Collection – CPU 1215C Analog Inputs and Outputs. The complete S7-1200 system manual is available from Siemens support under order number 6ES7298-8FA0-8BA0 and the TIA Portal help system.

1. Analog Output Hardware Architecture on the S7-1200

The S7-1200 platform distributes analog outputs across four physical locations:

Location Module / Board Channels Order Number Notes
CPU onboard CPU 1215C DC/DC/DC 2 AO (AQW96, AQW98) 6ES7215-1AG40-0XB0 Voltage or current, software-configured
CPU onboard CPU 1215C DC/DC/Rly 2 AO 6ES7215-1HG40-0XB0 Output is voltage/current, relays are digital
Signal Board (SB) SB 1232 AQ 1x12 bit 1 AO 6ES7232-4HA30-0XB0 Plugs into CPU front, no slot extension
Signal Board (SB) SB 1232 AQ 1x16 bit 1 AO 6ES7232-4HB30-0XB0 Higher resolution, single channel
Signal Module (SM) SM 1232 AQ 2x14 bit 2 AO 6ES7232-4HB32-0XB0 Right-side DIN-rail module
Signal Module (SM) SM 1232 AQ 4x14 bit 4 AO 6ES7232-4HD32-0XB0 Four channels, bipolar optional
Signal Module (SM) SM 1234 AI4/AQ2x14 bit 2 AO + 4 AI 6ES7234-4HE32-0XB0 Mixed module

Onboard outputs of the CPU 1215C (firmware V4.x and later) support output type "Voltage" (0–10 V) or "Current" (0–20 mA), selectable per channel in the device configuration. Bipolar ranges (±10 V, ±20 mA) are available on the SM 1232 14-bit modules but not on the CPU onboard outputs.

Important: Each analog output channel on the S7-1200 is configured as either voltage or current. A single channel cannot drive both loads simultaneously. Wiring the load to the wrong terminals (e.g., connecting a current load to the voltage output pin) will not produce a valid signal and may damage the output driver under fault conditions.

2. Prerequisites

Verify the following before configuring an analog output in TIA Portal:

  • Software: TIA Portal V15.1 or later (V17 / V18 recommended for the most current S7-1200 firmware support). The same project file is compatible across versions unless you upgrade to a newer S7-1200 CPU firmware (V4.5+) which requires TIA V16+.
  • PLC firmware: CPU 1215C firmware V4.2 or later for full TIA Portal V17 compatibility. Use Online > Accessible devices or the SIMATIC Automation Tool to read the firmware version.
  • Hardware configuration downloaded: The TIA Portal project must be compiled and downloaded to the PLC so that the analog output module is recognized by the CPU. A common commissioning failure is the operator never performing a hardware download after adding a new SM or SB; the CPU retains the previous configuration and the output never activates, even though the program writes the AQW correctly.
  • Load wiring: The output terminal block is wired per the S7-1200 wiring diagram. For voltage output, connect the positive load to the channel terminal (Vo+) and the return to the analog common (M). For current output, the same two terminals are used, but the load is wired in the current loop.
  • Engineering value source: A REAL (LREAL optional) tag representing the physical value (e.g., 0.0–100.0 % valve position, 0–500.0 °C setpoint, 4.0–20.0 mA loop value) must be available in the data block or tag table.

3. Hardware Configuration of the Analog Output

The first engineering task is registering the analog output module in the device view. The address range, output type, and diagnostics behavior are all set here, not in the program.

3.1 Adding the Module

  1. Open the TIA Portal project and double-click Devices & networks.
  2. Select the S7-1200 CPU in the device view.
  3. Open the hardware catalog on the right side.
  4. Drill into PLC > Signal modules / Signal boards / Communication modules and drag the SM 1232 (or SB 1232) onto the right-side slot of the CPU. The slot becomes visible in the device view.
  5. For onboard outputs, the CPU symbol already contains the AO channels; click on the analog output block on the CPU to expose the channel properties.
  6. Save the project.

3.2 Setting the Output Type and Range

Click on the analog output channel (Channel 0 / Channel 1). The properties inspector opens with the following relevant fields:

Parameter Typical Setting Effect
Output type Voltage / Current Selects the analog hardware driver
Output range 0–10 V, 0–20 mA, ±10 V, 4–20 mA, ±20 mA Defines the engineering-to-DAC mapping
Diagnostics – Wire break Enable (for current outputs) Triggers OB82 on open current loop
Diagnostics – Short circuit Enable (for voltage outputs) Triggers OB82 on overloaded voltage output
Substitute value 0 or configured value Value written to AQW on CPU STOP
Reaction to CPU STOP Use substitute / Keep last value / Output 0 Defines output behavior in STOP
Reaction to CPU STOP: For fail-safe valves and dampers, configuring Use substitute value with a defined safe position (e.g., 0 % = 0 V) prevents the actuator from drifting to a hazardous state on a PLC stop. For test setups, Keep last value simplifies debugging by holding the last commanded output.

4. I/O Address Mapping

The analog output word (AQW) is a 16-bit integer that the S7-1200 firmware maps to the DAC for the configured channel. The integer range depends on the selected output type:

Output Range Integer Value (decimal) Integer Value (hex) Notes
0–10 V unipolar 0 to 27648 0x0000 to 0x6C00 0 = 0 V, 27648 = 10 V
0–20 mA unipolar 0 to 27648 0x0000 to 0x6C00 0 = 0 mA, 27648 = 20 mA
4–20 mA unipolar 0 to 27648 0x0000 to 0x6C00 0 = 4 mA, 27648 = 20 mA (use SCALE with offset)
±10 V bipolar –27648 to 27648 0x9400 to 0x6C00 (two's complement) 0 = 0 V, –27648 = –10 V
±20 mA bipolar –27648 to 27648 0x9400 to 0x6C00 Bipolar current on SM 1232 only

Default output addresses for the S7-1200 CPU 1215C are AQW96 (Channel 0) and AQW98 (Channel 1). The first SM 1232 starts at AQW100 by default, incrementing by 2 per channel. TIA Portal reassigns the addresses automatically when modules are added or removed; always verify the actual address in the device view Properties > I/O addresses tab.

5. SCALE_X and NORM_X Mechanics

The S7-1200 instruction set includes two complementary conversion blocks in the Convert operations folder:

  • NORM_X (Normalize): Maps a REAL value within a defined MIN/MAX envelope to a normalized 0.0–1.0 REAL output. The result preserves the input's proportional position in the input range.
  • SCALE_X (Scale): Maps a normalized 0.0–1.0 REAL input to a value within a defined MIN/MAX envelope of the output type. The result is REAL for output values, but typically connected to a ROUND instruction before being moved to an integer AQW.

The output of SCALE_X is REAL, so for an analog output you connect SCALE_X's output to ROUND (or truncate with _REAL_TO_INT) to produce the 16-bit integer that the AQW expects.

5.1 The Output Signal Chain

For an analog output, the chain is:

Engineering value (REAL, e.g. 0.0–100.0 %)
     |
     v
NORM_X  (input MIN=0.0, MAX=100.0  -> output 0.0–1.0)
     |
     v
SCALE_X (input MIN=0.0, MAX=1.0   -> output 0.0–27648.0)
     |
     v
ROUND  (REAL -> INT)
     |
     v
MOVE   (INT to AQWxxx)
     |
     v
DAC -> voltage or current loop

For a 4–20 mA loop, the engineering value of 0 % should produce 4 mA (AQW = 0) and 100 % should produce 20 mA (AQW = 27648). One practical SCALE_X alternative is to skip the NORM_X step and place the engineering value directly into SCALE_X with MIN=0.0 and MAX=100.0, then connect the SCALE_X output to a subsequent block that subtracts the 4 mA offset. Most field implementations use a single SCALE_X with adjusted parameters:

SCALE_X (MIN = 0.0, MAX = 100.0, REAL input = 0.0–100.0 %)
     -> output REAL 0.0–27648.0
     |
     v
ROUND  -> INT
     |
     v
MOVE   -> AQWxxx (channel set to 4–20 mA)

When the channel is configured for 0–20 mA, the same SCALE_X value (0 to 27648) produces 0 mA at the low end. For 4–20 mA, the firmware maps AQW 0 to 4 mA and AQW 27648 to 20 mA; the S7-1200 does the offset internally. Confirm this in the channel configuration: when "4–20 mA" is selected, the integer 0 still represents the 4 mA loop minimum — no program-side offset is required.

Common scaling error: A SCALE_X block that has its MIN and MAX reversed (e.g., MIN = 100, MAX = 0) will produce inverted output, and the analog output will move to its maximum value when the engineering value is zero. Confirm direction by commanding 50 % of the engineering range and verifying the output is 50 % of the configured range (5 V on a 0–10 V output, 12 mA on a 4–20 mA loop).

6. Step-by-Step Output Configuration Procedure

6.1 Build the Project Skeleton

  1. Create a new TIA Portal project or open the existing one.
  2. Add the S7-1200 CPU (Insert > Device > SIMATIC S7-1200 > CPU ...).
  3. Add the signal module or signal board in the device view if additional analog outputs are needed.
  4. Open the channel properties of the analog output. Set Output type and Output range per the actuator specification. Enable Wire break or Short circuit diagnostics as appropriate.

6.2 Declare the Tags

Open a global data block (DB) or use the PLC tags table. Declare:

DATA_BLOCK "ValveCtrl"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
NON_RETAIN
  STRUCT
    rSpPercent       : REAL;   // 0.0–100.0  commanded valve position
    rSpEng           : REAL;   // engineering value (degC, bar, etc.) if used
    iRawOut          : INT;    // scaled 0–27648 integer for the AQW
    rNormValue       : REAL;   // 0.0–1.0 intermediate
  END_STRUCT;
END_DATA_BLOCK

6.3 Build the Scaling Network in LAD or FBD

The following is a complete ladder logic network that takes "ValveCtrl".rSpPercent (0.0–100.0 %) and writes the corresponding raw integer to the first onboard analog output:

Network 1: Scale valve setpoint 0–100 % to 0–27648

      "ValveCtrl".rSpPercent                              "ValveCtrl".rNormValue
--[ NORM_X  MIN := 0.0, MAX := 100.0 ]----------------[ SCALE_X  MIN := 0.0, MAX := 27648.0 ]--
                                                                                    |
                                                                                    v
                                                                       [ROUND] "ValveCtrl".iRawOut
                                                                                    |
                                                                                    v
                                                                       [MOVE  ] PQW96   (AQW as output)

Notes on this network:

  • The NORM_X–SCALE_X chain is the canonical S7-1200 method. It allows mid-stream clamping (the output cannot exceed the SCALE_X MAX even if the input is out of range).
  • The ROUNDP rounding direction can be set in the SCALE_X properties. The default is round-to-nearest.
  • PQW96 is the peripheral output word; reading it back returns the value most recently written to the DAC.
  • For an SM 1232 occupying a higher address, substitute the correct AQW from the device view (e.g., AQW100 for the first SM 1232 channel).

6.4 Compile and Download Hardware Configuration

  1. Right-click the PLC > Compile > Hardware (rebuild all). Resolve any compile errors — a typical error is "Module position is invalid" when an SM is dragged to an occupied slot.
  2. Connect to the CPU. Right-click the PLC > Download to device > Hardware and software (only changes). The first download of a new project must include the hardware; subsequent downloads can be software-only.
  3. Confirm the prompt to overwrite the PLC configuration. The CPU will go to STOP briefly during the hardware download, then return to RUN if the PLC start mode is configured for "Restart" or "Warm restart".
Most common cause of "analog output not working": The hardware configuration is never downloaded to the PLC. The user adds the SM 1232 module to the TIA Portal project, writes the program, and downloads only the program blocks. The CPU firmware continues to use the previous I/O configuration, which has no entry for the new SM, and the output channel does not exist. TIA Portal will not auto-detect the new hardware — the explicit hardware download is mandatory after inserting or changing a module.

6.5 Download the Software

  1. With the hardware downloaded and the CPU in RUN, right-click the PLC > Download to device > Software (only changes) to update the program blocks.
  2. Confirm the security prompt (enter the PLC protection password if one is set).
  3. Verify in the online diagnostics that the CPU is in RUN and that the analog output shows the expected I/O status ("OK", no module fault).

7. Verification and Online Monitoring

After the download, use the TIA Portal online tools to confirm the analog output behaves as expected.

7.1 Watch Table

  1. Open Watch & force tables > Add new watch table.
  2. Add tags: "ValveCtrl".rSpPercent, "ValveCtrl".iRawOut, %QW96.
  3. Click Monitor all (the glasses icon). Change rSpPercent with Modify > Modify value to 0.0, 50.0, and 100.0.
  4. Confirm iRawOut reads 0, ~13824, and 27648 respectively, and %QW96 tracks iRawOut exactly.

7.2 Physical Measurement

With a calibrated multimeter on the output terminals:

Commanded % Expected AQW Expected Voltage (0–10 V) Expected Current (4–20 mA)
0 % 0 0.000 V 4.000 mA
25 % 6912 2.500 V 8.000 mA
50 % 13824 5.000 V 12.000 mA
75 % 20736 7.500 V 16.000 mA
100 % 27648 10.000 V 20.000 mA

Deviation greater than ±0.5 % of full scale typically indicates either a wiring fault, an output-type mismatch (voltage selected with a current-only load, or vice versa), or an attempt to drive a 4-wire device from a 2-wire current output. The S7-1200 current outputs are self-powered (they source the loop current) and do not require an external loop supply.

8. Troubleshooting Matrix

Symptom Likely Cause Verification Fix
Output reads 0 V / 0 mA regardless of program Hardware configuration not downloaded Online > Diagnostics > Module information shows old module list Download hardware configuration to PLC
Output always at full scale (10 V or 20 mA) SCALE_X MIN/MAX reversed, or wrong integer value written Watch table on the AQW tag Reverse MIN/MAX or correct the scaling
Output is stuck at 4 mA on 4–20 mA channel Program writes 0 to AQW; 4 mA is the loop minimum Verify commanded value is > 0 % Force a 50 % value to confirm scaling
Output value is noisy / jitters by 1 LSB SCALE_X not rounded before MOVE Compare AQW to expected value Insert ROUND or _REAL_TO_INT between SCALE_X and MOVE
Wire break diagnostic on a current loop Open circuit in the current loop or wrong output type Check wiring continuity; verify channel type in HW config Repair wiring or correct channel type
Short circuit diagnostic on a voltage output Output overloaded; load impedance too low Measure load resistance; spec is ≥ 1 kΩ for voltage output Reduce load or use current output type
Output holds last value on PLC STOP but should be 0 STOP reaction set to "Keep last value" Device view > channel > Reaction to CPU STOP Set to "Use substitute value" with 0
Compile error: "Address already in use" Two modules assigned overlapping addresses Device view > I/O addresses tab Right-click > Reset addresses and recompile
AQW shows correct value in watch table but physical output is wrong Faulty module or wrong channel wired Swap to spare channel or test with multimeter at terminal Replace module or correct wiring

9. Advanced Topics

9.1 Cyclic vs. Direct Write of the AQW

Analog outputs on the S7-1200 are updated at the end of each OB1 cycle. Writing to the AQW inside a fast OB (e.g., OB35) updates the output at the OB execution rate, not at the OB1 rate. For servo-valve or PWM-equivalent applications requiring deterministic update intervals, place the scaling in OB35 and accept the cyclic jitter inherent in the PLC scan. The S7-1200 does not have a hardware-DAC dual-buffering mode like older S7-300 AO modules.

9.2 Substitute Value Behavior

When the CPU transitions to STOP, each analog output is governed by the Reaction to CPU STOP parameter:

  • Output 0: AQW is forced to 0. The DAC produces 0 V or 0 mA (4 mA for 4–20 mA channels).
  • Keep last value: AQW retains the last value written before the STOP transition. The DAC holds the corresponding voltage or current.
  • Use substitute value: The value configured in the channel properties is written to the AQW on STOP. This is the option used for fail-safe process shutdown.

9.3 Reading Back the Output

The peripheral output word PQW returns the value currently held in the DAC, which may differ from the value most recently written to the AQW if the PLC is in STOP and a substitute value is being applied. Use PQW rather than AQW when you need to confirm the actual hardware output, including substitute-value behavior. Note that PQW and AQW reference the same memory in the S7-1200; the difference is purely in the read context (peripheral I/O update vs. process image update).

9.4 Multi-Channel Actuator Synchronization

For applications where two analog outputs must be updated in lock-step (e.g., coordinated hydraulic actuators), write both AWQ values within the same network or OB1 cycle. The S7-1200 firmware updates all analog outputs at the end of the cycle, so writing both within a single scan produces synchronized transitions. Splitting the writes across two OBs introduces a one-scan delay between the outputs.

Why does my analog output show 0 V even though the program writes a non-zero value?

The most common cause is that the hardware configuration (the new SM 1232 or SB 1232 added in the device view) was never downloaded to the CPU. Perform a full hardware-and-software download from TIA Portal. Verify the module is recognized under Online > Diagnostics > Module information.

What is the correct scaling sequence for an analog output on the S7-1200?

For an engineering value of 0.0 to 100.0 %: NORM_X with MIN=0.0, MAX=100.0 produces 0.0 to 1.0; SCALE_X with MIN=0.0, MAX=27648.0 produces the 0–27648 raw integer; ROUND converts the REAL to INT; MOVE writes the INT to the AQW. The AQW range is 0 to 27648 for unipolar voltage and current outputs.

How do I produce a 4–20 mA signal instead of 0–20 mA?

Set the channel output range to "4–20 mA" in the device view (Properties > Analog outputs > Channel > Output range). The S7-1200 firmware maps integer 0 to 4 mA and integer 27648 to 20 mA internally; no program-side offset is required. Verify with a multimeter in current mode in series with the load.

What integer value represents 0 V and what represents 10 V on the CPU 1215C onboard outputs?

Integer 0 (0x0000) represents 0 V and integer 27648 (0x6C00) represents 10 V. The 12-bit DAC quantizes the 0–10 V range into 27648 steps, giving a resolution of approximately 0.36 mV per LSB. For SM 1232 with 14-bit resolution, the same 0–27648 integer mapping applies but the underlying DAC has 16384 discrete levels, with averaging used to produce the 27648-step output.

Can I write to the AQW directly without using NORM_X and SCALE_X?

Yes. If the program already holds a 0–27648 integer (for example, from a recipe or a pre-scaled HMI input), you can MOVE that integer directly to the AQW. The NORM_X and SCALE_X chain is only required when the program value is in engineering units (REAL with a user-defined range). Bypassing the scaling blocks is a common simplification in OEM machine code.

Back to blog