How-to
How to Read WinCC Alarm Text Without the ODK
Short answer
The alarm text is already in the project's ODBC-readable databases. Read MsgNr, Date, Time and Status from MSArcLong or MSArcShort in the runtime database, match MsgNr to one record in MsMsgs in the configuration database, then resolve its populated TB references through TXTTable in the language column you need - three staged lookups, no ODK, no MSRText.dll.
On this page
- Where the alarm text actually lives
- Connect and pick the archive table
- Record the occurrence and its message number
- Correlate the message number in the configuration database
- Resolve the text references and the language column
- Tracing one alarm from MSArcLong to its display text
- When scview reports no registered plug-ins
- Building the export
- Questions asked
You do not need the ODK and you do not need MSRText.dll. Both are paid add-ons, but the alarm text they would hand you is already sitting in the project's databases, and those databases are ODBC-readable. The work is three staged lookups: read MsgNr, Date, Time and Status from the archive table in the runtime database, match that MsgNr to one record in MsMsgs in the configuration database, then resolve the TB references that record holds through TXTTable in the language column you want. This article walks each stage, traces one alarm end to end, and closes with the scview error that stops most attempts before they start.
Where the alarm text actually lives #
WinCC stores each piece of data once and references it everywhere else, which is why no single table hands you a finished alarm line. Siemens' V7.3 alarm logging documentation puts every message event in dbo.MsArcLong, inside the current runtime-database segment of alarm logging. The runtime database therefore holds occurrences - numbers, times and states - while the readable strings live in the configuration database. The chain is fixed:
| Stage | Database | Table | What you read |
|---|---|---|---|
| Occurrence | Runtime database (name ends in R) | MSArcLong or MSArcShort |
MsgNr, Date, Time, Status |
| Message | Configuration database (base name, no R) | MsMsgs |
TB1 through TB10 references |
| Text | Configuration database | TXTTable |
The string, one column per activated language |
MsgNr is the only value that travels between the two databases, so it is the join key for the whole exercise.
Connect and pick the archive table #
- Connect to the runtime database through the project's ODBC DSN; the connection side is covered in reading the WinCC runtime database through the ODBC DSN.
- List the tables and open both archive names instead of assuming one. The same table can appear spelled
MSArcShortorMsArcShortdepending on the client's case handling, so let schema discovery decide, not spelling. - Compare each archive's date range against the time of one alarm you know happened. Alarm logging writes to the current runtime-database segment, so the table that holds your window is the one to read.
- Expected reading: a row at the known event time that exposes
MsgNr. If neither archive has it, correct the database selection, the archive configuration or the time range before chasing text.
Record the occurrence and its message number #
- Pick one alarm whose display time and number you can verify in the running project.
- Find its row by
DateandTime, then record the exactMsgNrandStatus. - Look at adjacent rows carrying the same
MsgNr: the archive writes one row per state transition, so several rows are one alarm's life, not several alarms. - If your client shows the table but not the number, inspect it with a database explorer before suspecting the schema - a client-side import limitation looks identical to a missing column.
Correlate the message number in the configuration database #
- After recording a test
MsgNr, disconnect from the runtime database and connect to its paired configuration database: the same base name without the trailing R. - Open
MsMsgsand locate the record for that number. - Read the populated values among
TB1throughTB10. A number here is correct behavior - these fields are references into the text table, not missing strings. - The pairing check is decisive: your
MsgNrmust exist inMsMsgs. If it does not, the two databases come from different copies of the project, and a join across copies returns either nothing or a plausible wrong match. Fix the pairing before exporting, and never exportTBvalues as though they were text.
Resolve the text references and the language column #
- In
TXTTable, find the row matching each populated reference, starting withTB1. - Read the column for the activated language you need, and keep the field position - different text blocks serve different purposes, so do not merge them.
- Repeat for every populated reference through
TB10. - Expected reading: the string equals the text on your known alarm line in that language. A blank result points at the reference value, the chosen column or a language that is not activated - not at the archive.
Tracing one alarm from MSArcLong to its display text #
Take the case that usually starts this search: a project where MSArcLong is present and full of rows, yet no column in it holds a readable string. The inputs, with where each comes from:
- One alarm line visible in the running project's alarm display; you choose it, and it doubles as the test reference.
- Its archive row from
MSArcLong:MsgNr= 1042,Status= 2 (example values; read yours from the row). - The matching
MsMsgsrecord:TB1= 3305,TB2throughTB10unpopulated (example). TXTTablerow 3305 in the active-language column: "Bearing temperature high" (example).
The rule in words: one archived row carries one MsgNr; one MsgNr matches one MsMsgs record; each populated reference matches one TXTTable row; one language column of that row carries the display string.
The arithmetic:
- Text-block fields available in the record: 10 (
TB1throughTB10). - Populated references: 10 - 9 = 1 (only
TB1). - Join size: 1 archive row × 1
MsMsgsrecord × 1TXTTablerow × 1 language column = 1 string.
The lookup returns "Bearing temperature high", identical to the text on the alarm line you started from. That match is the proof of the chain - this trace is the test.
Decision: with the string matching, build the export on exactly this three-stage join. If MsgNr is absent from MsMsgs, stop: the databases are not a pair. If TXTTable comes back blank, stop: fix the language column or the reference before scaling up. One alarm traced correctly is the gate - no bulk export until it matches.
When scview reports no registered plug-ins #
The message "There are no plug-ins registered with sybase central that support a connection." means the Sybase Central you opened has no connection plug-in registered for this database. It says nothing about the WinCC tables. Work it in this order:
- Launch
scview.exefrom the WinCC SQL Anywhere installation - under\Siemens\Common\sqlanyon the WinCC drive - not from another Sybase Central on the same station; an engineering station often carries more than one. - If the plug-in still will not register, drop the explorer: the ODBC connection enumerates the same tables and columns, and any query client will do.
- Use the database login configured for that installation and treat it as a site access-control item, because existing WinCC and reporting connections depend on that account.
Building the export #
Assemble the export as the three staged lookups, not as one guessed query across all tables. Staging keeps a missing relationship visible where it occurs, instead of letting several text blocks or occurrences that share an identifier multiply rows silently under a blanket join. The rule that protects the running system is short: SELECT only, and run large exports against a copy.
Questions asked
Why do older alarms show in MSArcLong but not in the short-term table?
The short-term archive is a revolving runtime-database segment: alarm logging writes each message event to the current segment, and events age out of it as segments roll. Older history exists only where a long-term archive was configured, and anything past the configured retention is gone by design. Check the archive configuration and each segment's date range before treating data as lost.
In a PCS 7 project, where do message texts configured in STEP 7 end up?
Siemens support entry 30550239 states that the user text blocks used by STEP 7 must be created in WinCC Alarm Logging for those message texts to work at runtime. So when a PCS 7 message shows its number but no text, the fault is usually on the WinCC side: the text blocks were never created there, and the reference resolves to nothing.
Can several message numbers share one TXTTable entry?
Yes, and that is the point of the design. Strings are stored once and referenced, so multiple MsMsgs records can point at the same indexed row; editing that row updates every message using it. When you export, join through the reference value and never assume a one-to-one mapping between message numbers and text rows.
Is it safe to query these databases while WinCC is running?
Read-only queries will not disturb logging, but a heavy join runs on the same database engine the runtime uses, so a large export competes with production. Query a copy of the databases, or schedule the extraction for a low-load window, and keep it to SELECT statements.
Microsoft Access shows fewer fields than the table seems to have. Is the schema damaged?
No. Access import can drop columns and alter types when it pulls a table over ODBC. Use linked tables and inspect them directly, or switch to another ODBC query client, and compare the column list against what schema discovery returns before drawing any conclusion about the database.
Is there a documented tool route as well as the direct read?
Yes. Siemens documents the WinCC OLE DB Provider, part of the WinCC/Connectivity offering, for exporting archived alarms and process values. That route is separately licensed; the three-stage ODBC read in this article needs neither it, the ODK, nor MSRText.dll.