回复:通过报警编号,怎样取得消息文本(通过C脚本)

万泉河

  • 帖子

    10907
  • 精华

    132
  • 被关注

    1019

论坛等级:至圣

注册时间:2003-06-06

钻石 钻石 如何晋级?

发布于 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
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC WinCC / Panel

共有32914条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
X 图片
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。