IMDTouchKnowledge BaseShop main store

How-to

Migrating GP-Pro EX alarms to TIA Portal as alarm words

HMI and touchscreens Published 6 min read

Short answer

TIA Portal's word-based discrete alarms reject Boolean trigger tags, so pack the GP-Pro EX alarms into trigger words first: the LGF_MergeBitsToWord block merges 16 Booleans into one Word, and 700 alarms need ceiling(700/16) = 44 words. A V17 library copy upgrades to TIA Portal V18 when its blocks are not write-protected. Map each discrete alarm to its word and bit from a worksheet, and prove one word end to end on the bench before filling the rest.

On this page
  1. Why the Boolean trigger fails
  2. Size the trigger words from the export row count
  3. Pack the Booleans with LGF_MergeBitsToWord
  4. Map every alarm to a word and bit
  5. Create the discrete alarms in TIA Portal
  6. Prove one word end to end
  7. When Boolean alarm triggers fit better
  8. Questions asked

TIA Portal's word-based discrete alarms reject a Boolean trigger tag, so the packing comes before the alarm editor: the Library of General Functions block LGF_MergeBitsToWord merges 16 Booleans into one Word, giving every GP-Pro EX alarm a trigger word and a bit number for the WinCC discrete-alarm table. A V17 copy of that library opens and upgrades in TIA Portal V18 as long as the blocks are not write-protected. For this export — more than 700 Boolean-triggered alarms — the sizing rule is words = ceiling(alarms / 16), and 700 alarms need 44 words with 4 spare bits. Copying the alarm list by hand moves only the texts; without a word behind each row, every trigger field still refuses the Boolean tag.

Why the Boolean trigger fails #

A word-based discrete alarm reads an integer-sized container and evaluates one bit inside it, so the HMI trigger tag must be declared as Word, Int or DWord; direct Boolean-to-alarm mapping is not supported in this alarm configuration. The rejection happens at configuration time, when the editor refuses the tag — the source conditions themselves can stay Boolean in the controller.

The failure that wastes more time is the silent one: a discrete alarm that never appears although its trigger bit, M2.6 in the reported case, is high. That points at the binding, not at the logic. Check the trigger tag's data type and its configured bit number in the alarm's trigger properties before touching the PLC program.

Keep every trigger word reserved for the alarm engine. If sequencing or interlock logic writes into the same bits, the panel raises alarms for machine states the alarm list was never designed to report.

Size the trigger words from the export row count #

Every trigger word holds 16 alarms, so word count = ceiling(alarm count / 16). Recount the export rows before creating anything, because the count only ever grows by whole words.

Worked example at this export's scale: 700 alarms gives 700 / 16 = 43.75, rounded up to 44 words; 44 × 16 = 704 bit positions, of which 700 are used and 4 are spare — word 43 carries rows 688 to 699 on bits 0 to 11 and leaves bits 12 to 15 clear. If the recount finds 712 rows, the same formula gives 45 words and 720 positions.

Decision: create the sized Word tags in one global DB for this export and re-run the sizing only if the list grows.

Pack the Booleans with LGF_MergeBitsToWord #

  1. Download the Library of General Functions (LGF) for SIMATIC S7-1200 and S7-1500 from Siemens Industry Online Support, entry ID 109479728, and open it in TIA Portal from the Libraries task card.
  2. The download is a V17 library. Open a working copy of it in TIA Portal V18; the portal upgrades the library as long as the blocks are not write-protected.
  3. Create a global DB with one Word tag per alarm word, using example names AlarmWord_00 through AlarmWord_43 for this export.
  4. Insert LGF_MergeBitsToWord once per alarm word and wire the source conditions to its bit inputs in worksheet order, one condition per input, with the output assigned to that word's tag.
  5. Call every packing block unconditionally in a cyclic OB, so a condition that clears also clears its bit on the same scan; a block that only executes when called leaves stale bits, and the panel keeps reporting alarms that are long gone.
  6. Build three alarm words first, compile, and prove them before replicating the pattern across the whole list.

LGF runs on S7-1200 and S7-1500 controllers. If the machine still runs an S7-300, write the same packing in that controller's own tool — any PLC that can assemble its alarm conditions into Words serves, because the HMI only ever reads the Word — or move the controller project to an S7-1200 or S7-1500 first; migrating S7-300 projects from STEP 7 v5.5 to TIA Portal covers that project upgrade.

Map every alarm to a word and bit #

Build the worksheet before opening the alarm editor. One row per source alarm, with columns for source alarm number, alarm text, source Boolean tag, destination word tag, bit number, alarm class and acknowledgment requirement.

Indexing from row zero: word number = floor(row / 16) and bit number = row mod 16, so row 100 lands on word 6 — 6 × 16 = 96 — bit 4.

Two hard rules: never assign one bit to two conditions, and leave the spare bits clear and documented, because a spare bit that stray logic sets raises an alarm with no text behind it.

