| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 448 人关注过本帖
标题:关于VB通过DDE读取WINCC数据的问题
只看楼主 加入收藏
xiaoweo8637
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-7-20
收藏
 问题点数:0 回复次数:0 
关于VB通过DDE读取WINCC数据的问题
我做了一个定时器,VB通过DDE读取WINCC数据,程序如下:
Private Sub TimerDDE_Timer()
Dim i As Integer
  On Error GoTo tt
For i = 0 To 37 Step 1
Text1(i).LinkTopic = "WinCC|\\20120315-1608\WinCC60_Project_P13_WINCC\P13_WINCC.MCP"
Next i
Text1(0).LinkItem = "DB34_8"
Text1(1).LinkItem = "DB34_0"
Text1(2).LinkItem = "DB34_4"
Text1(3).LinkItem = "DB34_60"
Text1(4).LinkItem = "DB31_16"
Text1(5).LinkItem = "DB31_20"
Text1(6).LinkItem = "DB36_0"
Text1(7).LinkItem = "DB36_4"
Text1(8).LinkItem = "DB36_8"
Text1(9).LinkItem = "DB36_12"
Text1(10).LinkItem = "DB36_16"
Text1(11).LinkItem = "DB36_20"
Text1(12).LinkItem = "DB36_24"
Text1(13).LinkItem = "DB36_28"
Text1(14).LinkItem = "DB36_32"
Text1(15).LinkItem = "DB36_36"
Text1(16).LinkItem = "DB36_40"
Text1(17).LinkItem = "DB36_44"
Text1(18).LinkItem = "DB36_48"
Text1(19).LinkItem = "DB36_52"
Text1(20).LinkItem = "DB36_56"
Text1(21).LinkItem = "DB36_60"
Text1(22).LinkItem = "DB36_64"
Text1(23).LinkItem = "DB36_68"
Text1(24).LinkItem = "DB36_72"
Text1(25).LinkItem = "DB36_76"
Text1(26).LinkItem = "DB36_80"
Text1(27).LinkItem = "DB36_84"
Text1(28).LinkItem = "DB36_88"
Text1(29).LinkItem = "DB36_92"
Text1(30).LinkItem = "DB36_96"
Text1(31).LinkItem = "DB36_100"
Text1(32).LinkItem = "DB36_104"
Text1(33).LinkItem = "DB36_108"
Text1(34).LinkItem = "DB36_112"
Text1(35).LinkItem = "DB36_116"
Text1(36).LinkItem = "DB36_120"
Text1(37).LinkItem = "DB36_124"
Text1(0).LinkMode = 1
Text1(1).LinkMode = 1
Text1(2).LinkMode = 1
Text1(3).LinkMode = 1
Text1(4).LinkMode = 1
Text1(5).LinkMode = 1
Text1(6).LinkMode = 1
Text1(7).LinkMode = 1
Text1(8).LinkMode = 1
Text1(9).LinkMode = 1
Text1(10).LinkMode = 1
Text1(11).LinkMode = 1
Text1(12).LinkMode = 1
Text1(13).LinkMode = 1
Text1(14).LinkMode = 1
Text1(15).LinkMode = 1
Text1(16).LinkMode = 1
Text1(17).LinkMode = 1
Text1(18).LinkMode = 1
Text1(19).LinkMode = 1
Text1(20).LinkMode = 1
Text1(21).LinkMode = 1
Text1(22).LinkMode = 1
Text1(23).LinkMode = 1
Text1(24).LinkMode = 1
Text1(25).LinkMode = 1
Text1(26).LinkMode = 1
Text1(27).LinkMode = 1
Text1(28).LinkMode = 1
Text1(29).LinkMode = 1
Text1(30).LinkMode = 1
Text1(31).LinkMode = 1
Text1(32).LinkMode = 1
Text1(33).LinkMode = 1
Text1(34).LinkMode = 1
Text1(35).LinkMode = 1
Text1(36).LinkMode = 1
Text1(37).LinkMode = 1

Exit Sub
tt:
  Resume Next
End Sub


其它设置:TimerDDE_Timer时间设定为6s,linktimeout=50
程序运行时WINCC数据是全部都调过来了,也实时变化,控件设置也没有问题,但整个程序都这个明显感觉被拖死,请问是不是不能使用定时器调用DDE,还是这个程序有问题,请高手指点指点,谢谢!
搜索更多相关主题的帖子: Text1 定时器 数据 
2012-07-20 22:40
快速回复:关于VB通过DDE读取WINCC数据的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017237 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved