IMDTouchKnowledge BaseShop main store

Explainer

Why a WinCC analog alarm has no PLC enable bit

HMI and touchscreens Published 7 min read By IMDTouch engineering team

Short answer

In TIA Portal WinCC, an analog alarm has no enable property: it triggers only when a non-BOOL tag crosses a constant or variable limit, and its alarm class is fixed configuration. To gate alarms deterministically from a PLC bit, recreate them as bit alarms with the comparison and the enable in the PLC; to keep every comparison in WinCC, let the PLC write the limit tags instead.

On this page
  1. What an analog alarm actually evaluates
  2. Why a PLC bit cannot switch one
  3. The two routes that work
  4. Worked example: the conversion in numbers
  5. Converting the gated alarms to bit alarms
  6. Keeping the comparisons in WinCC with variable limits
  7. The decision
  8. Questions asked

An analog alarm in WinCC inside TIA Portal has no enable input. It fires when a non-BOOL tag crosses a limit — a constant or another tag — and the alarm engine evaluates nothing else: no enable tag, no gate bit, no class that a runtime signal could switch. That is why the fifty-odd alarms in this case cannot be switched from the PLC as they stand. The deterministic fix is to recreate the gated ones as bit alarms with the comparisons in the PLC program; the alternative that keeps every comparison inside WinCC is a variable limit that the PLC writes. Both routes are below, with the arithmetic for the conversion and the choice between them.

What an analog alarm actually evaluates #

An analog alarm reports a limit violation during operation. You create it in the "HMI alarms" editor or on the "Analog alarms" tab of the "HMI tags" editor, and the configuration comes down to four things: the monitored tag, the limit, the crossing direction — upward or downward — and the alarm class. The limit may be a constant or another tag. On each update of the monitored tag the runtime compares the value with the limit in the configured direction and raises the alarm when the condition is met. The class — acknowledgment model, colors, where the message appears — is set under "Alarm settings" in the Inspector window and is fixed configuration. At runtime the only live inputs are the value and, when used, the limit tag.

Why a PLC bit cannot switch one #

An enable would mean the engine evaluates "enable bit AND value beyond limit". The reference here is Siemens' configuration documentation for messages and alarms in WinCC (TIA Portal) and its per-target configuration entries for Basic and Comfort Panels, RT Advanced, RT Professional and Unified: all describe the same analog model — tag, limit, crossing direction — and none offers an enable input. You can confirm it in your own project in a minute: open any analog alarm and read the properties; you find the tag, the limit, the direction, the class and the texts, nothing a bit could operate.

Two workarounds get proposed and both fail as enables. Switching the alarm class at runtime is not a WinCC function; the class is fixed at engineering time. Downloading one of two recipe datasets under control of the PLC bit creates no enable either: a recipe transfer writes tag values, so it works only if the limits are already tags — the variable-limit route with extra machinery attached. The gate has to come from one of the two things the engine genuinely evaluates: the limit itself, or a trigger bit on a discrete alarm.

The two routes that work #

Aspect Variable limit Bit alarm
PLC writes the limit tag of each analog alarm one trigger bit per alarm, packed into alarm words
Comparison runs in WinCC, on each tag update the PLC program
What the enable bit does moves the threshold in and out of reach is the alarm: bit set, alarm active
Scaling burden limit tag must match the monitored tag's unit and scaling only the compared operands matter
Choose when the limit genuinely changes with mode or phase the bit must gate the alarm deterministically

The PLC effort is modest either way — one comparison per alarm on the bit-alarm route, one array copy on the variable-limit route — so the choice is decided by what the bit must mean, not by programming cost.

Worked example: the conversion in numbers #

Take the case in hand: 50 analog alarms to be gated by one PLC enable bit.

Bit-alarm route. A discrete alarm triggers on a tag plus a bit number, and one word carries 16 bits, so 50 ÷ 16 = 3.125, rounded up to 4 alarm words — 64 bits, 14 of them spare for future alarms. The PLC gains one comparison per alarm, each ANDed with the enable bit and written to its mapped bit; WinCC gains one discrete alarm per comparison with the text copied from the analog original, and the analog originals are deleted so no condition produces two messages.

Variable-limit route. Lay the 50 limits out as one contiguous array of REAL in a data block: 50 × 4 bytes = 200 bytes. Keep two constant source arrays — enabled values and disabled values — and copy the whole array with one block move on each edge of the enable bit. Example: a dryer inlet temperature, upward-crossing alarm at 85.0 °C, tag range topping out at 150.0 °C. The enabled set writes 85.0; the disabled set writes 151.0, just beyond the range, a limit the value can never cross. Every comparison stays in WinCC.

Time for the bit-alarm route: with the tag, limit and direction listed for every alarm, one alarm converts in a few minutes of editing; the full set is one working session including the test pass.

