Accessing alarm data from WinCC databases...

C

Thread Starter

Conny Karlsson

Hi... I need to access the alarm data from the WinCC databases (used here with the PCS-7 system). I've been in contact with the Siemens Hotline. They told me that the alarm data exists partly in the Configuration database and the Runtime database. The data would be as an alarm ID in one and as the alarmtext in the other under a table called MSArcShort. I have the databases from a project but I can't find these fields there, I can however find a field named MSArcLong - but I haven't found any textstrings for the alarms there. I have used ODBC in order to read the databases in Microsoft Access. The Siemnes Hotline also refered me to a dll file named MSRText.dll that would get the alarmdata and put it in a textfile. Now - this dll is not for free - you have to buy it. I am making this application as a final year thesis work - so the idea is not to buy a ready made component - I have to make it myself. The Siemens homepages (about WinCC) are bragging about how open the WinCC is to other applications but there isn't one example anywhere on how to access it. I've seen that they sell the ODK-packet (Open Developement Kit) which to my understanding says how to access data in WinCC (among other things). Is buying this packet the only way for me to get my hands on any instructions, or do I have any other options (because again the ODK-packet isn't for free either). So, if anyone could please help me in finding out how to access the data (for free) or tell me about where I can find instructions (for free) - then I'd be very thankful. Thankyou in advance, Conny Karlsson.
 
N

Nijssen, Ronald

I can help you understand the Relational Open Database of WinCC, but first a little explanation The Siemens System is an Open System, the fact that all Alarm Configuration and Historical data, as well as all other data, are stored in an accessible ODBC compliant Database proves this. A Database however, may not be as self-explanatory as you would like it to be. In a flexible configurable system like WinCC is, the Database is constructed in such a way that Data only exists once in the Database. This implies that tables that refer to already existing data will not copy this Data but hold a reference. This is a good Database design approach, referencing versus copying and has nothing to do with bragging about openess. The Siemens WinCC Alarm system has several options and is fully configurable, also, the texts that are configured for the alarms are multi-lingual, this implies that they can show English, Chinese, and, yes Finlands Language, if required. Therefore all texts are stored in a Table that is referenced by all system functions. The WinCC Alarm system supports two types of Archives for alarm history, both a revolving "short" term archive and a long term archive. This implies that MsArcLong or MsArcShort needs to be accessed depending on the configuration. I have two things left, one, an explanation of the Relational structure of data in the Database and two, an hint where you can find a Database explorer to check this structure. 1. MsArcLong contains a list of all occurrences of an alarm. In this table you find Date, Time and the column "MsgNr", other columns are also interesting, for example "Status", but we will use MsgNr, this is the MsgNr of the alarm that changed status, you can find this number in your alarm configuration dialog as well With the MsgNr you can find information about the alarm in the Configuration Database (the one with the same name as the RunTime Database where you found MsArcLong but without the "R" at the end). The Configuration database table you need is: "MsMsgs". In this Table you find all configuration Data of the alarms. If you want to know the Texts that belong to the alarm, there can be up to 10, then you look at the columns: "TB1 .. TB10", in these columns you will find references to texts in the Text Table: "TXTTable". This is a table with a column for each activated language, and each text is indexed. You can read and use these texts for the language you like I understand that some higher level SQL is required to retrieve information of an alarm but I am confident that the Standard Query Language will be no problem for you 2. This may help you explore the Database structures: If you install WinCC you will find also on your system an interactive Database explorer. This explorer is named "scview.exe" and can be found in <Drive:>\Siemens\Common\sqlany. If you start it then you can connect with the UserID "dba" and password "sql". When you do that then you will see the running Database engine and Databases, you will have to connect specifically to the RunTime Datbase by selecting it, with the same userid and password. You can go to every table, check it's columns and contents using the "View Data" command in the context menu Have fun with WinCC's openess, please take Database security into account, you may have to change the default userid password to prohibit illegal access Ronald Nijssen Siemens Energy & Automation Inc.
 
V
I tried to run scview and it came up with "Sybase Central. When I try to connect, it throws "There are no plug-ins registered with sybase central that support a connection." note that I am running this from the engineering station.
 
Top