The source side of the worksheet is the exported alarm list, which is a CSV. If a re-export seems to vanish, GP-Pro EX writes CSV exports to the simulation folder; why GP-Pro EX writes CSV exports to the simulation folder explains where it lands.

Create the discrete alarms in TIA Portal #

  1. Create one HMI tag per alarm word in the HMI tag table, data type Word, each pointed at its PLC alarm word over the existing connection. The rows go in fastest as a table import; importing a PLC tag CSV into an existing HMI tag database covers merging a CSV tag list into a tag database that already exists.
  2. In the HMI alarm editor, create the discrete alarms and select each alarm's trigger under Properties > Properties > Trigger: the trigger tag is that alarm word and the trigger bit is the worksheet's bit number.
  3. Bring the alarm texts across from the worksheet. The GP-Pro EX export is not a WinCC import format, so transform it: build a two-alarm sample in the editor's own paste or import format, confirm the columns, then transform the whole list against that sample.
  4. Compile the PLC and HMI projects and clear data-type errors, duplicate bit assignments and unresolved tag references before any download, then set each alarm's class and acknowledgment properties from the worksheet columns.

Prove one word end to end #

Do this on an isolated bench with test tags created for the test, not by driving the machine into a real fault; write the test Booleans from a watch table.

  • Set the first condition of the first alarm word: the bit-0 alarm appears with the worksheet's text and class.
  • Set the last condition of that word and the first condition of the next word together; the bit-15 to bit-0 boundary is where off-by-one indexing shows up.
  • Run two conditions of the same word at once: both messages display, and clearing one leaves the other standing, which proves the bits are independent.
  • Clear a condition and watch the alarm return to normal, then exercise acknowledgment where the alarm class requires it.
  • Compare the word's online value against the worksheet; with bits 0 and 4 set, an S7 Word reads decimal 17.

Only when one word passes end to end do the remaining alarm words get filled, because every later word repeats the same wiring pattern.

When Boolean alarm triggers fit better #

WinCC Unified is the other architecture. Its discrete alarms are configured with a trigger tag, a trigger bit and a trigger mode, and a Unified target accepts the Boolean as the trigger directly — no packing and no alarm words.

For this migration, pack the words anyway: the replacement path from a GP-Pro EX terminal lands on the classic WinCC alarm engine, where the word-and-bit binding is the price of that target and, at 44 words, a bounded one. Unified is a different runtime family, not a switch on the existing panel, so it only enters the decision while the hardware target is still open.

Questions asked

Does packing the alarms into words change acknowledgment behavior?

No. Packing only supplies the trigger; acknowledgment, latching and alarm classes stay properties of each alarm definition in the HMI editor, set the same way they were set in GP-Pro EX. A packed bit neither latches a fault nor acknowledges it by itself, so retune class and acknowledgment per alarm in the destination and prove them on the bench.

Can a DWord trigger halve the number of alarm words?

Yes. A DWord trigger carries 32 bits, so the same export needs ceiling(700 / 32) = 22 trigger words. The LGF block outputs one Word, so pair two block outputs into each DWord, or keep the Word size and accept the longer tag list; the worksheet decides which bit belongs to which alarm either way.

Do the packed alarm words still work if the project later moves to WinCC Unified?

Yes. Unified discrete alarms are configured with a trigger tag, a trigger bit and a trigger mode, so a packed word remains a valid trigger there; Boolean triggers are an additional option that Unified adds. The packing work is therefore not throwaway if the target family changes later.

Can a very short fault condition be missed by the panel?

Yes. The HMI reads the alarm words on its tag update cycle, not event-synchronized with the controller, so a condition that appears and clears between two updates can go unreported. For pulse-like faults, hold the bit in the controller long enough to span the HMI update time instead of relying on the scan to catch it.

Keep reading

  • Troubleshooting

    Why a Converted PanelView Plus Shows the Wrong Alarm Numbers

    The conversion changed how the alarm block is read, not what the PLC sends. The original PanelView triggered each message from a Bit in a packed RIO alarm block; the converted application reads the same words as numeric Value triggers, so any multi-bit pattern selects a message nobody configured. Set the triggers back to Bit and verify each source word.

    HMI and touchscreens

  • Troubleshooting

    Working around the C-More EA9 alarm banner covering buttons

    No. The C-More EA9 alarm message banner has no position setting: it is fixed at the bottom of the screen, and while an alarm is active it overlays every screen in the project. Reduce the banner height, move page-change buttons above the banner band on every screen, and verify each one with a live alarm showing.

    HMI and touchscreens

  • How-to

    How to migrate a WinCC flexible project to TIA Portal

    One TIA Portal installation replaces both STEP 7 Classic and WinCC flexible, but the two project types move differently: the STEP 7 V5.x project is imported, and the WinCC flexible 2008 project is migrated through an intermediate release because the newest TIA Portal versions no longer offer that migration. Verify the exact S7-300 CPU and panel against the device lists and license STEP 7 and WinCC Comfort separately.

    HMI and touchscreens