回复:CPU224中的数据如何读到TD200里面啊?

shuwang

  • 帖子

    11
  • 精华

    0
  • 被关注

    0

论坛等级:新手

注册时间:2003-06-06

普通 普通 如何晋级?

发布于 2003-09-10 08:43:05

0楼

首先,用TD200向导生成要显示的数据,其中嵌入一个变量,然后在程序里将CO传给该变量即可。例如向导生成的数据块如下
//DATA BLOCK COMMENTS
//
//Press F1 for help and example data block
//
//BEGIN TD200_BLOCK ----------------------------
VB0 'TD'
VB2 16#60 //Set Language to Chinese, set Update to as fast as possible
VB3 16#B0 //Set the display to 20 character mode; Up key V3.2; Down key V3.3;
VB4 1 //Set the number of messages
VB5 0 //Set the Function Keys notification bits to M0.0 - M0.7
VW6 34 //Set the starting address for messages to VW34
VW8 14 //Set the starting address for message enable bits to VW14
VW10 0 //Global Password (if enabled)
VW12 256 //Character Set = Simplified Chinese
//MESSAGE 1
//Message Enable Bit V14.7
VB34 '这是一个变化值'
VB48 16#00 //No Edit;No Acknowledgement;No Password;
VB49 16#10 //Signed Word; 0 Digits to the right of the decimal;
VW50 16#0000 //Embedded Data Value: Move data for display here.
VB52 ' '
//END TD200_BLOCK ------------------------------
在程序里加入以下命令:
MOVW C0 VW50
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC S7-200

共有33257条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

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

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

  • 分享

  • 只看
    楼主

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