Converting the gated alarms to bit alarms #

  1. List the gated alarms from the analog originals: monitored tag, limit, crossing direction, text and class.
  2. Map the bits. Words 1 to 3 carry alarms 1 to 48 (3 × 16 = 48); the last two alarms take bits 0 and 1 of word 4. Packing trigger bits into alarm words is standard practice, and migrating GP-Pro EX alarms to TIA Portal as alarm words shows the same packing for a migration.
  3. Create the HMI tags for the four alarm words, external, addressed to that data block.
  4. Create one discrete alarm per entry: under "Trigger" in the alarm's properties in the Inspector window, select the alarm word and the bit, then copy the text and class from the analog original. The message-to-bit mapping is yours to keep consistent; the failure mode is the one behind why numeric message codes do not map to discrete alarm bits.
  5. In the PLC program, write one comparison per alarm: the value against its limit, ANDed with the enable bit, result to the mapped bit. This is where the gate becomes reviewable code.
  6. Delete the analog originals so each condition produces exactly one message.
  7. Bench-test with verified test tags: force each bit and confirm text, class and acknowledgment in an alarm view placed on the screen; then drive a value across its limit and confirm the PLC comparison — not the HMI — raised the message.

Keeping the comparisons in WinCC with variable limits #

When the requirement behind the enable bit is really a threshold that moves with the operating mode — tighter in production, wider during startup — keep the analog alarm and give it a limit tag. Two conditions make it work. The limit tag must carry the same data type, unit and scaling as the monitored tag: a REAL in °C against a REAL in °C. And the disabled value must sit just beyond the tag's configured range on the side the alarm watches: above the range for an upward-crossing alarm, below it for a downward one. What you give up is visibility. The suppression lives in the value of a tag rather than in a property readable in the editor, so record the disabled value in the program documentation and the tag comment. The engine keeps comparing on every update while the alarm is disabled — it simply cannot be crossed.

The decision #

Case one: the bit must gate the alarm — phase-valid, mode-valid or suppressed during startup, with the gate visible in code for review. Recreate those alarms as bit alarms: the alarm words, one comparison each ANDed with the enable bit, analog originals deleted. That is the deterministic route and the right default for the set in this case.

Case two: what actually changes is the limit. Keep the analog alarms, point the limits at tags, and let the PLC copy an enabled or a disabled limit set with one block move. No comparisons in the program, and the alarms keep their limit-crossing behavior.

Case three: a mixed set. Convert only the gated alarms and leave genuinely threshold-driven ones analog; nothing forces an all-or-nothing conversion.

In every case the enable logic ends up in the PLC program where it can be reviewed, and no alarm gate doubles as a safety function — protection stays in the safety circuit.

Questions asked

Why does my variable limit never trigger the alarm?

Scaling, almost always. If the monitored tag is a REAL in degrees Celsius and the PLC writes the limit in tenths of a degree, 850 where 85.0 was meant, the value never reaches it and the alarm stays silent. Give the limit tag the same data type, unit and scaling as the monitored tag, then watch both online in one table while you cross the limit by hand.

What happens to an active alarm when the PLC raises its limit to disable it?

The alarm leaves the active state as soon as the limit is out of reach, but the entry remains in the alarm buffer as history. When the real limit is written back, a value that is still violating triggers a fresh alarm at once, so operators can see the same condition twice. Acknowledgment follows the alarm class as usual.

Can several analog alarms share one limit tag?

Yes. Any number of analog alarms can point at the same limit tag, which suits groups that share one threshold, for example all zone-1 temperature warnings moving together when the mode changes. Sharing does not merge them: each alarm keeps its own text, class and crossing direction, and each is raised by its own value against the shared limit.

How do I keep the per-alarm comparisons maintainable in the PLC?

Wrap the logic in one function block: the value, the limit and the enable bit as inputs, the trigger bit as output. One instance per alarm keeps the call list readable as a table, a change to the gate logic is made once for all alarms, and online monitoring shows each alarm's comparison state side by side.

Keep reading

  • Explainer

    Why numeric message codes do not map to discrete alarm bits

    The old panel's byte is a numeric selector: the full value picks one text-list entry, and bit 0 has the value 1, so a set trigger bit 0 shows the entry stored under value 1. Keep the value-driven text list for indication; decode each message code into its own discrete alarm condition when you need acknowledgment and alarm history.

    HMI and touchscreens

  • Troubleshooting

    Why a TP177micro alarm acknowledges only via its own ACK button

    A WinCC flexible discrete alarm runs on three separate bit handshakes: the trigger, the PLC acknowledgment request and the panel's acknowledgment feedback. The TP177micro acknowledges only through its own ACK control or a fresh transition of the configured request bit while the alarm is pending; writing the feedback bit does nothing. The panel also has no alarm archive, so logging stays disabled.

    HMI and touchscreens

  • Explainer

    Reading raw PLC tags as diagnostics in WinCC over OPC

    No. An OPC server does not limit WinCC to slave diagnostics: WinCC reads every item the server publishes, process tags included. A raw tag is only an undecoded value — match its type to the server item, decode packed words at the tag level, and drive configured alarms and displays instead of C scripts in each graphic object.

    HMI and touchscreens

WinCC PLC Connection Loss Alarm and NO Connect Display