发布于 2005-11-07 22:52:29
0楼
找到了一段以前收藏的帖子请大家参考:
Does anyone know if it's possible to access the alarm message text from withing the GMsgfunction.
There is a field in the structure that is named TextValueUsed which I thought maybe what I wanted but this always has a NULL value.
Regards
Graham Greaves
Post Reply Reply/Quote Email Reply Delete Edit
Previous Next Previous Topic Next Topic Entire Topic
Topic: Wincc (2 of 2), Read 58 times
Conf: SIMATIC HMI Human Machine Interfaces
From: Stefaan Buysse stefaan.buysse@siemens.be
Date: Donnerstag, 6. Dezember 2001 01:26
Hello,
The "TextValueUsed" doesn't offer you any information.
I think you should be able to access the text-ID's and the texts like this :
..... //in the function, you find the messagenumber in mRT.dwMsgNr
MSG_CSDATA_STRUCT mCS;
MSG_TEXT_STRUCT mTxt;
MSRTGetMsgCSData(mRT.dwMsgNr,&mCS,NULL);
MSRTGetMsgText(1,mCS.dwTextID[0],&mTxt,NULL);
//for the block TB2 :
//MSRTGetMsgText(2,mCS.dwTextID[1],&mTxt,NULL);
The text of the block, you find in mTxt.szText
Greetings
微信公众号:PLC标准化编程,ZHO6371995