The Problem: PQW Values Cannot Be Monitored in a VAT
When commissioning an S7-300, S7-400, or compatible S7-1200/1500 project, an engineer typically opens a Variable Table (VAT) and types PQW300 expecting to observe the current value being driven to an analog output module. The watch table returns ---, an asterisk pattern, or a status indicating the value cannot be read. The same is true for PQ byte and PQD double-word references.
Symptom summary:
- Reading
PIWin a VAT works without issue and returns the live value from the input module. - Reading
PQWin the same VAT returns-----or an error indicator; no numeric value is displayed. - Writing
PQWfrom the VAT works correctly and the actuator responds, but the forced value cannot be displayed back. - Bit-level
PAW,PQB, andPQDaliases behave identically.
This is not a project bug or a defective signal module. It is a fundamental property of the S7 peripheral-access model and the bus cycle architecture of PROFIBUS DP and PROFINET IO.
Root Cause: Why PIW Reads and PQW Reads Behave Differently
The PIW/PQW operand prefix (Peripherie-Eingang/Ausgang) tells the CPU to access the module hardware directly through the backplane bus or field-bus (PROFIBUS DP / PROFINET IO). The CPU does not maintain a shadow copy of PQW values because outputs are write-only from the application's perspective.
When the user program executes L PIW 300, the CPU issues a read on the peripheral backplane and the input module returns the converted analog value. When the user program executes T PQW 300, the CPU issues a write to the output module and the value latches at the DAC.
Reading PQW 300 in a VAT forces the same peripheral read. The peripheral interface only supports read on input modules and write on output modules. There is no read-back path from a write-only output channel, so the result is undefined.
In contrast, QW, QW30, and QW256 address the process image output area (PAE/PAA), which is a memory mirror the CPU updates from your program each OB1 cycle. Because the mirror is read/write, VAT monitoring works.
This distinction is documented in the SIMATIC S7 programming reference and is the root cause of every variation of this question.
P (PIW, PQW, PIB, PQB, PID, PQD) is a peripheral access and is one-directional for the cycle. Use the non-prefixed form (IW, QW, IB, QB, ID, QD) to get bidirectional behavior.The S7 Process Image Architecture
The CPU maintains two process-image tables in work memory:
- Process Image of the Inputs (PII) — refreshed from input modules at the start of each OB1 cycle.
- Process Image of the Outputs (PIQ) — written to output modules at the end of each OB1 cycle.
Addresses inside the PII/PIQ are referred to as I/QW, IB/QB, ID/QD (no P prefix). Addresses outside the configured process image fall through to peripheral access (PIW/PQW).
For VAT monitoring and forcing to work on outputs, the address must be inside the configured process image. Forcing the value through the VAT updates the PII/PIQ mirror, and the user program reads the new value next cycle.
| Operand | Region | Read in VAT? | Write in VAT? | Used in program |
|---|---|---|---|---|
IW 30 |
Process image input | Yes | Yes (force) | Yes |
PIW 300 |
Peripheral input (outside PI) | Yes | No | Yes |
QW 30 |
Process image output | Yes | Yes (force) | Yes |
PQW 300 |
Peripheral output (outside PI) | No | Yes | Yes |
Watch tables, also called Variable Tables in STEP 7, are the standard tool for monitoring and modifying values while the CPU is in RUN or RUN-P. The official TIA Portal documentation describes watch tables as the mechanism to "perform monitoring and control functions on data points as the CPU executes your program." The same limitations on PQW read-back apply in TIA Portal as in STEP 7 Classic. See the SIMATIC S7-1200 manual collection — Watch tables for monitoring the user program for the official description.
Workaround 1: Mirror the PQW to a Memory Word (MW)
This is the fastest, lowest-risk fix and is the universal answer when you cannot modify the hardware configuration.
Principle: every time the program writes to the peripheral output, also write the same value to a marker word in the bit-memory (M) area, a data block (DB), or a temporary area you keep in a global DB for diagnostics.
ST example (SCL):
// FB or OB1
// Drive the analog output
#raw_output := #scaled_value; // INT, e.g. 0..27648
T PQW 300; // physical write to module
T MW 200; // mirror for VAT monitoring
Ladder example (FBD/ST equivalent):
| scaled_value | PQW300 |
|-----[ MOVE ]------------------( )-----------|
| MW200 |
Monitor in VAT:
Address Symbol Display Modify
MW 200 AO_mirror ... 0..27648
The MW copy always shows the last value the CPU attempted to output. Because the mirror and the peripheral write happen back-to-back in the same network, you are guaranteed temporal consistency within the cycle.
Disadvantages:
- Doubles the byte count of the instruction.
- If anyone changes the PQW value from another source (HMI forced write, another FB, a second VAT), the MW mirror may go out of sync.
- You do not see the value the module actually converts — only what the CPU wrote. Watch for fieldbus retries, slave diagnostics, or channel faults that could suppress the output even though the MW shows a value.
Workaround 2: Move the PQW Into the Process Image (Recommended)
This is the long-term, "do it once" fix. The CPU mirrors outputs to the process image, the user program reads/writes that mirror, and VAT reads/writes the same mirror.
The procedure depends on the configuration tool you use.
STEP 7 Classic (S7-300/S7-400)
- Open the SIMATIC Manager and your S7 project.
- Open HW Config for the station containing the CPU.
- Double-click the analog output module in the rack or PROFINET/PROFIBUS slave view.
- Note the current I/O addresses — e.g.
PQW 300..303for one 4-channel AO module. - Open the Properties dialog and select the Addresses tab.
- Uncheck "Process image" for the current range, then re-enter the starting address inside the configured process image — e.g.
QW 30instead ofPQW 300. - Click OK, then save and recompile (Station → Save and Compile).
- Download the hardware configuration to the CPU (target system must be in STOP or RUN-P with appropriate privilege).
- Open your VAT and replace
PQW300withQW30. The value now displays live and can be forced.
Repeat for every analog output module that needs to be monitored. Once inside the process image, your FBD/LAD/SCL programs may continue to use the QW operand (or you can keep PQW if the address still falls inside the process image — the CPU accepts both forms for the same address).
TIA Portal (S7-1200 / S7-1500 / S7-300/400 compatible)
- Open the project and navigate to Devices & Networks.
- Select the analog output module in the device view or network view.
- Open Properties → I/O addresses.
- Clear "Process image" in the drop-down if it shows "None", or set the start address to a value inside the CPU's process image range.
- Compile the hardware configuration (Compile → Hardware (rebuild all)).
- Download to the PLC.
- In the watch table, monitor
%QW30(absolute) or the symbolic tag.
Process Image Size by CPU Family
The maximum address range that can live inside the process image depends on the CPU. If your analog output module's addresses exceed the configured size, the CPU falls back to peripheral access and the PQW read-back issue returns.
| CPU family | Default PII / PIQ size (bytes) | Configurable in HW Config | Notes |
|---|---|---|---|
| S7-300 (CPU 31x) | Varies by CPU type | Yes (where supported by firmware) | Some older CPU 31x variants cap the process image; verify in the CPU's Object Properties. |
| S7-400 (CPU 41x/416/417) | Varies by CPU type | Yes | Process image can typically be increased via HW Config or the CPU's Object Properties → "Process Image" tab. |
| S7-1200 (CPU 12xx) | 1024 bytes I / 1024 bytes O | Yes (firmware ≥ V4) | From the device view, change the process image limits per partition. |
| S7-1500 (CPU 15xx) | 32 KB I / 32 KB O (typical) | Yes | Configured in Devices & Networks → CPU Properties → "Process image" area. |
| ET 200SP / ET 200MP head modules | Delegated to host CPU | N/A (no CPU) | Limit set by the host controller. |
Confirm exact limits in the datasheet for your specific CPU order number (e.g. 6ES7 315-2EH14-0AB0). When the configured process image is too small for your AO addresses, you have three options:
- Enlarge the process image (if the CPU supports it and free work memory allows).
- Re-slot the module to a lower address range.
- Use Workaround 1 (MW mirror).
When to Use Which Workaround
| Scenario | Recommended fix | Rationale |
|---|---|---|
| Greenfield project, AO module not yet wired up | Workaround 2 (re-address into PI) | Cleanest, no extra code, fully symbolic. |
| Brownfield retrofit, existing wiring and documentation stable | Workaround 1 (mirror to MW) | No risk of changing address assignments documented elsewhere. |
| Third-party PROFINET device, addresses cannot be changed | Workaround 1 (mirror to MW or DB) | Only available option — vendor-locked I/O mapping. |
| Need to verify the value actually reaches the field device | Both — mirror in MW for trending, plus read back via analog input echo if hardware supports it | MW mirror shows what the CPU attempted; the AI channel shows what was actually applied. |
| Safety-related output (F-CPU, PROFIsafe) | Use vendor-supplied diagnostics block; do not rely on PQW mirror alone | Safety outputs require certified read-back, not a free MW copy. |
Step-by-Step Verification Procedure
After applying either workaround, verify the result end-to-end before signing off on commissioning.
- Confirm the operand is in the process image. In STEP 7, hover the address in the editor or check HW Config → module Properties → Addresses tab. In TIA Portal, inspect the I/O addresses tab of the device.
- Open the VAT / watch table and connect to the target CPU. Establish an online connection. The status column should show green "Monitored".
-
Force the value. Enter
12345in the Modify column forQW30(orMW200for the mirror). Apply with the "Modify now" or "Modify once" button. - Observe the field device. Measure the analog output with a calibrated multimeter or HART communicator. The reading should match the forced value within module tolerance (typically ±0.5% of full scale).
- Read back the value in the same VAT. The Display column must show the forced value. If it shows dashes, the address is still outside the process image.
- Stop forcing and confirm the program drives the value. Switch the CPU from "Force" to "Monitor" mode. The user program should overwrite the VAT-forced value on the next OB1 cycle.
- Capture a sequence (trace). For intermittent issues, record the MW mirror with the S7 Trace / TIA Trace function. This is invaluable when debugging PID loops or valve-positioning ramps.
Edge Cases and Field-Proven Caveats
OB1 process image update only — OB3x interrupt priority: Outputs written inside a time-of-day interrupt (OB10) or cyclic interrupt (OB30..OB38) update the peripheral module immediately. The process image is only refreshed by OB1 at its next scan. If your VAT reads QW30 but the AO is being driven from OB35, you will see the OB1 value, not the OB35 value.
Partial process image update with SFC 26 / SFC 27: Calling UPDAT_PI / UPDAT_PO from the program updates only the specified slice. When MW mirroring is used together with these SFCs, be aware that the MW mirror is updated by your MOVE, not by the SFC, so order of operations matters in OB100 (startup).
PROFINET IRT and isochronous mode: Outputs in the isochronous data area are written from the IRT cycle, not OB1. Even if the address is in the process image, the value you read in the VAT is the OB1 cycle value, not the deterministic IRT value. Use Trace for true verification.
Shared outputs on PROFIsafe / F-modules: Do not mirror F-outputs to MW for monitoring; the safety stack manages passivation and read-back through certified channels. An MW mirror can mislead commissioning engineers into believing a channel is active when the F-CPU has passivated it.
HMI / WinCC tag binding: When the HMI polls PQW300, it typically gets the last CPU-written value via OPC DA/UA or the S7 protocol. WinCC does not suffer from the same read limitation as VAT because the driver reads the variable area differently. If your HMI shows the value but the VAT does not, the underlying cause is the same: HMI drivers use the process image by preference, VAT insists on peripheral access for prefixed operands.
Symbolic vs absolute addresses: Always bind the symbolic tag to QW30 rather than PQW300 once the address is inside the process image. Otherwise the cross-reference and watch-table entries become inconsistent.
Project migration STEP 7 → TIA Portal: A migrated project may retain PQW operands. TIA Portal's compiler will warn on every peripheral-output reference because the optimal address form is %QW. Treat the warnings as a checklist: re-address each PQW inside the process image or insert the MW mirror.
Diagnostic Reference: Status Codes in the VAT
| VAT status symbol | Meaning | Action |
|---|---|---|
| Green check + value | Address inside process image, monitoring active | None — proceed. |
----- / dashes |
Peripheral access on a write-only operand | Apply Workaround 1 or Workaround 2. |
SF (red) |
Module fault, channel diagnostics active | Check module diagnostics; the value may be invalid regardless of the address. |
! / warning |
Address exists but is currently substituted, or B-stack / U-stack context issue | Verify you are not inside a re-entrant FB and the address is not overlapping with a different OB's PII partition. |
Value out of range (e.g. 16#8000) |
Module returned diagnostic "value frozen" or substitute value | Check the channel diagnostic buffer (CPU diagnostic buffer + module diagnostics). |
Programmatic Equivalent: Reading the Value Without a VAT
If you need to read the last-written AO value programmatically — for example to log it to a historian, or feed it to a supervisory block — the same workaround applies. Mirror in a DB so it is retained across cycles and survives restart OB100.
// FB "AO_Drive"
VAR
scaled_value : INT; // -27648..27648 (S7 AO range)
raw_out : WORD;
END_VAR
BEGIN
// Scale, clamp, and ramp logic here ...
raw_out := INT_TO_WORD(scaled_value);
// Physical write
T PQW 300;
// Mirror for diagnostics / VAT / HMI
"ao_db".last_raw := raw_out;
"ao_db".last_scaled := scaled_value;
"ao_db".timestamp := WORD_TO_INT(%EW0); // system time low word
END_FUNCTION_BLOCK
Reading "ao_db".last_raw in the VAT gives you everything the PQW would have shown, plus a timestamp, plus a place to add engineering units and status flags.
Summary Checklist
- Identify the failing address — confirm it is prefixed with
P(peripheral access). - Decide between the two workarounds based on whether the hardware configuration can be edited.
- Re-address the module so its I/O range falls inside the configured process image, or insert an MW/DB mirror next to every
T PQW. - Recompile, download, and verify in the VAT with a forced value + multimeter on the field terminals.
- Update the project documentation so future engineers know whether
QWorPQWis in use and why. - For PROFINET devices with locked I/O mapping, or F-CPU outputs, retain the MW mirror and never rely on it for safety.
Why does my VAT show dashes for PQW300 but a value for PIW300?
PIW300 is a read on an input module and the peripheral bus returns the converted value. PQW300 is a write-only operand; the CPU's peripheral interface cannot read back from an output channel, so the VAT shows dashes. Use QW30 (in the process image) or an MW mirror instead.
How do I move a PQW address into the process image so I can monitor it?
Open HW Config (STEP 7 Classic) or the device properties (TIA Portal), select the analog output module, go to the I/O Addresses tab, and re-enter the start address inside the CPU's process image range. Save, compile, download, then change the operand in your program and VAT from PQW300 to QW30 (or to the new address you assigned).
What is the difference between PIW/PQW and IW/QW in STEP 7?
PIW/PQW are peripheral accesses — they read or write the physical module directly each time the operand is used. IW/QW address the process image, a memory mirror refreshed once per OB1 cycle. PIW/PQW are needed when the address is outside the process image; inside the process image, IW/QW is faster and supports read-back in a VAT.
Can I still use PQW in my program after moving the address into the process image?
Yes. STEP 7 and TIA Portal accept both PQW and QW for the same address when that address falls inside the configured process image. For consistency, switch every reference to the non-prefixed form and let the compiler catch any leftover PQW that points outside the process image.
My PROFINET device does not let me change its I/O addresses — what now?
Add a mirror instruction next to every write to that PQW (for example, T MW 200 immediately after T PQW 300) and monitor MW200 in the VAT. Some third-party PROFINET devices publish fixed address ranges that exceed the host CPU's process image; an MW or DB mirror is the only reliable workaround in those cases.